package org.apache.jsp.pages.admin;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class startServer_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
    _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<script type=\"text/javascript\">\r\n");
      out.write("$(document).ready(function(){\r\n");
      out.write("//       alert($(window).outerHeight(true));\r\n");
      out.write("   var ajaxLoading = false;\r\n");
      out.write("    $(\"#waiting\").css(\"display\",\"none\");\r\n");
      out.write("\r\n");
      out.write("      $.ajax({\r\n");
      out.write("                url: \"checkServerStatus.action\",\r\n");
      out.write("                type:\"post\",\r\n");
      out.write("                cache:false,\r\n");
      out.write("                dataType:\"json\",\r\n");
      out.write("                success:function(data) {\r\n");
      out.write("                    if (data.resultServer == \"1\") {\r\n");
      out.write("                             $(\"#serverImage\").find(\"img\").attr(\"src\",\"images/admin/server11.png\");\r\n");
      out.write("                    } else {\r\n");
      out.write("                             $(\"#serverImage\").find(\"img\").attr(\"src\",\"images/admin/server11stop.png\");\r\n");
      out.write("                    }\r\n");
      out.write("                }\r\n");
      out.write("            });\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("//    var iii=1;\r\n");
      out.write("//    setInterval(function(){\r\n");
      out.write("//       if(iii%2==0){\r\n");
      out.write("//            $(\"#start\").css(\"marginTop\",\"62px\");\r\n");
      out.write("//       }else{\r\n");
      out.write("//           $(\"#start\").css(\"marginTop\",\"64px\");\r\n");
      out.write("//       }\r\n");
      out.write("//       iii++;\r\n");
      out.write("//    },1000);\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("      $(\"#start\").click(function(){\r\n");
      out.write("\r\n");
      out.write("          if(!ajaxLoading){\r\n");
      out.write("                     ajaxLoading=true;\r\n");
      out.write("                      $(\"#waiting\").show();\r\n");
      out.write("\r\n");
      out.write("                    $.ajax({\r\n");
      out.write("                            url: \"startServer.action\",\r\n");
      out.write("                            cache:false,\r\n");
      out.write("                            type:\"post\",\r\n");
      out.write("                            success:function(result) {\r\n");
      out.write("                                ajaxLoading = false;\r\n");
      out.write("                               if(result == \"success\"){\r\n");
      out.write("                                   alert(\"server started\");\r\n");
      out.write("                                   $(\"#serverImage\").find(\"img\").attr(\"src\",\"images/admin/server11.png\");\r\n");
      out.write("                                   $(\"#server\").find(\"div\").css(\"backgroundImage\", \"url(images/server/server1.png)\");\r\n");
      out.write("                               } else if(result == \"error\"){\r\n");
      out.write("                                   alert(\"error occurred\");\r\n");
      out.write("                               } else if (result == \"input\"){\r\n");
      out.write("                                  alert(\"Server has been already started!\");\r\n");
      out.write("                               }else if(result == \"does_not_started\"){\r\n");
      out.write("                                  alert(\"Server has not been started!\");\r\n");
      out.write("                               }\r\n");
      out.write("                                $(\"#waiting\").hide();\r\n");
      out.write("                            }\r\n");
      out.write("                     });\r\n");
      out.write("                }\r\n");
      out.write("          }) ;\r\n");
      out.write("      $(\"#stop\").click(function(){\r\n");
      out.write("\r\n");
      out.write("            if(!ajaxLoading){\r\n");
      out.write("                  ajaxLoading=true;\r\n");
      out.write("                 $(\"#waiting\").show();\r\n");
      out.write("                 $.ajax({\r\n");
      out.write("                           url: \"stopServer.action\",\r\n");
      out.write("                           cache:false,\r\n");
      out.write("                           type:\"post\",\r\n");
      out.write("                           success:function(result) {\r\n");
      out.write("                              if(result == \"success\"){\r\n");
      out.write("                                   alert(\"server stopped\");\r\n");
      out.write("                                     $(\"#serverImage\").find(\"img\").attr(\"src\",\"images/admin/server11stop.png\");\r\n");
      out.write("                                   $(\"#server\").find(\"div\").css(\"backgroundImage\", \"url(images/server/server2.png)\");\r\n");
      out.write("                               }else  if(result == \"error\"){\r\n");
      out.write("                                   alert(\"error occurred\");\r\n");
      out.write("                              }else  if(result == \"input\"){\r\n");
      out.write("                                   alert(\"Server has been already stopped!\");\r\n");
      out.write("                              }else if(result == \"does_not_stopped\"){\r\n");
      out.write("                                  alert(\"Server has not been stopped!\");\r\n");
      out.write("                               }\r\n");
      out.write("                                 $(\"#waiting\").hide();\r\n");
      out.write("                            }\r\n");
      out.write("                 });\r\n");
      out.write("           ajaxLoading=false;\r\n");
      out.write("          }\r\n");
      out.write("      }) ;\r\n");
      out.write("})\r\n");
      out.write("</script>\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("\r\n");
      out.write("    #grayBox {\r\n");
      out.write("        z-index: 100;\r\n");
      out.write("    }\r\n");
      out.write("\r\n");
      out.write("    #hello {\r\n");
      out.write("        float:left;\r\n");
      out.write("        width:980px;\r\n");
      out.write("        text-align:center;\r\n");
      out.write("        border:black solid 0px;\r\n");
      out.write("        margin-top:50px !important;\r\n");
      out.write("        /*margin-left: 390px;*/\r\n");
      out.write("        font-size:24px;\r\n");
      out.write("        /*font-family:cursive;*/\r\n");
      out.write("        font-style:italic;\r\n");
      out.write("        margin-bottom:30px;\r\n");
      out.write("    }\r\n");
      out.write("\r\n");
      out.write("    #start,#stop {\r\n");
      out.write("        cursor: pointer;\r\n");
      out.write("    }\r\n");
      out.write("        /*#stop{*/\r\n");
      out.write("        /*float:right;*/\r\n");
      out.write("        /*width:50px;*/\r\n");
      out.write("    /*}*/\r\n");
      out.write("    /*#start{*/\r\n");
      out.write("        /*float:left;*/\r\n");
      out.write("        /*width:50px;*/\r\n");
      out.write("    /*}*/\r\n");
      out.write("\r\n");
      out.write("    ");
      out.write("\r\n");
      out.write("    /*#stop{*/\r\n");
      out.write("        /*float:right;*/\r\n");
      out.write("        /*width:45px;*/\r\n");
      out.write("        /*height:45px;*/\r\n");
      out.write("        /*background-image:url(\"images/server/Stop1.png\");*/\r\n");
      out.write("    /*}*/\r\n");
      out.write("\r\n");
      out.write("    /*#start{*/\r\n");
      out.write("        /*float:left;*/\r\n");
      out.write("        /*width:45px;*/\r\n");
      out.write("        /*height:45px;*/\r\n");
      out.write("        /*background-image:url(\"images/server/Go1.png\");*/\r\n");
      out.write("    /*}*/\r\n");
      out.write("</style>\r\n");
      out.write("   <div id=\"grayBox\"></div>\r\n");
      out.write("   <div id=\"waiting\"></div>\r\n");
      out.write("<div id=\"hello\">\r\n");
      out.write("    WELCOME    <span style=\"margin-left:10px;margin-right:10px;\" >");
      if (_jspx_meth_s_005fproperty_005f0(_jspx_page_context))
        return;
      out.write(" </span> !!!\r\n");
      out.write("</div>\r\n");
      out.write("<div style=\"float: left;display: block;width:100px;margin-left: 156px;\">\r\n");
      out.write("    <div  id=\"start\" style=\"border:black solid 0px;width:74px;height:74px;float:left;margin-right:0px;margin-top:62px;margin-left:20px;\">\r\n");
      out.write("        <img src=\"");
      out.print(request.getContextPath());
      out.write("/images/server/Go111.png\" title=\"Click to START\" width=\"74px\" height=\"74px\" alt=\"\" />\r\n");
      out.write("    </div>\r\n");
      out.write("    <div style=\"border:black solid 0px;width:76px;height:38px;background-image:url('images/server/st111.png');float:left;margin-left:20px;\"></div>\r\n");
      out.write("</div>\r\n");
      out.write("\r\n");
      out.write("<div style=\"border:black solid 0px;width:141px; margin: 30px 160px 0;padding-top:0px;height:160px;float:left;\" id=\"serverImage\">\r\n");
      out.write("    <img src=\"");
      out.print(request.getContextPath());
      out.write("/images/admin/server11stop.png\" alt=\"acs server\"/>\r\n");
      out.write("    ");
      out.write("\r\n");
      out.write("         ");
      out.write("\r\n");
      out.write("         ");
      out.write("\r\n");
      out.write("    ");
      out.write("\r\n");
      out.write("</div>\r\n");
      out.write("<div style=\"float: left;display: block;width: 100px;\">\r\n");
      out.write("    <div id=\"stop\" style=\"border:black solid 0px;width:74px;height:74px;float:left;margin-top:62px;margin-left: 10px;\">\r\n");
      out.write("        <img src=\"");
      out.print(request.getContextPath());
      out.write("/images/server/Stop111.png\" title=\"Click to STOP\" width=\"74px\" height=\"74px\" alt=\"\" />\r\n");
      out.write("    </div>\r\n");
      out.write("    <div style=\"border:black solid 0px;width:76px;height:38px;background-image:url('images/server/stp111.png');float:left;margin-left: 15px;\"></div>\r\n");
      out.write("\r\n");
      out.write("</div>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_s_005fproperty_005f0(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  s:property
    org.apache.struts2.views.jsp.PropertyTag _jspx_th_s_005fproperty_005f0 = (org.apache.struts2.views.jsp.PropertyTag) _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.get(org.apache.struts2.views.jsp.PropertyTag.class);
    _jspx_th_s_005fproperty_005f0.setPageContext(_jspx_page_context);
    _jspx_th_s_005fproperty_005f0.setParent(null);
    // /pages/admin/startServer.jsp(148,66) name = value type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
    _jspx_th_s_005fproperty_005f0.setValue("#session.user.username");
    int _jspx_eval_s_005fproperty_005f0 = _jspx_th_s_005fproperty_005f0.doStartTag();
    if (_jspx_th_s_005fproperty_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
      _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
      return true;
    }
    _005fjspx_005ftagPool_005fs_005fproperty_0026_005fvalue_005fnobody.reuse(_jspx_th_s_005fproperty_005f0);
    return false;
  }
}
