/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: ......
 * Generated at: 2022-11-10 06:45:16 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.Map;

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

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    if (_el_expressionfactory == null) {
      synchronized (this) {
        if (_el_expressionfactory == null) {
          _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        }
      }
    }
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    if (_jsp_instancemanager == null) {
      synchronized (this) {
        if (_jsp_instancemanager == null) {
          _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
        }
      }
    }
    return _jsp_instancemanager;
  }

  public void _jspInit() {
  }

  public void _jspDestroy() {
  }

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

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.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("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write(" <head>\r\n");
      out.write(" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\r\n");
      out.write(" <META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write(" <META http-equiv=\"pragma\" content=\"no-cache\">\r\n");
      out.write(" <META http-equiv=\"cache-control\" content=\"no-cache\">\r\n");
      out.write(" <META http-equiv=\"expires\" content=\"0\">\r\n");
      out.write("<script type=\"text/javascript\" src=\"js/myjs/myrpc.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"js/jquery/jquery.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"js/jquery/json.js\"></script>\r\n");
      out.write("<title>用户授权</title>\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("<h2 align=\"center\">用户授权</h2>\r\n");
      out.write("<form id=\"regform\" name=\"regform\" method=\"post\" action=\"upload\" ENCTYPE=\"multipart/form-data\">\r\n");
      out.write("\t<table align=\"center\" >\r\n");
      out.write("\t\t <tr>\r\n");
      out.write("\t\t \t<td>客户编码：</td>\r\n");
      out.write("\t\t \t<td><input  name=\"txt_customercode\" type=\"text\" id=\"txt_customercode\" tabindex=\"5\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t </tr>\r\n");
      out.write("\t\t <tr>\t\r\n");
      out.write("\t\t \t<td>客户名称：</td>\r\n");
      out.write("\t\t \t<td><input name=\"txt_customername\" type=\"text\" id=\"txt_customername\" tabindex=\"10\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t </tr>\r\n");
      out.write("\t\t <tr>\r\n");
      out.write("\t\t \t<td>客户标识码：</td>\r\n");
      out.write("\t\t \t<td colspan=\"2\" ><input name=\"txt_customerid\" type=\"text\" id=\"txt_customerid\" tabindex=\"15\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t </tr>\r\n");
      out.write("\t\t <tr>\t\r\n");
      out.write("\t\t \t<td>服务器数：</td>\r\n");
      out.write("\t\t \t<td><input name=\"txt_customercount3\" type=\"text\" id=\"txt_customercount3\" value=\"0\" tabindex=\"20\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t <tr>\t\r\n");
      out.write("\t\t \t<td>PC端用户数：</td>\r\n");
      out.write("\t\t \t<td><input name=\"txt_customercount\" type=\"text\" id=\"txt_customercount\" tabindex=\"20\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t<tr>\t\r\n");
      out.write("\t\t \t<td>移动端用户数：</td>\r\n");
      out.write("\t\t \t<td><input name=\"txt_customercount2\" type=\"text\" id=\"txt_customercount2\" tabindex=\"20\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t<tr> \r\n");
      out.write("\t\t\t<td>有效期截止：</td>\r\n");
      out.write("\t\t\t<td colspan=\"2\" ><input name=\"txt_customerenddate\" type=\"text\" id=\"txt_customerenddate\" tabindex=\"30\" style=\"width:300px; height:25px\" /></td>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t\t<td>授权码：</td>\r\n");
      out.write("\t\t\t<td><input name=\"txt_customerregcode\" id=\"txt_customerregcode\" type=\"text\" readonly=\"true\" style=\"width:300px; height:35px\" /></td>\r\n");
      out.write("\t\t</tr> \r\n");
      out.write("\t\t\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t<tr></tr>\r\n");
      out.write("\t\t<tr>\r\n");
      out.write("\t\t\t<td><button type=\"button\" name=\"btn_code\" onclick=\"gencode()\">生成授权码</button></td>\r\n");
      out.write(" \t\t\t<td><button type=\"button\" name=\"btn_save\" onclick=\"savereg()\">保存为授权文件</button></td>\r\n");
      out.write(" \t\t\t\r\n");
      out.write("\t\t</tr>\r\n");
      out.write("\t\t\r\n");
      out.write(" \t</table>\r\n");
      out.write(" \t<p></p>\r\n");
      out.write(" \t\r\n");
      out.write(" \t\r\n");
      out.write("</form>\r\n");
      out.write("<script  language=\"javascript\">\r\n");
      out.write("function checkinfo()\r\n");
      out.write("\t{\r\n");
      out.write("\t\t\r\n");
      out.write("\t\tvar customercode=$E(\"txt_customercode\");\r\n");
      out.write("\t\tif (customercode.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入客户编号\");\r\n");
      out.write("\t\t\t$E(\"txt_customercode\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\r\n");
      out.write("\t\tvar customername=$E(\"txt_customername\");\r\n");
      out.write("\t\tif (customername.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入客户名称 \");\r\n");
      out.write("\t\t\t$E(\"txt_customername\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tvar customerid=$E(\"txt_customerid\");\r\n");
      out.write("\t\tif (customerid.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入客户请别码 \");\r\n");
      out.write("\t\t\t$E(\"txt_customerid\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tvar customercount=$E(\"txt_customercount\");\r\n");
      out.write("\t\tif (customercount.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入PC端用户数 \");\r\n");
      out.write("\t\t\t$E(\"txt_customercount\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tvar customercount2=$E(\"txt_customercount2\");\r\n");
      out.write("\t\tif (customercount2.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入移动端用户数 \");\r\n");
      out.write("\t\t\t$E(\"txt_customercount2\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tvar customercount3=$E(\"txt_customercount3\");\r\n");
      out.write("\t\tif (customercount3.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入服务器数 \");\r\n");
      out.write("\t\t\t$E(\"txt_customercount3\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tvar customerenddate=$E(\"txt_customerenddate\");\r\n");
      out.write("\t\tif (customerenddate.value==\"\") \r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\talert(\"请输入有效期截止 \");\r\n");
      out.write("\t\t\t$E(\"txt_customerenddate\").focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\treturn true;\r\n");
      out.write("\t}\r\n");
      out.write("\t\r\n");
      out.write("function gencode(){\r\n");
      out.write("\t\r\n");
      out.write("\tif (checkinfo()){\r\n");
      out.write("\t\tvar customercode=$E(\"txt_customercode\").value;\r\n");
      out.write("\t\tvar customerid=$E(\"txt_customerid\").value;\r\n");
      out.write("\t\tvar customername=$E(\"txt_customername\").value;\r\n");
      out.write("\t\tvar customerenddate=$E(\"txt_customerenddate\").value;\r\n");
      out.write("\t\tvar customercount=$E(\"txt_customercount\").value;\r\n");
      out.write("\t\tvar customercount2=$E(\"txt_customercount2\").value;\r\n");
      out.write("\t\tvar customercount3=$E(\"txt_customercount3\").value;\r\n");
      out.write("\t\tvar data=$myrpc('wnp.reg.serverReg','getRegCode2', \r\n");
      out.write("\t\t\t\t{'customer_code':customercode, \r\n");
      out.write("\t\t\t\t 'customer_id':customerid,\r\n");
      out.write("\t\t\t\t 'customer_name':customername,\r\n");
      out.write("\t\t\t\t 'customer_enddate':customerenddate,\r\n");
      out.write("\t\t\t\t 'customer_count':customercount,\r\n");
      out.write("\t\t\t\t 'customer_count2':customercount2,\r\n");
      out.write("\t\t\t\t 'customer_count3':customercount3\r\n");
      out.write("\t\t\t\t });\r\n");
      out.write("\t\t\r\n");
      out.write("\t\t$E(\"txt_customerregcode\").value=data.regcode;\r\n");
      out.write("\t}\r\n");
      out.write("\t\t\t\r\n");
      out.write("}\r\n");
      out.write("function savereg(){\r\n");
      out.write("\t\r\n");
      out.write("\tvar customerregcode=$E(\"txt_customerregcode\");\r\n");
      out.write("\tif (customerregcode.value==\"\") \r\n");
      out.write("\t{\r\n");
      out.write("\t\talert(\"请先产生授权码 \");\r\n");
      out.write("\t\treturn ;\r\n");
      out.write("\t}\t\r\n");
      out.write("\tvar customercode=$E(\"txt_customercode\").value;\r\n");
      out.write("\tvar customerid=$E(\"txt_customerid\").value;\r\n");
      out.write("\tvar customername=$E(\"txt_customername\").value;\r\n");
      out.write("\tvar customerenddate=$E(\"txt_customerenddate\").value;\r\n");
      out.write("\tvar customercount=$E(\"txt_customercount\").value;\r\n");
      out.write("\tvar customercount2=$E(\"txt_customercount2\").value;\r\n");
      out.write("\tvar customercount3=$E(\"txt_customercount3\").value;\r\n");
      out.write("\tvar customerregcode=$E(\"txt_customerregcode\").value;\r\n");
      out.write("\tvar data=$myrpc('wnp.reg.serverReg','getRegFile', \r\n");
      out.write("\t\t\t{'customer_code':customercode, \r\n");
      out.write("\t\t\t 'customer_id':customerid,\r\n");
      out.write("\t\t\t 'customer_name':customername,\r\n");
      out.write("\t\t\t 'customer_enddate':customerenddate,\r\n");
      out.write("\t\t\t 'customer_count':customercount,\r\n");
      out.write("\t\t\t 'customer_count2':customercount2,\r\n");
      out.write("\t\t\t 'customer_count3':customercount3,\r\n");
      out.write("\t\t\t 'customer_regcode':customerregcode\r\n");
      out.write("\t\t\t });\r\n");
      out.write("\tif (data.success)\r\n");
      out.write("\t{\r\n");
      out.write("\t\talert(\"成功生成授权文件，位于 \"+data.path);\r\n");
      out.write("\t}else{\r\n");
      out.write("\t\talert(\"授权文件生成失败\");\r\n");
      out.write("\t}\r\n");
      out.write("\t\t\r\n");
      out.write("}\r\n");
      out.write("\r\n");
      out.write("function openreg(){\r\n");
      out.write("\t//$E(\"file1\").click();\r\n");
      out.write("\tvar filename=$E(\"file1\").value;\r\n");
      out.write("\t\r\n");
      out.write("\tif (filename!=\"\")\r\n");
      out.write("\t{\t\r\n");
      out.write("\t\t$E(\"regform\").submit();\r\n");
      out.write("\t}else\r\n");
      out.write("\t{\r\n");
      out.write("\t\talert(\"请先添加授权申请文件\");\r\n");
      out.write("\t}\r\n");
      out.write("\t\t\r\n");
      out.write("}\r\n");
      out.write(" \r\n");
      out.write(" </script>\r\n");
      out.write("</body>\r\n");
      out.write("</html>");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
