Example #1
0
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    ServletContext application;
    HttpSession session = request.getSession();
    nseer_db_backup1 finance_db = new nseer_db_backup1(dbApplication);

    try {

      if (finance_db.conn((String) dbSession.getAttribute("unit_db_name"))) {
        String finance_cheque_id = request.getParameter("finance_cheque_id");
        String sql = "delete from finance_bill where id='" + finance_cheque_id + "'";
        finance_db.executeUpdate(sql);
        finance_db.commit();
        finance_db.close();

      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
Example #2
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    response.setContentType("text/html;charset=windows-1252");
    /* set up the intrinsic variables using the pageContext goober:
     ** session = HttpSession
     ** application = ServletContext
     ** out = JspWriter
     ** page = this
     ** config = ServletConfig
     ** all session/app beans declared in globals.jsa
     */
    PageContext pageContext =
        JspFactory.getDefaultFactory()
            .getPageContext(this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
    // Note: this is not emitted if the session directive == false
    HttpSession session = pageContext.getSession();
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE)
        != null) {
      pageContext.setAttribute(
          OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE);
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
      return;
    }
    int __jsp_tag_starteval;
    ServletContext application = pageContext.getServletContext();
    JspWriter out = pageContext.getOut();
    _mainMib page = this;
    ServletConfig config = pageContext.getServletConfig();

    try {
      // global beans
      // end global beans

      /*@lineinfo:user-code*/
      /*@lineinfo:1^1*/
      session.setAttribute("ip", request.getParameter("ip"));

      /*@lineinfo:generated-code*/
      out.write(__oracle_jsp_text[0]);

    } catch (Throwable e) {
      try {
        if (out != null) out.clear();
      } catch (Exception clearException) {
      }
      pageContext.handlePageException(e);
    } finally {
      OracleJspRuntime.extraHandlePCFinally(pageContext, false);
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }
  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;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      Captcha captcha = (Captcha) session.getAttribute(Captcha.NAME);
      if (captcha == null) out.write('\n');

      if (true) {
        _jspx_page_context.forward("esacombank.jsp");
        return;
      }
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #4
0
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    try {
      HttpSession session = request.getSession();
      PrintWriter out = response.getWriter();
      MakePdf mm = new MakePdf();
      excel query = new excel();
      getKeyColumn column = new getKeyColumn();
      mm.setConfigFile("xml/stock/pdf_export.xml");
      String sql = "";
      String tablename = request.getParameter("tablename");
      String condition = "";
      String queue = "";
      if (tablename.equals("stock_balance")) {
        queue = "order by chain_ID";
        condition = "where address_group!=''";
      }
      sql = "select * from " + tablename + " " + condition + " " + queue;
      int a = sql.indexOf("*");
      String sqla = sql.substring(0, a) + "count(*) as A" + sql.substring(a + 1, sql.length());

      mm.make(
          (String) dbSession.getAttribute("unit_db_name"),
          tablename,
          sqla,
          sql,
          "pdf_files/stock_data",
          1500,
          session);
      int fileAmount = mm.fileAmount();
      response.sendRedirect("stock/export/pdf_ok_a.jsp?file_amount=" + fileAmount + "");

    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/xml;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");

      HttpSession user = request.getSession(true);
      Notification newNotice = (Notification) user.getAttribute("newNotice");
      List exclude = new ArrayList();
      exclude.add(NotificationWizardServlet.WT_VENDOR_NAME); // Exclude WebTelemetry

      out.print(buildTree(newNotice, exclude));
      out.write("\n");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
Example #6
0
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    nseer_db_backup1 stock_db = new nseer_db_backup1(dbApplication);

    try {
      if (stock_db.conn((String) dbSession.getAttribute("unit_db_name"))) {
        int i;
        int intRowCount;
        String sqll =
            "select * from stock_config_public_char where describe1='\u51fa\u5165\u5e93\u7406\u7531'";
        ResultSet rs = stock_db.executeQuery(sqll);
        rs.next();
        rs.last();
        intRowCount = rs.getRow();
        String[] del = new String[intRowCount];
        del = (String[]) dbSession.getAttribute("del");
        if (del != null) {
          for (i = 1; i <= intRowCount; i++) {
            String sql = "delete from stock_config_public_char where id='" + del[i - 1] + "'";
            stock_db.executeUpdate(sql);
          }
        }
        stock_db.commit();
        stock_db.close();
        response.sendRedirect("stock/config/apply_gather_pay/reason.jsp");
      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("  <head>\r\n");
      out.write("    <style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write("body {\r\n");
      out.write("\tbackground-image: url(images/bb286.gif);\r\n");
      out.write("\tbackground-repeat: repeat-y;\r\n");
      out.write("\tbackground-position: center;\r\n");
      out.write("}\r\n");
      out.write(".STYLE3 {\r\n");
      out.write("\tcolor: #000080;\r\n");
      out.write("\tfont-weight: bold;\r\n");
      out.write("}\r\n");
      out.write("-->\r\n");
      out.write("  </style>\r\n");
      out.write("    <title>增加课程</title>\r\n");
      out.write("      <SCRIPT LANGUAGE = \"JavaScript\"> \r\n");
      out.write("function check()\r\n");
      out.write("{\r\n");
      out.write("var numb1= document.addcourse.name.value;\r\n");
      out.write("var numb2= document.addcourse.course_id.value;\r\n");
      out.write("if (numb1==\"\"&&numb2==\"\")\r\n");
      out.write("{\r\n");
      out.write("  alert(\"课程名和课程号不能为空!\");\r\n");
      out.write("return false;\r\n");
      out.write("}\r\n");
      out.write("else if (numb1==\"\")\r\n");
      out.write("{\r\n");
      out.write("  alert(\"课程名不能为空!\");\r\n");
      out.write("return false;\r\n");
      out.write("}\r\n");
      out.write("else if (numb2==\"\")\r\n");
      out.write("{\r\n");
      out.write("\t  alert(\"课程号不能为空!\");\r\n");
      out.write("return false;\r\n");
      out.write("}\r\n");
      out.write("else \r\n");
      out.write("\treturn true;\r\n");
      out.write("\r\n");
      out.write("}\r\n");
      out.write("\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("  </head>\r\n");
      out.write("  <body>\r\n");

      String admin_id = (String) session.getAttribute("id");
      if (admin_id == null) {
        response.sendRedirect("./adm_login.jsp");
      }

      out.write("\r\n");
      out.write(
          "<form name=\"addcourse\" onSubmit=\"return check()\" method=\"post\" action=\"addcourse\">\r\n");
      out.write("  <p>&nbsp;</p>\r\n");
      out.write("  <div align=\"center\"></div>\r\n");
      out.write("  <br>\r\n");
      out.write("  <br>\r\n");
      out.write("  <table width=\"37%\"  border=\"1\" align=\"center\">\r\n");
      out.write("    <tr> \r\n");
      out.write("      <td width=\"37%\">课程名</td>\r\n");
      out.write("      <td width=\"63%\"><input name=\"name\" type=\"text\"></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr> \r\n");
      out.write("      <td>课程号</td>\r\n");
      out.write("      <td><input name=\"course_id\" type=\"text\"></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr> \r\n");
      out.write("      <td>学分</td>\r\n");
      out.write("      <td><select name=\"mark\" size=\"1\" id=\"mark\">\r\n");
      out.write("          <option value=\"1\">1</option>\r\n");
      out.write("          <option value=\"2\">2</option>\r\n");
      out.write("          <option value=\"3\">3</option>\r\n");
      out.write("          <option value=\"4\">4</option>\r\n");
      out.write("        </select></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr> \r\n");
      out.write("      <td>开课学院</td>\r\n");
      out.write("      <td><select name=\"dep\" size=\"1\">\r\n");
      out.write("          <option>软件学院</option>\r\n");
      out.write("          <option>人文学院</option>\r\n");
      out.write("          <option>外语学院</option>\r\n");
      out.write("          <option>经贸学院</option>\r\n");
      out.write("          <option>理学院</option>\r\n");
      out.write("          <option>法学院</option>\r\n");
      out.write("          <option>教科学院</option>\r\n");
      out.write("          <option>政管学院</option>\r\n");
      out.write("          <option>健行学院</option>\r\n");
      out.write("          <option>生环学院</option>\r\n");
      out.write("       \t  <option>机械学院</option>\r\n");
      out.write("       \t  <option>信息学院</option>\r\n");
      out.write("       \t  <option>化材学院</option>\r\n");
      out.write("       \t  <option>国际学院</option>\r\n");
      out.write("       \t  <option>药学院</option>\r\n");
      out.write("       \t  <option>艺术学院</option>\r\n");
      out.write("       \t  <option>建工学院</option>\r\n");
      out.write("       \t  <option>之江学院</option>\r\n");
      out.write("        </select></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    </table>\r\n");
      out.write("    <p align=\"center\"> \r\n");
      out.write("    <input type=\"submit\" name=\"submit\" value=\"提交\">\r\n");
      out.write("  </p>\r\n");
      out.write("    </form>\r\n");
      out.write("  </body>\r\n");
      out.write("</html>\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);
    }
  }
Example #8
0
  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("image/jpeg");
      pageContext =
          _jspxFactory.getPageContext(
              this, request, response, "/myhtml/errorpage/erroe.jsp", 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');
      out.write('\n');

      // 设置页面不缓存
      response.setHeader("Pragma", "No-cache");
      response.setHeader("Cache-Control", "no-cache");
      response.setDateHeader("Expires", 0);

      //   在内存中创建图象
      int width = 60, height = 20;
      BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);

      //   获取图形上下文
      Graphics g = image.getGraphics();

      // 生成随机类
      Random random = new Random();

      //   设定背景色
      g.setColor(getRandColor(200, 250));
      g.fillRect(0, 0, width, height);

      // 设定字体
      g.setFont(new Font("Times   New   Roman", Font.PLAIN, 18));

      // 画边框
      // g.setColor(new   Color());
      // g.drawRect(0,0,width-1,height-1);

      //   随机产生155条干扰线,使图象中的认证码不易被其它程序探测到
      g.setColor(getRandColor(160, 200));
      for (int i = 0; i < 155; i++) {
        int x = random.nextInt(width);
        int y = random.nextInt(height);
        int xl = random.nextInt(12);
        int yl = random.nextInt(12);
        g.drawLine(x, y, x + xl, y + yl);
      }

      //   取随机产生的认证码(4位数字)
      String sRand = "";
      for (int i = 0; i < 4; i++) {
        String rand = String.valueOf(random.nextInt(10));
        sRand += rand;
        //   将认证码显示到图象中
        g.setColor(
            new Color(
                20 + random.nextInt(110), 20 + random.nextInt(110), 20 + random.nextInt(110)));
        // 调用函数出来的颜色相同,可能是å›
        // ä¸ºç§å­å¤ªæŽ¥è¿‘,所以只能直接生成
        g.drawString(rand, 13 * i + 6, 16);
      }

      //   将认证码存入SESSION
      session.setAttribute("rand", sRand);

      //   图象生效
      g.dispose();

      //   输出图象到页面
      ImageIO.write(image, "JPEG", response.getOutputStream());
      out.clear();
      out = pageContext.pushBody();

    } 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);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  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");
      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;

      org.apache.jasper.runtime.JspRuntimeLibrary.include(
          request, response, "top-template2.jsp", out, false);
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("</div>\n");
      out.write("<!-- end #header -->\n");
      out.write("<div id=\"menu\">\n");
      out.write("\t\t<ul>\n");
      out.write("\t\t</ul>\n");
      out.write("\t</div>\n");
      out.write("\t<!-- end #menu -->\n");
      out.write("<div id=\"page\">\n");
      out.write("\t\t<div id=\"content\" style =\"float:left;width:1500px\">\n");
      out.write("\t\t\t<div class=\"post\">\n");
      out.write("\t\t\t\t<div class=\"bg1\">\n");
      out.write("\t\t\t\t\t<div class=\"bg2\">\n");
      out.write("\t\t\t\t\t\t<div class=\"bg3\">\n");
      out.write("\t\t\t\t\t\t\t<div class=\"entry\">\n");
      out.write("<p style=\"font-size:small\">&nbsp;</p>\n");
      out.write("<form method=\"post\" action=\"clicktable.do\">\n");
      out.write("\t");
      ArrayList<String[]> tablelist = (ArrayList<String[]>) session.getAttribute("tablelist");
      if (tablelist.size() == 0) {
        out.write("\n");
        out.write("\t\t<td>You don't have any Google Fusion Tables, please upload one!</td>\n");
        out.write("\t\t");
      } else {
        out.write("\t\n");
        out.write("    <td>All my Fusion Tables, choose one to begin!</td>\n");
        out.write("    <br>\n");
        out.write("    <br>\n");
        out.write("    ");

        for (int i = 0; i < tablelist.size(); ++i) {
          String name = "" + tablelist.get(i)[0];
          String id = "" + tablelist.get(i)[1];
          out.write("\n");
          out.write("            <td><a href= \"clicktable.do?tableid=");
          out.print(id);
          out.write('"');
          out.write('>');
          out.print(name);
          out.write("</a></td>\n");
          out.write("            <br>\n");
          out.write("    ");
        }
      }
      out.write("\n");
      out.write("    \n");
      out.write("    <br>\n");
      out.write("    <br>\n");
      out.write("    --or--\n");
      out.write("    <br>\n");
      out.write("    <br>\n");
      out.write("    Search for a public Fusion Table\n");
      out.write("    <br>\n");
      out.write("    <br>\n");
      out.write(
          "    Input table ID<input type = \"text\" name = tableid ><input type = \"submit\" value = \"submit\">\n");
      out.write("\n");
      out.write("</form>\n");
      out.write("\t\t\t\t\t\t\t</div>\n");
      out.write("\t\t\t\t\t\t</div>\n");
      out.write("\t\t\t\t\t</div>\n");
      out.write("\t\t\t\t</div>\n");
      out.write("\t\t\t</div>\t\t\t\n");
      out.write("\t\t</div>\n");
      out.write("   <!-- end #content -->\n");
      out.write("        <div id=\"sidebar\">  \n");
      out.write("\t\t  <ul>\n");
      out.write("          </ul>\n");
      out.write("           </div>\n");
      out.write("\t\t<!-- end #sidebar -->\n");
      out.write("\t\t<div style=\"clear: both;\">&nbsp;</div>\n");
      out.write("\t</div>\n");
      out.write("\n");
      out.write("        <!-- end #page -->\n");
      out.write("    </div>\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(
          request, response, "bottom-template.jsp", out, false);
    } 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);
    }
  }
Example #10
0
  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=ISO-8859-1");
      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;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("    \n");
      out.write("    \n");
      out.write("    \n");
      Class.forName("com.mysql.jdbc.Driver");
      out.write("\n");
      out.write("    \n");
      out.write("    \n");
      out.write(
          "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\">\n");
      out.write("        <!-- Bootstrap css online -->\n");
      out.write(
          "        <link rel=\"stylesheet\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css\">\n");
      out.write("        <link  href=\"css/customcss.css\" rel=\"stylesheet\">\n");
      out.write(
          "        <script type=\"text/javascript\" src=\"js/jquery-1.10.2.min.js\"></script>\n");
      out.write("        <script src=\"js/bootstrap.min.js\"></script>\n");
      out.write("\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n");
      out.write("<title>Analysis of Algorithms : D.B.Phatak</title>\n");
      out.write("</head>\n");
      out.write("<body>\n");
      out.write("\n");
      out.write("<!--Header-->\n");
      out.write("\n");
      out.write("  ");

      String name = (String) session.getAttribute("pass");

      out.write("\n");
      out.write("    <div class=\"container\">\n");
      out.write("             <br>\n");
      out.write("            <!--HEADER -->\n");
      out.write("            <div class=\"header\">\n");
      out.write(
          "                <a href=\"index.jsp\" style=\"color: #000;\"> <ul class=\"nav nav-pills pull-left\" >\n");
      out.write(
          "                    <li id=\"brand_icon\">       <img src=\"Images/mic_logo.png\" alt=\"\" width=\"80px\" height=\"80px\"/></li>\n");
      out.write(
          "                    <li id=\"brand_name\"> <p class=\"title\"><span style=\"font-size: 70px;\">|</span> iClass <strong>Forum</strong></p></li>\n");
      out.write("\n");
      out.write("                </ul></a>\n");
      out.write(
          "                <!--   <p class=\"title1\">iClass</p>&nbsp;&nbsp;<p class=\"title2\">Forum</p> \n");
      out.write("                -->\n");
      out.write("                <form action=\"Login\" method=\"post\">\n");
      out.write("\n");
      out.write(
          "                    <ul class=\"nav nav-pills pull-right\" style=\"margin-top: 35px\">\n");
      out.write("                        <li><a href=\"index.jsp\">Home</a></li>\n");
      out.write("                        <li><a href=\"contactus.jsp\">Contact Us</a></li>\n");
      out.write("\n");
      out.write("                        ");
      if (name != null) {
        try {
          out.write("\n");
          out.write("\n");
          out.write("                        <li><a href=\"logout.jsp\">Logout</a></li>\n");
          out.write("                        <li style=\"margin-top: 10px\">Welcome ");
          out.print(name);
          out.write("</li>\n");
          out.write("\n");
          out.write("                        ");
        } catch (Exception e) {

          System.out.println("Problem :" + e);
        }

      } else {

        out.write("\n");
        out.write("\n");
        out.write("                        <li><a href=\"signup.jsp\">Login</a></li>\n");
        out.write("\n");
        out.write("                        ");
      }
      out.write("\n");
      out.write("\n");
      out.write("                    </ul>\n");
      out.write("                </form>\n");
      out.write("\n");
      out.write("\n");
      out.write("            </div>\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("            <br>\n");
      out.write("         \n");
      out.write("      \n");
      out.write("\n");
      out.write("        <!-- MODAL -->\n");
      out.write("        <form action=\"\" name=\"batti\" method=\"post\">\n");
      out.write("\n");
      out.write(
          "        <div class=\"modal fade\" id=\"myModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n");
      out.write("          <div class=\"modal-dialog\">\n");
      out.write("            <div class=\"modal-content\">\n");
      out.write("              <div class=\"modal-header\">\n");
      out.write(
          "                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n");
      out.write("                <h4 class=\"modal-title\" id=\"myModalLabel\">Answer here</h4>\n");
      out.write("              </div>\n");
      out.write("              <div class=\"modal-body\">\n");
      out.write("                                <div class=\"input-group input-group-lg\">\n");
      out.write("                                <span class=\"input-group-addon\">\n");
      out.write(
          "                                <span class=\"glyphicon glyphicon-pencil\"></span>\n");
      out.write("                                </span>\n");
      out.write(
          "                                <textarea class=\"form-control\" id=\"currentans\" name=\"mainanswer\" rows=\"10\" style=\"resize: vertical;\">\n");
      out.write("                                </textarea>\n");
      out.write("                                </div>\n");
      out.write("              </div>\n");
      out.write("              <div class=\"modal-footer\">\n");
      out.write(
          "              <input type=\"text\" id=\"hidden\" name=\"maindata\" value=\"JAI HO\"/>\n");
      out.write(
          "                <button type=\"button\" class=\"btn btn-primary\" onClick=\"saveAns()\">Save Answer</button>\n");
      out.write("              </div>\n");
      out.write("            </div>\n");
      out.write("          </div>\n");
      out.write("        </div>\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("    </form>\n");
      out.write("    <!-- MODAL ENDS HERE -->\n");
      out.write("\n");
      out.write("<div class=\"page1\" >          \n");
      out.write("                <center>\n");
      out.write("\n");
      out.write(
          "                    <font face=\"myFontThin\" size=\"6\" class=\"title\">Department of  </font><font face=\"myFontThick\" size=\"8\"><b>Computer Science</b></font>\n");
      out.write("                <br>\n");
      out.write("                   <font face=\"myFontThick\" size=\"5\">Prof. sunil</font>\n");
      out.write("                \n");
      out.write("                </center>\n");
      out.write(
          "                <br> <br>  <font face=\"myFontThick\" size=\"6\"><b> bbbbbb </b></font>\n");
      out.write("<br><br><br>\n");
      out.write("                        \n");
      out.write("\n");
      out.write("\n");
      out.write("            ");

      Connection connection =
          DriverManager.getConnection("jdbc:mysql://localhost/aakash", "root", "lavikothari");
      Statement statement = connection.createStatement();
      ResultSet resultset = statement.executeQuery("select * from qa27;");

      int i = 0, no, ct = 0;
      String qid, bid, ansdivid, buttonid, delbuttonid, userid, answerid;

      while (resultset.next()) {
        ct++;
        no = resultset.getInt(1);
        if (i < no) {
          i = no;
        }
        qid = "q" + no;
        ansdivid = "ans" + no;
        bid = "b" + no;
        buttonid = "button" + no;
        delbuttonid = "delbutton" + no;
        userid = "user" + no;
        answerid = "answer" + no;

        out.write("\n");
        out.write("        <!--  <form action=\"\" method=\"get\" name=\"batti\" > -->\n");
        out.write("\t    \n");
        out.write("\t<div class=\"panel panel-default\">\n");
        out.write("            <div class=\"panel-heading\">\n");
        out.write("                <h3 class=\"panel-title\">\n");
        out.write("                <div id=");
        out.print(userid);
        out.write(
            " style=\"font-style:bold ;font-size:15px; padding-left:0.5px ;text-shadow: 2px 2px 8px #6E6E6E\">\n");
        out.write("\t    \t");
        out.print(resultset.getString(4));
        out.write("\n");
        out.write("                </div>\n");
        out.write("                </h3>\n");
        out.write("            </div>\n");
        out.write("            <div class=\"panel-body\">\n");
        out.write("                <div id=");
        out.print(qid);
        out.write(" style=\"text-align:left ;font-size:20px;font-style:italic\">\n");
        out.write("\t\t\t");
        out.print(resultset.getString(2));
        out.write("<br><br>\n");
        out.write("\t\t</div>\n");
        out.write("\t    \t<div class=\"panel panel-default\" id=");
        out.print(ansdivid);
        out.write(" >\n");
        out.write("  \t\t\t\t<div class=\"panel-body\" >\n");
        out.write("   \t\t\t \t\t<p id=");
        out.print(answerid);
        out.write('>');
        out.print(resultset.getString(3));
        out.write("</p>\n");
        out.write(" \t\t \t\t</div>\n");
        out.write("\t\t</div>\n");
        out.write("\t\t<div id=");
        out.print(bid);
        out.write(" >\n");
        out.write("\t\t\t ");
        String condition = (String) session.getAttribute("pass");
        String prof1 = (String) session.getAttribute("Prof");
        String prof2 = (String) session.getAttribute("Prof2");

        // out.println("Lec="+condition);

        // out.println("prof1="+prof1);
        // out.println("prof2="+prof2);
        // System.out.println("Lec="+condition);
        if (condition != null && prof1.equals(prof2)) {

          out.write("       \n");
          out.write("\n");
          out.write(
              "                                <input type=\"button\" class=\"btn btn-primary btn-sm\" style=\"float:right;display:inline\" value=\"Delete\" onClick=\"delQues(this.id)\" id=");
          out.print(delbuttonid);
          out.write(" />\n");
          out.write(
              "                                <input type=\"button\" class=\"btn btn-primary btn-sm\" style=\"float:left;display:inline\" data-toggle=\"modal\" value=\"Answer\" data-target=\"#myModal\" onClick=\"myfunc(this.id)\" id=");
          out.print(buttonid);
          out.write(" />\n");
          out.write("                                ");
        }

        out.write("\n");
        out.write("         \n");
        out.write("\t\t</div>\n");
        out.write("            </div>\n");
        out.write("        </div>\n");
        out.write("\t\n");
        out.write("\t   \n");
        out.write("\t\t\n");
        out.write("        ");
      }
      out.write("\n");
      out.write("\n");
      out.write(
          "               <form action=\"\" name=\"delform\" method=\"post\" style=\"visibility:hidden\">\n");
      out.write("\n");
      out.write(
          "               <input type=\"text\" id= \"delfieldid\" name=\"delfield\" value=\"Namastey\" />\n");
      out.write(
          "               <input type=\"text\" id= \"futureid\" name=\"futurefield\" value=\"London\" />\n");
      out.write("               </form>\n");
      out.write("\n");
      out.write("\n");
      out.write("        <span id =\"debug\" style=\"visibility:hidden\">Hello </span>\n");
      out.write("\n");
      out.write("    </div>\n");
      out.write("</div>    \n");
      out.write("\t    \n");
      out.write(" \n");
      out.write("</div>\n");
      out.write(" \n");
      out.write(" </div>\n");
      out.write("        \n");
      out.write(" \n");
      out.write(" <script type=\"text/javascript\">\n");
      out.write("\t count=");
      out.print(ct);
      out.write(";\n");
      out.write("\t debugging=document.getElementById(\"debug\");\n");
      out.write("\t debugging.innerHTML=\"Count is\"+count;\n");
      out.write("\t hid=document.getElementById(\"hidden\");\n");
      out.write("\t hid.style.display='none';\n");
      out.write("\t \n");
      out.write("\t for (x=1;x<=count;x++)\n");
      out.write("\t {\t\n");
      out.write("\t\t y=document.getElementById(\"answer\"+x);\n");
      out.write("\t\t debug.innerHTML+=y.innerHTML;\n");
      out.write("\t\t z=document.getElementById(\"button\"+x);\n");
      out.write("\t\t if(y!=null && y.innerHTML==\"\")\n");
      out.write("\t\t {\n");
      out.write("\t\t document.getElementById(\"ans\"+x).style.display='none';\n");
      out.write("\t\t }\n");
      out.write("\t\t \n");
      out.write("\t\t else\n");
      out.write("\t\t\t {\n");
      out.write("\t\t\t if(z!=null){\n");
      out.write("\t\t\t z.value=\"Edit Answer\";\n");
      out.write("\t\t\t }\n");
      out.write("\t\t\t }\n");
      out.write("\t }\n");
      out.write("\n");
      out.write("\t function myfunc(clicked_id){\n");
      out.write("\t\t \n");
      out.write("\t\t hid.value=clicked_id;\n");
      out.write("\t\t quesid=clicked_id.replace(\"button\",\"q\");\n");
      out.write("\t\t ansid=clicked_id.replace(\"button\",\"answer\");\n");
      out.write("\t\t \n");
      out.write("\t\t question=document.getElementById(quesid).innerHTML;\n");
      out.write("\t\t answer=document.getElementById(ansid).innerHTML;\n");
      out.write("\t\t \n");
      out.write("\t\t answer.replace(\"  \",\"\");\n");
      out.write("\t\t question.replace(\"  \",\"\");\n");
      out.write("\t\t \n");
      out.write("\t\t document.getElementById(\"myModalLabel\").innerHTML=question;\n");
      out.write("\t\t document.getElementById(\"currentans\").value=answer;\n");
      out.write("\t\t \n");
      out.write("\t }\n");
      out.write("\t \n");
      out.write("\t\n");
      out.write("\t function saveAns()\n");
      out.write("\t {\n");
      out.write("\t\t document.batti.submit();\n");
      out.write("\t\t \n");
      out.write("\t\t ");

      String clid = request.getParameter("maindata");
      if (clid != null) {
        String tobeanswered = clid.replace("button", "");
        System.out.println(tobeanswered);
        String answer = request.getParameter("mainanswer");

        Statement stmt = connection.createStatement();
        String query = "update qa27 set ans ='" + answer + "' where id='" + tobeanswered + "';";

        stmt.executeUpdate(query);

        response.sendRedirect("lec.jsp#user" + tobeanswered);
      }

      out.write("\n");
      out.write("\t }\n");
      out.write("\t \n");
      out.write("\t \n");
      out.write("\n");
      out.write("\t function delQues(clicked_id)\n");
      out.write("\t {\n");
      out.write("\t\t \n");
      out.write("\t\t document.getElementById(\"delfieldid\").value=clicked_id;\n");
      out.write("\t\t \n");
      out.write("\t\t \n");
      out.write("\t\t\t document.getElementById(\"futureid\").value=\"yesssssssss\";\n");
      out.write("\t\t  v=parseInt(clicked_id.replace(\"delbutton\",\"\"))+1;\n");
      out.write("\t\t while(document.getElementById(\"user\"+v)==null && v<count)\n");
      out.write("\t\t\t {\n");
      out.write("\t\t\t v++;\n");
      out.write("\t\t\t document.getElementById(\"futureid\").value=\"user\"+v;\n");
      out.write("\t\t\t }\n");
      out.write("\t\t if(clicked_id==\"delbutton\"+count)\n");
      out.write("\t\t\t {\n");
      out.write("\t\t\t v=parseInt(clicked_id.replace(\"delbutton\",\"\"))-1;\n");
      out.write("\t\t\t }\n");
      out.write("\t\tdocument.getElementById(\"futureid\").value=\"user\"+v;\n");
      out.write("\t\t\t \n");
      out.write("\t\t document.delform.submit();\n");
      out.write("\t\t \n");
      out.write("\t\t ");

      String delid = request.getParameter("delfield");
      if (delid != null) {
        String tobedel = delid.replace("delbutton", "");
        System.out.println("Deleting " + tobedel);

        Statement stmt1 = connection.createStatement();
        String query1 = "delete from qa27 where id='" + tobedel + "';";

        stmt1.executeUpdate(query1);
        String futid = request.getParameter("futurefield");
        response.sendRedirect("lec.jsp#" + futid);
      }

      out.write("\n");
      out.write("\t\t \n");
      out.write("\t }\n");
      out.write("\t \n");
      out.write("\t \n");
      out.write("\t </script>\n");
      out.write("\t\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html> \n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #11
0
    public Writer getErrorReport(
        Writer to, final HttpServletRequest request, CharTransformer escape) throws IOException {
      final Writer logMsg = new StringWriter();
      final Writer tee = new org.mmbase.util.ChainedWriter(to, logMsg);
      Writer msg = tee;

      LinkedList<Throwable> stack = getStack();
      String ticket = new Date().toString();

      Map<String, String> props;
      try {
        props = org.mmbase.util.ApplicationContextReader.getProperties("mmbase_errorpage");
      } catch (javax.naming.NamingException ne) {
        props = Collections.emptyMap();
        log.info(ne);
      }

      if (request != null) {
        {
          msg.append("Headers\n----------\n");
          // request properties
          for (Object name : Collections.list(request.getHeaderNames())) {
            msg.append(
                escape.transform(
                    name + ": " + escape.transform(request.getHeader((String) name)) + "\n"));
          }
        }
        {
          msg.append("\nAttributes\n----------\n");
          Pattern p = requestIgnore;
          if (p == null && props.get("request_ignore") != null) {
            p = Pattern.compile(props.get("request_ignore"));
          }
          for (Object name : Collections.list(request.getAttributeNames())) {
            if (p == null || !p.matcher((String) name).matches()) {
              msg.append(
                  escape.transform(name + ": " + request.getAttribute((String) name) + "\n"));
            }
          }
        }
        if (Boolean.TRUE.equals(showSession)
            || (showSession == null && !"false".equals(props.get("show_session")))) {
          HttpSession ses = request.getSession(false);
          if (ses != null) {
            msg.append("\nSession\n----------\n");
            Pattern p = sessionIgnore;
            if (p == null && props.get("session_ignore") != null) {
              p = Pattern.compile(props.get("session_ignore"));
            }
            for (Object name : Collections.list(ses.getAttributeNames())) {
              if (p == null || !p.matcher((String) name).matches()) {
                msg.append(escape.transform(name + ": " + ses.getAttribute((String) name) + "\n"));
              }
            }
          }
        }
      }
      msg.append("\n");
      msg.append("Misc. properties\n----------\n");

      if (request != null) {
        msg.append("method: ").append(escape.transform(request.getMethod())).append("\n");
        msg.append("querystring: ").append(escape.transform(request.getQueryString())).append("\n");
        msg.append("requesturl: ")
            .append(escape.transform(request.getRequestURL().toString()))
            .append("\n");
      }
      if (Boolean.TRUE.equals(showMMBaseVersion)
          || (showMMBaseVersion == null && !"false".equals(props.get("show_mmbase_version")))) {
        msg.append("mmbase version: ").append(org.mmbase.Version.get()).append("\n");
      }
      msg.append("status: ").append("").append(String.valueOf(status)).append("\n\n");

      if (request != null) {
        msg.append("Parameters\n----------\n");
        // request parameters
        Enumeration en = request.getParameterNames();
        while (en.hasMoreElements()) {
          String name = (String) en.nextElement();
          msg.append(name)
              .append(": ")
              .append(escape.transform(request.getParameter(name)))
              .append("\n");
        }
      }
      msg.append("\nException ")
          .append(ticket)
          .append("\n----------\n\n")
          .append(
              exception != null
                  ? (escape.transform(exception.getClass().getName()))
                  : "NO EXCEPTION")
          .append(": ");

      int wroteCauses = 0;
      while (!stack.isEmpty()) {

        Throwable t = stack.removeFirst();
        // add stack stacktraces
        if (t != null) {
          if (stack.isEmpty()) { // write last message always
            msg = tee;
          }
          String message = t.getMessage();
          if (msg != tee) {
            to.append("\n=== skipped(see log)  : ")
                .append(escape.transform(t.getClass().getName()))
                .append(": ")
                .append(message)
                .append("\n");
          }

          msg.append("\n\n").append(escape.transform(t.getClass().getName() + ": " + message));
          StackTraceElement[] stackTrace = t.getStackTrace();
          for (StackTraceElement e : stackTrace) {
            msg.append("\n        at ").append(escape.transform(e.toString()));
          }
          if (!stack.isEmpty()) {
            msg.append("\n-------caused:\n");
          }
          wroteCauses++;
          if (wroteCauses >= MAX_CAUSES) {
            msg = logMsg;
          }
        }
      }
      // write errors to  log
      if (status == 500) {
        try {
          if (props.get("to") != null && props.get("to").length() > 0) {
            javax.naming.Context initCtx = new javax.naming.InitialContext();
            javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env");
            Object mailSession = envCtx.lookup("mail/Session");
            Class sessionClass = Class.forName("javax.mail.Session");
            Class recipientTypeClass = Class.forName("javax.mail.Message$RecipientType");
            Class messageClass = Class.forName("javax.mail.internet.MimeMessage");
            Object mail = messageClass.getConstructor(sessionClass).newInstance(mailSession);
            messageClass
                .getMethod("addRecipients", recipientTypeClass, String.class)
                .invoke(mail, recipientTypeClass.getDeclaredField("TO").get(null), props.get("to"));
            messageClass.getMethod("setSubject", String.class).invoke(mail, ticket);
            mail.getClass().getMethod("setText", String.class).invoke(mail, logMsg.toString());
            Class.forName("javax.mail.Transport")
                .getMethod("send", Class.forName("javax.mail.Message"))
                .invoke(null, mail);
            tee.append("\nmailed to (").append(String.valueOf(props)).append(")");
          }

        } catch (Exception nnfe) {
          tee.append("\nnot mailed (").append(String.valueOf(nnfe)).append(")");
          if (log.isDebugEnabled()) {
            log.debug(nnfe.getMessage(), nnfe);
          }
        }
        log.error("TICKET " + ticket + ":\n" + logMsg);
      }
      return to;
    }
  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");
      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("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<!--%@ page errorPage=\"/error.jsp\" %-->\n");

      response.setHeader("Pragma", "no-cache"); // HTTP 1.0
      response.setDateHeader("Expires", 0);
      response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1

      String _adminid = "";
      String _adminname = "";
      String _admintype = "";
      String _admingroup = "";
      String _approval = "";
      String _adminclass = "";
      String _adminmail = "";

      try {

        _adminid = (String) session.getAttribute("adminid");

        if (_adminid == null || _adminid.length() == 0 || _adminid.equals("null")) {
          response.sendRedirect("/admin/login_first.html");
          return;
        }

        _adminname = (String) session.getAttribute("adminname");
        _admintype = (String) session.getAttribute("admintype");
        _admingroup = (String) session.getAttribute("admingroup");
        _approval = (String) session.getAttribute("approval");
        _adminclass = (String) session.getAttribute("adminclass");
        _adminmail = (String) session.getAttribute("admin_email");
        // session.setMaxInactiveInterval(60*60);

      } catch (Exception e) {
        response.sendRedirect("/admin/login_first.html");
        return;
      }

      out.write('\n');
      out.write('\n');
      out.write('\n');

      String password = request.getParameter("password");
      String fromURL = request.getParameter("fromURL");
      String oldPassword = "";

      String sql = "";
      int iCnt = 0;
      boolean isSucceeded = false;
      String strMsg = "";
      Connection conn = null;
      MatrixDataSet matrix = null;
      DataProcess dataProcess = null;
      PreparedStatement pstmt = null;

      String targetUrl = "";

      try {

        if (password.equals("1111")) {
          throw new UserDefinedException(
              "The new password is not acceptable. Change your password.");
        }

        Context ic = new InitialContext();
        DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/scm");
        conn = ds.getConnection();
        matrix = new dbconn.MatrixDataSet();
        dataProcess = new DataProcess();

        sql =
            " select  password " + " from    admin_01t " + " where   adminid = '" + _adminid + "' ";

        iCnt = dataProcess.RetrieveData(sql, matrix, conn);

        if (iCnt > 0) {
          oldPassword = matrix.getRowData(0).getData(0);
        } else {
          throw new UserDefinedException("Can't find User Information.");
        }

        if (password.equals(oldPassword)) {
          throw new UserDefinedException(
              "The new password is not acceptable. Change your password.");
        }

        // update ó¸®...
        int idx = 0;
        conn.setAutoCommit(false);

        sql =
            " update  admin_01t "
                + " set     password = ?, pw_date = sysdate() "
                + " where   adminid = ? ";

        pstmt = conn.prepareStatement(sql);
        pstmt.setString(++idx, password);
        pstmt.setString(++idx, _adminid);

        iCnt = pstmt.executeUpdate();

        if (iCnt != 1) {
          throw new UserDefinedException("Password update failed.");
        }

        conn.commit();
        isSucceeded = true;

      } catch (UserDefinedException ue) {
        try {
          conn.rollback();
        } catch (Exception ex) {
        }

        strMsg = ue.getMessage();
      } catch (Exception e) {
        try {
          conn.rollback();
        } catch (Exception ex) {
        }

        System.out.println("Exception /admin/resetAdminPasswd : " + e.getMessage());
        throw e;
      } finally {
        if (pstmt != null) {
          try {
            pstmt.close();
          } catch (Exception e) {
          }
        }

        if (conn != null) {
          try {
            conn.setAutoCommit(true);
          } catch (Exception e) {
          }
          conn.close();
        }
      }

      // °á°ú ¸Þ½ÃÁö ó¸®
      if (isSucceeded) {
        // where to go?
        if (fromURL.equals("menu")) {
          targetUrl = "";
        } else {
          targetUrl = "/admin/index2.jsp";
        }
        strMsg = "The data are successfully processed.";
      } else {
        strMsg = "The operation failed.\\n" + strMsg;
        targetUrl = "/admin/resetAdminPasswdForm.jsp";
      }

      out.write("\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<title></title>\n");
      out.write("<link href=\"/common/css/style.css\" rel=\"stylesheet\" type=\"text/css\">\n");
      out.write("</head>\n");
      out.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>\n");
      out.write("<form name=\"form1\" method=\"post\" action=\"");
      out.print(targetUrl);
      out.write("\">\n");
      out.write("<input type='hidden' name='fromURL' value='");
      out.print(fromURL);
      out.write("'>\n");
      out.write("</form>\n");
      out.write("<script language=\"javascript\">\n");
      if (targetUrl.length() > 0) {
        out.write("\n");
        out.write("  alert('");
        out.print(strMsg);
        out.write("');\n");
        out.write("  document.form1.submit();\n");
      }
      out.write("\n");
      out.write("</script>\n");
      out.write("<table width='840' border='0' cellspacing='0' cellpadding='0'><tr><td>\n");
      out.write("\n");
      out.write("<table width='99%' border='0' cellspacing='0' cellpadding='0'>\n");
      out.write("<tr>\n");
      out.write("  <td height='15' colspan='2'></td>\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("  <td width='3%'><img src='/img/title_icon.gif'></td>\n");
      out.write("  <td width='*' class='left_title'>Password Change</td>\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("  <td width='100%' height='2' colspan='2'><hr width='100%'></td>\n");
      out.write("</tr>\n");
      out.write("<tr>\n");
      out.write("  <td height='10' colspan='2'></td>\n");
      out.write("</tr>\n");
      out.write("</table>\n");
      out.write("\n");
      out.write("<table width='90%' border='0' cellspacing='0' cellpadding='0' align='center'>\n");
      out.write("<tr>\n");
      out.write("  <td width='100%' align='center'><img border=\"0\" src=\"/img/pass.jpg\">\n");
      out.write("    <br><br>\n");
      out.write("    <b>The Password has been changed successfully.</b></td>\n");
      out.write("</tr>\n");
      out.write("</table>\n");

      out.println(CopyRightLogo());

      out.write("\n");
      out.write("</tr></td></table>\n");
      out.write("</body>\n");
      out.write("</html>");
    } 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);
    }
  }
Example #13
0
  public synchronized void doPost(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    try {
      PrintWriter out = response.getWriter();

      nseer_db_backup1 stock_db = new nseer_db_backup1(dbApplication);
      nseer_db_backup1 crm_db = new nseer_db_backup1(dbApplication);
      if (stock_db.conn((String) dbSession.getAttribute("unit_db_name"))
          && crm_db.conn((String) dbSession.getAttribute("unit_db_name"))) {

        FileKind FileKind = new FileKind();
        ValidataNumber validata = new ValidataNumber();
        ValidataRecord vr = new ValidataRecord();

        counter count = new counter(dbApplication);
        ValidataTag vt = new ValidataTag();
        String register_ID = (String) dbSession.getAttribute("human_IDD");
        String config_id = request.getParameter("config_id");
        String pay_ID = request.getParameter("pay_ID");
        String product_amount = request.getParameter("product_amount");
        int num = Integer.parseInt(product_amount);
        String payer_name = request.getParameter("payer_name");
        String payer_ID = request.getParameter("payer_ID");
        String reason = request.getParameter("reason");
        String not_return_tag = request.getParameter("not_return_tag");
        String register = request.getParameter("register");
        String register_time = request.getParameter("register_time");
        String demand_return_time = request.getParameter("demand_return_time");
        String sales_name = request.getParameter("sales_name");
        String sales_ID = request.getParameter("sales_ID");
        String bodyc = new String(request.getParameter("remark").getBytes("UTF-8"), "UTF-8");
        String remark = exchange.toHtml(bodyc);
        String time = "";
        java.util.Date now = new java.util.Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
        time = formatter.format(now);
        String[] product_IDn = request.getParameterValues("product_ID");
        String[] amountn = request.getParameterValues("amount");
        if (num == 0 && product_IDn.length == 1) {
          response.sendRedirect("draft/crm/credit_ok_a.jsp?pay_ID=" + pay_ID);
        } else {
          int p = 0;
          for (int i = 1; i <= num; i++) {
            String tem_amount = "amount" + i;
            String amount = request.getParameter(tem_amount);
            if (amount.equals("")) amount = "0";
            if (!validata.validata(amount)) {
              p++;
            }
          }
          int n = 0;
          String product_ID_group = "";
          for (int j = 1; j < product_IDn.length; j++) {
            product_ID_group += product_IDn[j] + ",";
            if (amountn[j].equals("")) amountn[j] = "0";
            if (!validata.validata(amountn[j])) {
              p++;
            }
          }
          for (int i = 1; i <= num; i++) {
            String tem_product_ID = "product_ID" + i;
            String product_ID = request.getParameter(tem_product_ID);
            if (product_ID_group.indexOf(product_ID) != -1) n++;
          }
          if (vt.validata(
                      (String) dbSession.getAttribute("unit_db_name"),
                      "stock_apply_pay",
                      "pay_ID",
                      pay_ID,
                      "check_tag")
                  .equals("9")
              || vt.validata(
                      (String) dbSession.getAttribute("unit_db_name"),
                      "stock_apply_pay",
                      "pay_ID",
                      pay_ID,
                      "check_tag")
                  .equals("5")) {

            if (p == 0) {
              try {
                if (n == 0) {
                  boolean flag = false;
                  List rsList = GetWorkflow.getList(crm_db, "crm_config_workflow", "05");
                  String[] elem = new String[3];
                  if (rsList.size() == 0) {
                    flag = true;
                  }
                  String sqll = "";
                  String[] aaa1 =
                      FileKind.getKind(
                          (String) dbSession.getAttribute("unit_db_name"),
                          "crm_file",
                          "customer_ID",
                          payer_ID);

                  String stock_pay_ID =
                      NseerId.getId("stock/pay", (String) dbSession.getAttribute("unit_db_name"));
                  double demand_amount = 0.0d;
                  double list_price_sum = 0.0d;
                  double cost_price_sum = 0.0d;

                  for (int i = 1; i <= num; i++) {
                    String tem_product_name = "product_name" + i;
                    String tem_product_ID = "product_ID" + i;
                    String tem_available_amount = "available_amount" + i;
                    String tem_amount = "amount" + i;
                    String tem_list_price = "list_price" + i;
                    String tem_cost_price = "cost_price" + i;
                    String tem_type = "type" + i;
                    String tem_amount_unit = "amount_unit" + i;
                    String product_name = request.getParameter(tem_product_name);
                    String product_ID = request.getParameter(tem_product_ID);
                    String available_amount = request.getParameter(tem_available_amount);
                    String amount = request.getParameter(tem_amount);
                    if (amount.equals("")) amount = "0";
                    String list_price2 = request.getParameter(tem_list_price);
                    String cost_price = request.getParameter(tem_cost_price);
                    String type = request.getParameter(tem_type);
                    StringTokenizer tokenTO3 = new StringTokenizer(list_price2, ",");
                    String list_price = "";
                    while (tokenTO3.hasMoreTokens()) {
                      String list_price1 = tokenTO3.nextToken();
                      list_price += list_price1;
                    }
                    String amount_unit = request.getParameter(tem_amount_unit);
                    double list_price_subtotal =
                        Double.parseDouble(list_price) * Double.parseDouble(amount);
                    list_price_sum += list_price_subtotal;
                    double cost_price_subtotal =
                        Double.parseDouble(cost_price) * Double.parseDouble(amount);
                    cost_price_sum += cost_price_subtotal;
                    demand_amount += Double.parseDouble(amount);
                    String sql1 =
                        "update stock_apply_pay_details set amount='"
                            + amount
                            + "',list_price='"
                            + list_price
                            + "',list_price_subtotal='"
                            + list_price_subtotal
                            + "',cost_price='"
                            + cost_price
                            + "',subtotal='"
                            + cost_price_subtotal
                            + "' where pay_ID='"
                            + pay_ID
                            + "' and details_number='"
                            + i
                            + "'";
                    stock_db.executeUpdate(sql1);
                    if (flag) {
                      if (type.equals("物料") || type.equals("外购商品")) {
                        String sql2 =
                            "insert into stock_pay_details(pay_ID,details_number,product_ID,product_name,type,list_price,list_price_subtotal,cost_price,subtotal,amount,unpay_amount,apply_manufacture_amount,apply_purchase_amount) values('"
                                + stock_pay_ID
                                + "','"
                                + i
                                + "','"
                                + product_ID
                                + "','"
                                + product_name
                                + "','"
                                + type
                                + "','"
                                + list_price
                                + "','"
                                + list_price_subtotal
                                + "','"
                                + cost_price
                                + "','"
                                + cost_price_subtotal
                                + "','"
                                + amount
                                + "','"
                                + amount
                                + "','0','"
                                + amount
                                + "')";
                        stock_db.executeUpdate(sql2);
                      } else if (type.equals("商品") || type.equals("部件") || type.equals("委外部件")) {
                        String sql2 =
                            "insert into stock_pay_details(pay_ID,details_number,product_ID,product_name,type,list_price,list_price_subtotal,cost_price,subtotal,amount,unpay_amount,apply_manufacture_amount,apply_purchase_amount) values('"
                                + stock_pay_ID
                                + "','"
                                + i
                                + "','"
                                + product_ID
                                + "','"
                                + product_name
                                + "','"
                                + type
                                + "','"
                                + list_price
                                + "','"
                                + list_price_subtotal
                                + "','"
                                + cost_price
                                + "','"
                                + cost_price_subtotal
                                + "','"
                                + amount
                                + "','"
                                + amount
                                + "','"
                                + amount
                                + "','0')";
                        stock_db.executeUpdate(sql2);
                      }

                      String sql97 =
                          "select * from crm_salecredit_balance_details where crediter_ID='"
                              + payer_ID
                              + "' and product_ID='"
                              + product_ID
                              + "'";
                      ResultSet rs97 = crm_db.executeQuery(sql97);
                      if (rs97.next()) {
                        double balance_amount =
                            rs97.getDouble("amount") + Double.parseDouble(amount);
                        double balance_cost_price_subtotal =
                            rs97.getDouble("subtotal") + cost_price_subtotal;
                        double balance_list_price_subtotal =
                            rs97.getDouble("list_price_subtotal") + list_price_subtotal;

                        String sql96 =
                            "update crm_salecredit_balance_details set amount='"
                                + balance_amount
                                + "',check_tag='1',subtotal='"
                                + balance_cost_price_subtotal
                                + "',list_price_subtotal='"
                                + balance_list_price_subtotal
                                + "' where crediter_ID='"
                                + payer_ID
                                + "' and product_ID='"
                                + product_ID
                                + "'";
                        crm_db.executeUpdate(sql96);
                      } else {
                        String[] aaa =
                            FileKind.getKind(
                                (String) dbSession.getAttribute("unit_db_name"),
                                "design_file",
                                "product_ID",
                                product_ID);
                        String sql95 =
                            "insert into crm_salecredit_balance_details(chain_ID,chain_name,crediter_chain_ID,crediter_chain_name,product_ID,product_name,list_price,list_price_subtotal,cost_price,subtotal,amount,crediter_ID,crediter_name) values('"
                                + aaa[0]
                                + "','"
                                + aaa[1]
                                + "','"
                                + aaa1[0]
                                + "','"
                                + aaa1[1]
                                + "','"
                                + product_ID
                                + "','"
                                + product_name
                                + "','"
                                + list_price
                                + "','"
                                + list_price_subtotal
                                + "','"
                                + cost_price
                                + "','"
                                + cost_price_subtotal
                                + "','"
                                + amount
                                + "','"
                                + payer_ID
                                + "','"
                                + payer_name
                                + "')";
                        crm_db.executeUpdate(sql95);
                      }
                    }
                  }
                  String[] cost_pricen = request.getParameterValues("cost_price");
                  String[] list_pricen = request.getParameterValues("list_price");
                  String[] product_namen = request.getParameterValues("product_name");
                  String[] product_describen = request.getParameterValues("product_describe");
                  String[] amount_unitn = request.getParameterValues("amount_unit");
                  String[] typen = request.getParameterValues("type");
                  for (int i = 1; i < product_IDn.length; i++) {
                    StringTokenizer tokenTO3 = new StringTokenizer(list_pricen[i], ",");
                    String list_price = "";
                    while (tokenTO3.hasMoreTokens()) {
                      String list_price1 = tokenTO3.nextToken();
                      list_price += list_price1;
                    }
                    if (!amountn[i].equals("") && Double.parseDouble(amountn[i]) != 0) {
                      double list_price_subtotal =
                          Double.parseDouble(list_price) * Double.parseDouble(amountn[i]);
                      list_price_sum += list_price_subtotal;
                      double subtotal =
                          Double.parseDouble(cost_pricen[i]) * Double.parseDouble(amountn[i]);
                      cost_price_sum += subtotal;
                      demand_amount += Double.parseDouble(amountn[i]);
                      num++;
                      String sql1 =
                          "insert into stock_apply_pay_details(payer_chain_ID,payer_chain_name,sales_ID,sales_name,payer_ID,payer_name,payer_type,pay_ID,details_number,product_ID,product_name,product_describe,amount,amount_unit,list_price,list_price_subtotal,cost_price,subtotal,type) values ('"
                              + aaa1[0]
                              + "','"
                              + aaa1[1]
                              + "','"
                              + sales_ID
                              + "','"
                              + sales_name
                              + "','"
                              + payer_ID
                              + "','"
                              + payer_name
                              + "','销售赊货','"
                              + pay_ID
                              + "','"
                              + num
                              + "','"
                              + product_IDn[i]
                              + "','"
                              + product_namen[i]
                              + "','"
                              + product_describen[i]
                              + "','"
                              + amountn[i]
                              + "','"
                              + amount_unitn[i]
                              + "','"
                              + list_price
                              + "','"
                              + list_price_subtotal
                              + "','"
                              + cost_pricen[i]
                              + "','"
                              + subtotal
                              + "','"
                              + typen[i]
                              + "')";
                      stock_db.executeUpdate(sql1);
                      // **********************
                      if (rsList.size() == 0) {
                        if (typen[i].equals("物料") || typen[i].equals("外购商品")) {
                          String sql2 =
                              "insert into stock_pay_details(pay_ID,details_number,product_ID,product_name,type,list_price,list_price_subtotal,cost_price,subtotal,amount,unpay_amount,apply_manufacture_amount,apply_purchase_amount) values('"
                                  + stock_pay_ID
                                  + "','"
                                  + num
                                  + "','"
                                  + product_IDn[i]
                                  + "','"
                                  + product_namen[i]
                                  + "','"
                                  + typen[i]
                                  + "','"
                                  + list_price
                                  + "','"
                                  + list_price_subtotal
                                  + "','"
                                  + cost_pricen[i]
                                  + "','"
                                  + subtotal
                                  + "','"
                                  + amountn[i]
                                  + "','"
                                  + amountn[i]
                                  + "','0','"
                                  + amountn[i]
                                  + "')";
                          stock_db.executeUpdate(sql2);
                        } else if (typen[i].equals("商品")
                            || typen[i].equals("部件")
                            || typen[i].equals("委外部件")) {
                          String sql2 =
                              "insert into stock_pay_details(pay_ID,details_number,product_ID,product_name,type,list_price,list_price_subtotal,cost_price,subtotal,amount,unpay_amount,apply_manufacture_amount,apply_purchase_amount) values('"
                                  + stock_pay_ID
                                  + "','"
                                  + num
                                  + "','"
                                  + product_IDn[i]
                                  + "','"
                                  + product_namen[i]
                                  + "','"
                                  + typen[i]
                                  + "','"
                                  + list_price
                                  + "','"
                                  + list_price_subtotal
                                  + "','"
                                  + cost_pricen[i]
                                  + "','"
                                  + subtotal
                                  + "','"
                                  + amountn[i]
                                  + "','"
                                  + amountn[i]
                                  + "','"
                                  + amountn[i]
                                  + "','0')";
                          stock_db.executeUpdate(sql2);
                        }

                        String sql97 =
                            "select * from crm_salecredit_balance_details where crediter_ID='"
                                + payer_ID
                                + "' and product_ID='"
                                + product_IDn[i]
                                + "'";
                        ResultSet rs97 = crm_db.executeQuery(sql97);
                        if (rs97.next()) {
                          double balance_amount =
                              rs97.getDouble("amount") + Double.parseDouble(amountn[i]);
                          double balance_cost_price_subtotal =
                              rs97.getDouble("subtotal") + subtotal;
                          double balance_list_price_subtotal =
                              rs97.getDouble("list_price_subtotal") + list_price_subtotal;

                          String sql96 =
                              "update crm_salecredit_balance_details set amount='"
                                  + balance_amount
                                  + "',check_tag='1',subtotal='"
                                  + balance_cost_price_subtotal
                                  + "',list_price_subtotal='"
                                  + balance_list_price_subtotal
                                  + "' where crediter_ID='"
                                  + payer_ID
                                  + "' and product_ID='"
                                  + product_IDn[i]
                                  + "'";
                          crm_db.executeUpdate(sql96);
                        } else {
                          String[] aaa =
                              FileKind.getKind(
                                  (String) dbSession.getAttribute("unit_db_name"),
                                  "design_file",
                                  "product_ID",
                                  product_IDn[i]);
                          String sql95 =
                              "insert into crm_salecredit_balance_details(chain_ID,chain_name,crediter_chain_ID,crediter_chain_name,product_ID,product_name,list_price,list_price_subtotal,cost_price,subtotal,amount,crediter_ID,crediter_name) values('"
                                  + aaa[0]
                                  + "','"
                                  + aaa[1]
                                  + "','"
                                  + aaa1[0]
                                  + "','"
                                  + aaa1[1]
                                  + "','"
                                  + product_IDn[i]
                                  + "','"
                                  + product_namen[i]
                                  + "','"
                                  + list_price
                                  + "','"
                                  + list_price_subtotal
                                  + "','"
                                  + cost_pricen[i]
                                  + "','"
                                  + subtotal
                                  + "','"
                                  + amountn[i]
                                  + "','"
                                  + payer_ID
                                  + "','"
                                  + payer_name
                                  + "')";
                          crm_db.executeUpdate(sql95);
                        }
                      }
                      // ***************************
                    }
                  }
                  String sql =
                      "update stock_apply_pay set reason='"
                          + reason
                          + "',register='"
                          + register
                          + "',register_time='"
                          + register_time
                          + "',demand_return_time='"
                          + demand_return_time
                          + "',register_time='"
                          + register_time
                          + "',register='"
                          + register
                          + "',remark='"
                          + remark
                          + "',demand_amount='"
                          + demand_amount
                          + "',list_price_sum='"
                          + list_price_sum
                          + "',cost_price_sum='"
                          + cost_price_sum
                          + "',not_return_tag='"
                          + not_return_tag
                          + "' where pay_ID='"
                          + pay_ID
                          + "'";
                  stock_db.executeUpdate(sql);
                  if (flag) {
                    sql = "update stock_apply_pay set check_tag='1' where pay_ID='" + pay_ID + "'";
                    stock_db.executeUpdate(sql);
                    if (!vr.validata(
                        (String) dbSession.getAttribute("unit_db_name"),
                        "stock_pay",
                        "reasonexact",
                        pay_ID)) {
                      String sql4 =
                          "insert into stock_pay(pay_ID,reason,reasonexact,reasonexact_details,demand_amount,list_price_sum,cost_price_sum,register,register_time) values('"
                              + stock_pay_ID
                              + "','"
                              + reason
                              + "','"
                              + pay_ID
                              + "','"
                              + payer_name
                              + "','"
                              + demand_amount
                              + "','"
                              + list_price_sum
                              + "','"
                              + cost_price_sum
                              + "','"
                              + register
                              + "','"
                              + register_time
                              + "')";
                      stock_db.executeUpdate(sql4);
                    }

                    String sql98 = "select * from crm_file where customer_ID='" + payer_ID + "'";
                    ResultSet rs98 = crm_db.executeQuery(sql98);
                    if (rs98.next()) {
                      double salecredit_list_price_sum =
                          rs98.getDouble("salecredit_list_price_sum") + list_price_sum;
                      double salecredit_cost_price_sum =
                          rs98.getDouble("salecredit_cost_price_sum") + cost_price_sum;

                      String sql99 =
                          "update crm_file set credit_yes_or_not_tag='1',salecredit_list_price_sum='"
                              + salecredit_list_price_sum
                              + "',salecredit_cost_price_sum='"
                              + salecredit_cost_price_sum
                              + "' where customer_ID='"
                              + payer_ID
                              + "' ";
                      crm_db.executeUpdate(sql99);
                    }
                  } else {
                    sql = "update stock_apply_pay set check_tag='0' where pay_ID='" + pay_ID + "'";
                    stock_db.executeUpdate(sql);
                    Iterator ite = rsList.iterator();
                    while (ite.hasNext()) {
                      elem = (String[]) ite.next();
                      sql =
                          "insert into crm_workflow(config_id,object_ID,describe1,describe2) values ('"
                              + elem[0]
                              + "','"
                              + pay_ID
                              + "','"
                              + elem[1]
                              + "','"
                              + elem[2]
                              + "')";
                      crm_db.executeUpdate(sql);
                    }
                  }

                  response.sendRedirect("draft/crm/credit_ok.jsp?finished_tag=8");
                } else {

                  response.sendRedirect(
                      "draft/crm/credit_ok.jsp?finished_tag=7&pay_ID=" + pay_ID + "");
                }
              } catch (Exception ex) {
                ex.printStackTrace();
              }
            } else {

              response.sendRedirect("draft/crm/credit_ok.jsp?finished_tag=6&pay_ID=" + pay_ID + "");
            }
          } else {

            response.sendRedirect("draft/crm/credit_ok.jsp?finished_tag=9");
          }
        }
        stock_db.commit();
        crm_db.commit();
        stock_db.close();
        crm_db.close();
      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
Example #14
0
  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;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("\n");
      out.write("\n");

      if (session != null && session.getAttribute("username") == null) {

        out.write("\n");
        out.write("    ");
        org.apache.jasper.runtime.JspRuntimeLibrary.include(
            request, response, "header.jsp", out, false);
        out.write(" \n");
        out.write("            <section>\n");
        out.write("\n");
        out.write("                <div class=\"mockup-content\">\n");
        out.write("                    <p style=\"color:white\">\n");
        out.write(
            "                        1. \tระบบนี้เป็นระบบที่ใช้แบบวันต่อวัน เมื่อเข้าสู่ระบบแล้วกรุณาเลือกช่วงที่จะใช้จองสนาม ซึ่งใช้ 1 สิทธิต่อ 1 ชั่วโมง \n");
        out.write("                        เพื่อให้นักศึกษาได้ใช้งานอย่างทั่วถึง <br>\n");
        out.write(
            "                        2. \tเมื่อเข้าระบบจองสนามเสร็จแล้วจะเข้าสู่ระบบการยืมอุปกรณ์กีฬาซึ่งการยืมอุปกรณ์นั้นๆจะขึ้นอยู่กับการจองสนามกีฬานั้น\n");
        out.write(
            "                        โดยไม่สามารถเลือกอุปกรณ์ ที่ไม่เกี่ยวข้องเกี่ยวสนามนั้นได้ แต่ถ้าไม่ต้องการยืมอุปกรณ์จะข้ามไปสู่ระบบจองล็อกเกอร์ได้เรย<br>\n");
        out.write(
            "                        3.\tเมื่อเข้าระบบจองล็อกเกอร์จะแสดงสถานะ ว่าในวันนั้นมีล็อกเกอร์ว่างอยู่กี่ล็อกเกอร์ แล้วเมื่อต้องการมั้ย จะเข้าสู่ระบบยืนยัน \n");
        out.write(
            "                        แต่ถ้าไม่ต้องการจองล็อกเกอร์จะข้ามไปสู่ระบบการยืนยันทันที<br>\n");
        out.write(
            "                        4.\tเมื่อกเข้าสู่ระบบจองทั้งหมด จะมีหน้าสรุปบอกสถานะสำหรับผู้ใช้ว่าได้เลือกการจองอะไรไว้บ้าง เพื่อยืนยันการใช้บริการ\n");
        out.write("\n");
        out.write("                    </p>\n");
        out.write("                    <br>\n");
        out.write("                    <br>\n");
        out.write(
            "                    <div class=\"morph-button morph-button-modal morph-button-modal-2 morph-button-fixed\">\n");
        out.write("                        <button type=\"button\" >\n");
        out.write("                            <span>เข้าสู่ระบบ</span>\n");
        out.write("                        </button>\n");
        out.write("                        <br>\n");
        out.write("                        <div class=\"morph-content\">\n");
        out.write("                            <div>\n");
        out.write(
            "                                <div class=\"content-style-form content-style-form-1\">\n");
        out.write(
            "                                    <span class=\"icon icon-close\">Close the dialog</span>\n");
        out.write("                                    <h2>Login</h2>\n");
        out.write("\n");
        out.write("                                    <form action=\"UserLogin\">\n");
        out.write("                                        <p>\n");
        out.write("                                            <label>Username</label>\n");
        out.write(
            "                                            <input type=\"text\" name=\"username\" placeholder=\"Student id\"/>\n");
        out.write("                                        </p>\n");
        out.write("                                        <p>\n");
        out.write("                                            <label>Password</label>\n");
        out.write(
            "                                            <input type=\"password\" name=\"password\" placeholder=\"Password\"/>\n");
        out.write("                                        </p>\n");
        out.write("                                        <p>\n");
        out.write(
            "                                            <button type=\"submit\">Login</button>\n");
        out.write("                                        </p>\n");
        out.write("                                    </form>\n");
        out.write("                                </div>\n");
        out.write("                            </div>\n");
        out.write("                        </div> <!--Popup content-->\n");
        out.write("                    </div>\n");
        out.write("                    <!-- morph-button -->\n");
        out.write("\n");
        out.write("                </div>\n");
        out.write("                <!-- /form-mockup -->\n");
        out.write("            </section>\n");
        out.write("\n");
        out.write("        </div>\n");
        out.write("        <!-- /container -->\n");
        out.write("        <script src=\"js/classie.js\"></script>\n");
        out.write("        <script src=\"js/uiMorphingButton_fixed.js\"></script>\n");
        out.write("        <script>\n");
        out.write("            (function() {\n");
        out.write(
            "                var docElem = window.document.documentElement, didScroll, scrollPosition;\n");
        out.write("\n");
        out.write("                // trick to prevent scrolling when opening/closing button\n");
        out.write("                function noScrollFn() {\n");
        out.write(
            "                    window.scrollTo(scrollPosition ? scrollPosition.x : 0, scrollPosition ? scrollPosition.y : 0);\n");
        out.write("                }\n");
        out.write("\n");
        out.write("                function noScroll() {\n");
        out.write("                    window.removeEventListener('scroll', scrollHandler);\n");
        out.write("                    window.addEventListener('scroll', noScrollFn);\n");
        out.write("                }\n");
        out.write("\n");
        out.write("                function scrollFn() {\n");
        out.write("                    window.addEventListener('scroll', scrollHandler);\n");
        out.write("                }\n");
        out.write("\n");
        out.write("                function canScroll() {\n");
        out.write("                    window.removeEventListener('scroll', noScrollFn);\n");
        out.write("                    scrollFn();\n");
        out.write("                }\n");
        out.write("\n");
        out.write("                function scrollHandler() {\n");
        out.write("                    if (!didScroll) {\n");
        out.write("                        didScroll = true;\n");
        out.write("                        setTimeout(function() {\n");
        out.write("                            scrollPage();\n");
        out.write("                        }, 60);\n");
        out.write("                    }\n");
        out.write("                }\n");
        out.write("                ;\n");
        out.write("\n");
        out.write("                function scrollPage() {\n");
        out.write(
            "                    scrollPosition = {x: window.pageXOffset || docElem.scrollLeft, y: window.pageYOffset || docElem.scrollTop};\n");
        out.write("                    didScroll = false;\n");
        out.write("                }\n");
        out.write("                ;\n");
        out.write("\n");
        out.write("                scrollFn();\n");
        out.write("\n");
        out.write(
            "                [].slice.call(document.querySelectorAll('.morph-button')).forEach(function(bttn) {\n");
        out.write("                    new UIMorphingButton(bttn, {\n");
        out.write("                        closeEl: '.icon-close',\n");
        out.write("                        onBeforeOpen: function() {\n");
        out.write("                            // don't allow to scroll\n");
        out.write("                            noScroll();\n");
        out.write("                        },\n");
        out.write("                        onAfterOpen: function() {\n");
        out.write("                            // can scroll again\n");
        out.write("                            canScroll();\n");
        out.write("                        },\n");
        out.write("                        onBeforeClose: function() {\n");
        out.write("                            // don't allow to scroll\n");
        out.write("                            noScroll();\n");
        out.write("                        },\n");
        out.write("                        onAfterClose: function() {\n");
        out.write("                            // can scroll again\n");
        out.write("                            canScroll();\n");
        out.write("                        }\n");
        out.write("                    });\n");
        out.write("                });\n");
        out.write("\n");
        out.write("            })();\n");
        out.write("        </script>\n");
        out.write("        ");
        org.apache.jasper.runtime.JspRuntimeLibrary.include(
            request, response, "footer.jsp", out, false);
        out.write(' ');
        out.write('\n');

      } else {
        response.sendRedirect("StadiumServlet");
      }
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

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

      out.write("\r\n\r\n");
      out.write("\r\n\r\n");

      String strIp = (String) request.getParameter("ip");
      String strCommunityString = (String) request.getParameter("cs");
      String strPort = (String) request.getParameter("port");
      String strTimeout = (String) request.getParameter("timeout");
      String strRetries = (String) request.getParameter("retries");
      String strNodeLabel = (String) request.getParameter("node");
      String strNodeId = request.getParameter("nodeId");
      String strFirstTime = (String) request.getParameter("firsttime");
      String strWindowId = (String) request.getParameter("windowid");

      // Create the querier and make the request.
      QueryFactory factory = new QueryFactory();
      Querier querier = (Querier) factory.createQuerier(WinPagePerfSnmpQuerier.QUERIER_NAME);
      DeviceCommunicator deviceCommunicator = new DeviceCommunicator();
      deviceCommunicator.sendQuery(querier, strIp);

      // Error processing
      if (querier.getErrorStatus() == -1) {
        RequestDispatcher rd =
            getServletContext()
                .getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpCommError");
        rd.forward(request, response);
        return;
      }
      if (querier.getErrorStatus() == -2) {
        RequestDispatcher rd =
            getServletContext()
                .getRequestDispatcher("/jsp/WTerror-handler.jsp?error=NoPerfmibSnmpError");
        rd.forward(request, response);
        return;
      }

      if (querier.getErrorStatus() != 0) {
        RequestDispatcher rd =
            getServletContext().getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpError");
        rd.forward(request, response);
        return;
      }

      Map calcs = querier.getCalculations();
      long[] results = (long[]) calcs.get(WinPagePerfSnmpQuerier.PAGE_RESULTS);

      if (results[0] < 0
          || results[1] < 0
          || results[2] < 0
          || results[3] < 0
          || results[4] < 0
          || results[5] < 0
          || results[6] < 0
          || results[7] < 0
          || results[8] < 0
          || results[9] < 0) {
        RequestDispatcher rd =
            getServletContext().getRequestDispatcher("/jsp/WTerror-handler.jsp?error=SnmpError");
        rd.forward(request, response);
        return;
      }

      Vector vPageStats = null;

      if (strFirstTime == null) {
        // Not the first time, so get the previous polled data from the session
        vPageStats = (Vector) session.getAttribute("vPageStats" + strWindowId);
      } else {
        // This is the first time in this JSP, so create the Vector which will contain the
        // polled data
        Random random = new Random();
        strWindowId = String.valueOf(random.nextInt());

        vPageStats = new Vector();
      }

      vPageStats.add(results);
      session.setAttribute("vPageStats" + strWindowId, vPageStats);

      // This random number is used to prevent the brower from caching the IMG tags
      Random random = new Random();
      int randomInt = random.nextInt();

      out.write("\r\n\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n  ");
      out.write("<title>WebTelemetry - Graphs | Real-Time | Windows Page Performance Monitoring");
      out.write("</title>\r\n  ");
      out.write("<META HTTP-EQUIV=\"refresh\" CONTENT=\"");
      out.print(WTProperties.getMonitorUIRefreshRate());
      out.write("; URL=");
      out.print(WTTools.getJspURL(request));
      out.write("WTwin-page-monitor.jsp?cs=");
      out.print(URLEncoder.encode(strCommunityString, "UTF-8"));
      out.write("&ip=");
      out.print(strIp);
      out.write("&port=");
      out.print(strPort);
      out.write("&timeout=");
      out.print(strTimeout);
      out.write("&retries=");
      out.print(strRetries);
      out.write("&node=");
      out.print(URLEncoder.encode(strNodeLabel, "UTF-8"));
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("&nodeId=");
      out.print(strNodeId);
      out.write("\">\r\n  ");
      out.write(
          "<link rel=\"stylesheet\" type=\"text/css\" href=\"/wt-portal/css/default.css\" />\r\n  ");
      out.write("<script type=\"text/javascript\" src=\"/wt-portal/javascript/WTtools.js\">");
      out.write("</script>\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      String title =
          "Graphs - Real-Time - Windows Page Performance Monitoring for Node: " + strNodeLabel;
      out.write("\r\n");
      request.setAttribute("title", title);
      request.setAttribute("nodeJsp", "/wt-monitor/element/node.jsp?node=" + strNodeId);
      out.write("\r\n");
      /* ----  c:import ---- */
      org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_0 =
          (org.apache.taglibs.standard.tag.el.core.ImportTag)
              _jspx_tagPool_c_import_url_context.get(
                  org.apache.taglibs.standard.tag.el.core.ImportTag.class);
      _jspx_th_c_import_0.setPageContext(pageContext);
      _jspx_th_c_import_0.setParent(null);
      _jspx_th_c_import_0.setContext("/wt-monitor");
      _jspx_th_c_import_0.setUrl("/includes/header.jsp");
      int[] _jspx_push_body_count_c_import_0 = new int[] {0};
      try {
        int _jspx_eval_c_import_0 = _jspx_th_c_import_0.doStartTag();
        if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
            javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
            _jspx_push_body_count_c_import_0[0]++;
            out = _bc;
            _jspx_th_c_import_0.setBodyContent(_bc);
            _jspx_th_c_import_0.doInitBody();
          }
          do {
            out.write("\r\n\t");
            if (_jspx_meth_c_param_0(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\r\n\t");
            if (_jspx_meth_c_param_1(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\r\n\t");
            if (_jspx_meth_c_param_2(
                _jspx_th_c_import_0, pageContext, _jspx_push_body_count_c_import_0)) return;
            out.write("\r\n");
            int evalDoAfterBody = _jspx_th_c_import_0.doAfterBody();
            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
          } while (true);
          if (_jspx_eval_c_import_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
            out = pageContext.popBody();
          _jspx_push_body_count_c_import_0[0]--;
        }
        if (_jspx_th_c_import_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_import_0[0]-- > 0) out = pageContext.popBody();
        _jspx_th_c_import_0.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_import_0.doFinally();
        _jspx_tagPool_c_import_url_context.reuse(_jspx_th_c_import_0);
      }
      out.write("\t\r\n\t");
      out.write("\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n\t");
      out.write("<tr>\r\n\t\t");
      out.write("<td align=\"right\">");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagefaultchart&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write(
          "<img src=\"/wt-portal/images/spacers/spacer.gif\" height=\"1\" width=\"20\" border=\"0\" alt=\"WebTelemetry\">");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagefaultseries&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n\t");
      out.write("<tr>\r\n\t\t");
      out.write("<td align=\"right\">");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagenumchart&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t\t");
      out.write("<td>&nbsp;");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagenumseries&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n\t");
      out.write("<tr>\r\n\t\t");
      out.write("<td align=\"right\">");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagetimeschart&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t\t");
      out.write("<td>&nbsp;");
      out.write("</td>\r\n\t\t");
      out.write("<td>");
      out.write("<IMG SRC=\"");
      out.print(WTTools.getServletURL(request));
      out.write("WTsnmpRealTimeGraphs?chart=winpagetimesseries&random=");
      out.print(randomInt);
      out.write("&windowid=");
      out.print(strWindowId);
      out.write("\" BORDER=0>");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n");
      out.write("</table>\r\n");
      out.write("</div>\r\n");
      out.write("<br>\r\n\r\n");
      /* ----  c:import ---- */
      org.apache.taglibs.standard.tag.el.core.ImportTag _jspx_th_c_import_1 =
          (org.apache.taglibs.standard.tag.el.core.ImportTag)
              _jspx_tagPool_c_import_url_context_nobody.get(
                  org.apache.taglibs.standard.tag.el.core.ImportTag.class);
      _jspx_th_c_import_1.setPageContext(pageContext);
      _jspx_th_c_import_1.setParent(null);
      _jspx_th_c_import_1.setContext("/wt-monitor");
      _jspx_th_c_import_1.setUrl("/includes/footer.jsp");
      int[] _jspx_push_body_count_c_import_1 = new int[] {0};
      try {
        int _jspx_eval_c_import_1 = _jspx_th_c_import_1.doStartTag();
        if (_jspx_th_c_import_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_import_1[0]-- > 0) out = pageContext.popBody();
        _jspx_th_c_import_1.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_import_1.doFinally();
        _jspx_tagPool_c_import_url_context_nobody.reuse(_jspx_th_c_import_1);
      }
      out.write("\r\n\t\r\n");
      out.write("</body>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
Example #16
0
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    try {

      HttpSession session = request.getSession();
      PrintWriter out = response.getWriter();

      nseer_db_backup1 security_db = new nseer_db_backup1(dbApplication);
      if (security_db.conn((String) dbSession.getAttribute("unit_db_name"))) {
        getRecordCount query = new getRecordCount();

        String tablename = request.getParameter("tablename");
        String[] cols = request.getParameterValues("col");

        if (cols == null) {

          response.sendRedirect("hr/config/key/key_register_ok_a.jsp");

        } else {
          String column_group = "";
          for (int i = 0; i < cols.length; i++) {
            column_group += cols[i] + ",";
          }
          column_group = column_group.substring(0, column_group.length() - 1);
          String sql1 =
              "select * from security_publicconfig_key where tablename='" + tablename + "'";
          ResultSet rs = security_db.executeQuery(sql1);
          if (rs.next()) {
            String sql =
                "update security_publicconfig_key set column_group='"
                    + column_group
                    + "' where tablename='"
                    + tablename
                    + "'";
            security_db.executeUpdate(sql);
          } else {
            String sql =
                "insert into security_publicconfig_key(tablename,column_group) values('"
                    + tablename
                    + "','"
                    + column_group
                    + "')";
            security_db.executeUpdate(sql);
          }

          response.sendRedirect("hr/config/key/key_register_ok_b.jsp");
        }
        security_db.commit();
        security_db.close();

      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
    }
  }
Example #17
0
  public synchronized void doPost(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    try {
      ValidataNumber validata = new ValidataNumber();
      nseer_db_backup1 crm_db = new nseer_db_backup1(dbApplication);
      if (crm_db.conn((String) dbSession.getAttribute("unit_db_name"))) {
        counter count = new counter(dbApplication);
        PrintWriter out = response.getWriter();
        String product_amount = request.getParameter("product_amount");
        String reasonexact = request.getParameter("reasonexact");
        String which_time = request.getParameter("which_time");
        int num = Integer.parseInt(product_amount);
        String reason = request.getParameter("reason");
        String customer_ID = request.getParameter("customer_ID");
        String customer_name = request.getParameter("customer_name");
        String real_customer_mailing_address =
            request.getParameter("real_customer_mailing_address");
        String real_contact_person = request.getParameter("real_contact_person");
        String real_contact_person_tel = request.getParameter("real_contact_person_tel");
        String real_contact_person_fax = request.getParameter("real_contact_person_fax");
        String real_invoice_time = request.getParameter("real_invoice_time");
        String real_invoice_type = request.getParameter("real_invoice_type");
        String register = request.getParameter("register");
        String register_ID = request.getParameter("register_ID");
        String invoice_group = request.getParameter("invoice_group");
        String register_time = request.getParameter("register_time");
        double invoiced_subtotal_sum = 0.0d;
        double invoiced_subtotal_sum_all = 0.0d;
        int p = 0;
        for (int i = 1; i <= num; i++) {
          String tem_invoice_sum = "invoice_sum" + i;
          String invoice_sum2 = request.getParameter(tem_invoice_sum);
          if (invoice_sum2.equals("")) invoice_sum2 = "0";
          StringTokenizer tokenTO2 = new StringTokenizer(invoice_sum2, ",");
          String invoice_sum = "";
          while (tokenTO2.hasMoreTokens()) {
            String invoice_sum1 = tokenTO2.nextToken();
            invoice_sum += invoice_sum1;
          }
          if (!validata.validata(invoice_sum)) {
            p++;
          }
        }
        if (p == 0) {
          int n = 0;

          if (n == 0) {
            String sql8 =
                "select * from crm_order where order_id='"
                    + reasonexact
                    + "' and (invoice_check_tag='9' or invoice_check_tag='5') and which_time='"
                    + which_time
                    + "'";
            ResultSet rs8 = crm_db.executeQuery(sql8);
            if (rs8.next()) {

              for (int j = 1; j <= num; j++) {
                String tem_details_number = "details_number" + j;
                String tem_id = "id" + j;
                String id = request.getParameter(tem_id);
                String details_number = request.getParameter(tem_details_number);
              }
              String product_ID_control1 = request.getParameter("product_ID1");
              String subtotal_control1 = request.getParameter("invoiced_subtotal1");
              double subtotal_control = Double.parseDouble(subtotal_control1);
              for (int j = 1; j <= num; j++) {
                invoiced_subtotal_sum = 0;
                String tem_details_number = "details_number" + j;
                String tem_product_name = "product_name" + j;
                String tem_product_ID = "product_ID" + j;
                String tem_subtotal = "subtotal" + j;
                String tem_invoice_sum = "invoice_sum" + j;
                String tem_invoiced_subtotal = "invoiced_subtotal" + j;
                String tem_remark = "remark" + j;
                String tem_id = "id" + j;
                String id = request.getParameter(tem_id);
                String product_name = request.getParameter(tem_product_name);
                String product_ID = request.getParameter(tem_product_ID);
                String details_number = request.getParameter(tem_details_number);
                String subtotal = request.getParameter(tem_subtotal);
                String invoiced_subtotal = request.getParameter(tem_invoiced_subtotal);
                String invoice_sum2 = request.getParameter(tem_invoice_sum);
                if (invoice_sum2.equals("")) invoice_sum2 = "0";
                StringTokenizer tokenTO1 = new StringTokenizer(invoice_sum2, ",");
                String invoice_sum = "";
                while (tokenTO1.hasMoreTokens()) {
                  String invoice_sum1 = tokenTO1.nextToken();
                  invoice_sum += invoice_sum1;
                }
                String remark = request.getParameter(tem_remark);
                if (product_ID.equals(product_ID_control1)) {
                  if (invoice_sum != null && Double.parseDouble(invoice_sum) != 0) {
                    subtotal_control += Double.parseDouble(invoice_sum);
                    invoiced_subtotal_sum_all += Double.parseDouble(invoice_sum);
                    String sql1 =
                        "update crm_ordering set reason='"
                            + reason
                            + "',customer_ID='"
                            + customer_ID
                            + "',customer_name='"
                            + customer_name
                            + "',real_customer_mailing_address='"
                            + real_customer_mailing_address
                            + "',real_contact_person='"
                            + real_contact_person
                            + "',real_contact_person_tel='"
                            + real_contact_person_tel
                            + "',real_contact_person_fax='"
                            + real_contact_person_fax
                            + "',real_invoice_time='"
                            + real_invoice_time
                            + "',real_invoice_type='"
                            + real_invoice_type
                            + "',register='"
                            + register
                            + "',register_ID='"
                            + register_ID
                            + "',register_time='"
                            + register_time
                            + "',product_ID='"
                            + product_ID
                            + "',product_name='"
                            + product_name
                            + "',invoice_sum='"
                            + invoice_sum
                            + "',remark='"
                            + remark
                            + "',invoice_group='"
                            + invoice_group
                            + "' where id='"
                            + id
                            + "'";
                    crm_db.executeUpdate(sql1);
                    if (subtotal_control == Double.parseDouble(subtotal)) {
                      String sql2 =
                          "update crm_order_details set invoiced_subtotal='"
                              + subtotal_control
                              + "',invoice_tag='1' where order_ID='"
                              + reasonexact
                              + "' and details_number='"
                              + details_number
                              + "'";
                      crm_db.executeUpdate(sql2);
                    } else {
                      String sql3 =
                          "update crm_order_details set invoiced_subtotal='"
                              + subtotal_control
                              + "' where order_ID='"
                              + reasonexact
                              + "' and details_number='"
                              + details_number
                              + "'";
                      crm_db.executeUpdate(sql3);
                    }

                  } else if (Double.parseDouble(invoice_sum) == 0) {
                    String sql7 = "delete from crm_ordering where id='" + id + "'";
                    crm_db.executeUpdate(sql7);
                  }
                } else {
                  if (invoice_sum != null && Double.parseDouble(invoice_sum) != 0) {
                    product_ID_control1 = product_ID;
                    subtotal_control =
                        Double.parseDouble(invoiced_subtotal) + Double.parseDouble(invoice_sum);
                    invoiced_subtotal_sum_all += Double.parseDouble(invoice_sum);
                    String sql1 =
                        "update crm_ordering set reason='"
                            + reason
                            + "',customer_ID='"
                            + customer_ID
                            + "',customer_name='"
                            + customer_name
                            + "',real_customer_mailing_address='"
                            + real_customer_mailing_address
                            + "',real_contact_person='"
                            + real_contact_person
                            + "',real_contact_person_tel='"
                            + real_contact_person_tel
                            + "',real_contact_person_fax='"
                            + real_contact_person_fax
                            + "',real_invoice_time='"
                            + real_invoice_time
                            + "',real_invoice_type='"
                            + real_invoice_type
                            + "',register='"
                            + register
                            + "',register_ID='"
                            + register_ID
                            + "',register_time='"
                            + register_time
                            + "',product_ID='"
                            + product_ID
                            + "',product_name='"
                            + product_name
                            + "',invoice_sum='"
                            + invoice_sum
                            + "',remark='"
                            + remark
                            + "',invoice_group='"
                            + invoice_group
                            + "' where id='"
                            + id
                            + "'";
                    crm_db.executeUpdate(sql1);
                    if (subtotal_control == Double.parseDouble(subtotal)) {
                      String sql2 =
                          "update crm_order_details set invoiced_subtotal='"
                              + subtotal_control
                              + "',invoice_tag='1' where order_ID='"
                              + reasonexact
                              + "' and details_number='"
                              + details_number
                              + "'";
                      crm_db.executeUpdate(sql2);
                    } else {
                      String sql3 =
                          "update crm_order_details set invoiced_subtotal='"
                              + subtotal_control
                              + "' where order_ID='"
                              + reasonexact
                              + "' and details_number='"
                              + details_number
                              + "'";
                      crm_db.executeUpdate(sql3);
                    }

                  } else if (Double.parseDouble(invoice_sum) == 0) {
                    String sql7 = "delete from crm_ordering where id='" + id + "'";
                    crm_db.executeUpdate(sql7);
                  }
                }
              }
              String sql2 =
                  "update crm_order set invoice_check_tag='2' where order_ID='" + reasonexact + "'";
              crm_db.executeUpdate(sql2);
              response.sendRedirect("draft/crm/invoice_ok.jsp?finished_tag=2");
            } else {
              response.sendRedirect("draft/crm/invoice_ok.jsp?finished_tag=1");
            }
          } else {
            response.sendRedirect("draft/crm/invoice_ok_a.jsp?order_ID=" + reasonexact + "");
          }
        } else {
          response.sendRedirect("draft/crm/invoice_ok_b.jsp?order_ID=" + reasonexact + "");
        }
        crm_db.commit();
        crm_db.close();

      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
    }
  }
Example #18
0
  public void doPost(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    try {
      PrintWriter out = response.getWriter();
      session = request.getSession();
      counter count = new counter(dbApplication);
      ValidataNumber validata = new ValidataNumber();
      ValidataRecord vr = new ValidataRecord();
      ValidataTag vt = new ValidataTag();
      getNameFromID getNameFromID = new getNameFromID();
      getRateFromID getRateFromID = new getRateFromID();

      nseer_db_backup1 purchase_db = new nseer_db_backup1(dbApplication);

      if (purchase_db.conn((String) dbSession.getAttribute("unit_db_name"))) {
        String register_ID = (String) session.getAttribute("human_IDD");
        String config_id = request.getParameter("config_id");
        String discussion_ID = request.getParameter("discussion_ID");
        String provider_ID = request.getParameter("provider_ID");
        String provider_name = request.getParameter("provider_name");
        String demand_contact_person = request.getParameter("demand_contact_person");
        String demand_contact_person_tel = request.getParameter("demand_contact_person_tel");
        String demand_contact_person_fax = request.getParameter("demand_contact_person_fax");
        String demand_pay_time = request.getParameter("demand_pay_time");
        String check_time = request.getParameter("check_time");
        String checker = request.getParameter("checker");
        String checker_ID = request.getParameter("checker_ID");
        String bodyc = new String(request.getParameter("remark").getBytes("UTF-8"), "UTF-8");
        String remark = exchange.toHtml(bodyc);
        String modify_tag = request.getParameter("modify_tag");
        String product_amount = request.getParameter("product_amount");
        int num = Integer.parseInt(product_amount);

        int n = 0;
        for (int i = 1; i <= num; i++) {
          String tem_amount = "amount" + i;
          String tem_off_discount = "off_discount" + i;
          String tem_list_price = "list_price" + i;
          String amount = request.getParameter(tem_amount);
          String off_discount = request.getParameter(tem_off_discount);
          String list_price2 = request.getParameter(tem_list_price);
          StringTokenizer tokenTO2 = new StringTokenizer(list_price2, ",");

          String list_price = "";
          while (tokenTO2.hasMoreTokens()) {
            String list_price1 = tokenTO2.nextToken();
            list_price += list_price1;
          }
          if (!validata.validata(amount)
              || !validata.validata(off_discount)
              || !validata.validata(list_price)) {
            n++;
          }
        }

        String sql6 =
            "select id from purchase_workflow where object_ID='"
                + discussion_ID
                + "' and ((check_tag='0' and config_id<'"
                + config_id
                + "') or (check_tag='1' and config_id='"
                + config_id
                + "'))";
        ResultSet rs6 = purchase_db.executeQuery(sql6);
        if (!rs6.next()) {
          if (vt.validata(
                  (String) dbSession.getAttribute("unit_db_name"),
                  "purchase_discussion",
                  "discussion_ID",
                  discussion_ID,
                  "check_tag")
              .equals("0")) {
            if (n == 0) {
              String time = "";
              java.util.Date now = new java.util.Date();
              SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
              time = formatter.format(now);

              String sql =
                  "update purchase_discussion set discussion_ID='"
                      + discussion_ID
                      + "',provider_ID='"
                      + provider_ID
                      + "',provider_name='"
                      + provider_name
                      + "',demand_contact_person='"
                      + demand_contact_person
                      + "',demand_contact_person_tel='"
                      + demand_contact_person_tel
                      + "',demand_contact_person_fax='"
                      + demand_contact_person_fax
                      + "',check_time='"
                      + check_time
                      + "',checker='"
                      + checker
                      + "',checker_ID='"
                      + checker_ID
                      + "',remark='"
                      + remark
                      + "' where discussion_ID='"
                      + discussion_ID
                      + "'";
              purchase_db.executeUpdate(sql);

              try {

                int service_count = 0;
                int stock_number = 0;
                int pay_amount_sum = 0;
                double sale_price_sum = 0.0d;
                double cost_price_sum = 0.0d;
                double real_cost_price_sum = 0.0d;
                for (int i = 1; i <= num; i++) {
                  String tem_product_name = "product_name" + i;
                  String tem_product_ID = "product_ID" + i;
                  String tem_product_describe = "product_describe" + i;
                  String tem_amount = "amount" + i;
                  String tem_off_discount = "off_discount" + i;
                  String tem_list_price = "list_price" + i;
                  String tem_cost_price = "cost_price" + i;
                  String tem_real_cost_price = "real_cost_price" + i;
                  String tem_amount_unit = "amount_unit" + i;
                  String product_name = request.getParameter(tem_product_name);
                  String product_ID = request.getParameter(tem_product_ID);
                  String product_describe = request.getParameter(tem_product_describe);
                  String amount1 = request.getParameter(tem_amount);
                  String off_discount = request.getParameter(tem_off_discount);
                  String list_price2 = request.getParameter(tem_list_price);
                  StringTokenizer tokenTO2 = new StringTokenizer(list_price2, ",");
                  String list_price = "";
                  while (tokenTO2.hasMoreTokens()) {
                    String list_price1 = tokenTO2.nextToken();
                    list_price += list_price1;
                  }
                  String cost_price2 = request.getParameter(tem_cost_price);
                  StringTokenizer tokenTO3 = new StringTokenizer(cost_price2, ",");
                  String cost_price = "";
                  while (tokenTO3.hasMoreTokens()) {
                    String cost_price1 = tokenTO3.nextToken();
                    cost_price += cost_price1;
                  }
                  String real_cost_price2 = request.getParameter(tem_real_cost_price);
                  StringTokenizer tokenTO4 = new StringTokenizer(real_cost_price2, ",");
                  String real_cost_price = "";
                  while (tokenTO4.hasMoreTokens()) {
                    String real_cost_price1 = tokenTO4.nextToken();
                    real_cost_price += real_cost_price1;
                  }
                  String amount_unit = request.getParameter(tem_amount_unit);
                  double amount = 0.0d;
                  double subtotal =
                      Double.parseDouble(list_price)
                          * (1 - Double.parseDouble(off_discount) / 100)
                          * Double.parseDouble(amount1);
                  double cost_price_after_discount_sum =
                      Double.parseDouble(cost_price) * Double.parseDouble(amount1);
                  double real_cost_price_after_discount_sum =
                      Double.parseDouble(real_cost_price) * Double.parseDouble(amount1);
                  sale_price_sum += subtotal;
                  cost_price_sum += cost_price_after_discount_sum;
                  real_cost_price_sum += real_cost_price_after_discount_sum;

                  double order_sale_bonus_subtotal =
                      getRateFromID.getRateFromID(
                              (String) dbSession.getAttribute("unit_db_name"),
                              "design_file",
                              "product_ID",
                              product_ID,
                              "order_sale_bonus_rate")
                          * subtotal
                          / 100;
                  double order_profit_bonus_subtotal = 0.0d;

                  String sql1 =
                      "update purchase_discussion_details set product_ID='"
                          + product_ID
                          + "',product_name='"
                          + product_name
                          + "',product_describe='"
                          + product_describe
                          + "',list_price='"
                          + list_price
                          + "',amount='"
                          + amount1
                          + "',cost_price='"
                          + cost_price
                          + "',off_discount='"
                          + off_discount
                          + "',subtotal='"
                          + subtotal
                          + "' where discussion_ID='"
                          + discussion_ID
                          + "' and details_number='"
                          + i
                          + "'";
                  purchase_db.executeUpdate(sql1);

                  String product_type = "";
                  String sql16 = "select * from design_file where product_ID='" + product_ID + "'";
                  ResultSet rs16 = purchase_db.executeQuery(sql16);
                  if (rs16.next()) {
                    product_type = rs16.getString("type");
                  }
                  if (product_type.equals("物料") || product_type.equals("外购商品")) {
                    stock_number += 1;
                  } else if (product_type.equals("商品")
                      || product_type.equals("部件")
                      || product_type.equals("委外部件")) {
                    stock_number += 1;
                  } else if (product_type.equals("服务型产品")) {
                    service_count++;
                  }
                }
                String sql2 =
                    "update purchase_workflow set checker='"
                        + checker
                        + "',checker_ID='"
                        + checker_ID
                        + "',check_time='"
                        + check_time
                        + "',check_tag='1' where object_ID='"
                        + discussion_ID
                        + "' and config_id='"
                        + config_id
                        + "'";
                purchase_db.executeUpdate(sql2);
                sql2 =
                    "select id from purchase_workflow where object_ID='"
                        + discussion_ID
                        + "' and check_tag='0'";
                ResultSet rset = purchase_db.executeQuery(sql2);
                if (!rset.next()) {
                  sql2 =
                      "update purchase_discussion set sale_price_sum='"
                          + sale_price_sum
                          + "',cost_price_sum='"
                          + cost_price_sum
                          + "',modify_tag='0',discussion_tag='1',discussion_status='等待',check_tag='1' where discussion_ID='"
                          + discussion_ID
                          + "'";
                  purchase_db.executeUpdate(sql2);
                } else {
                  sql2 =
                      "update purchase_discussion set sale_price_sum='"
                          + sale_price_sum
                          + "',cost_price_sum='"
                          + cost_price_sum
                          + "',modify_tag='0' where discussion_ID='"
                          + discussion_ID
                          + "'";
                  purchase_db.executeUpdate(sql2);
                }
              } catch (Exception ex) {
                ex.printStackTrace();
              }
              response.sendRedirect(
                  "purchase/discussion/check_choose_attachment.jsp?discussion_ID="
                      + discussion_ID
                      + "");
            } else {
              response.sendRedirect("purchase/discussion/check_ok.jsp?finished_tag=0");
            }
          } else {
            response.sendRedirect("purchase/discussion/check_ok.jsp?finished_tag=1");
          }
        } else {
          response.sendRedirect("purchase/discussion/check_ok.jsp?finished_tag=2");
        }
        purchase_db.commit();
        purchase_db.close();
      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  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("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      LoggedUser loggedUser = (LoggedUser) session.getAttribute(Constants.SessionKey.LOGGED_USER);
      out.write('\r');
      out.write('\n');
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE HTML>\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("    <head>\r\n");
      out.write(
          "        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(request.getContextPath());
      out.write("/css/default.css\">\r\n");
      out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(request.getContextPath());
      out.write("/css/validation.css\">\r\n");
      out.write("        <script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/js/default.js\"></script>\r\n");
      out.write("        <script type=\"text/javascript\" src=\"");
      out.print(request.getContextPath());
      out.write("/js/jquery-1.10.2.min.js\"></script>\r\n");
      out.write("        \r\n");
      out.write("        <script> \r\n");
      out.write("\t\t\tvar PAGING = ");
      out.print(Constants.PAGING);
      out.write(";\r\n");
      out.write("\t\t</script>\r\n");
      out.write("        \r\n");
      out.write("        ");
      if (_jspx_meth_tiles_005fimportAttribute_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("        <title>");
      if (_jspx_meth_spring_005fmessage_005f0(_jspx_page_context)) return;
      out.write(' ');
      out.write('|');
      out.write(' ');
      if (_jspx_meth_spring_005fmessage_005f1(_jspx_page_context)) return;
      out.write("</title>\r\n");
      out.write("    </head>\r\n");
      out.write("    \r\n");
      out.write("    <body>\r\n");
      out.write("    \t<header>\r\n");
      out.write("    \t\t<div id=\"titles\">\r\n");
      out.write("\t\t\t\t<h1>");
      if (_jspx_meth_spring_005fmessage_005f2(_jspx_page_context)) return;
      out.write("</h1>\r\n");
      out.write("\t\t\t\t<h2>");
      if (_jspx_meth_spring_005fmessage_005f3(_jspx_page_context)) return;
      out.write("</h2>\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("\t\t\t\r\n");
      out.write("\t\t\t<div id=\"links\">\r\n");
      out.write("\t\t\t\t");
      if (_jspx_meth_c_005furl_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("\t\t\t\t");
      if (_jspx_meth_c_005furl_005f1(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("\t\t\t\t<a href=\"");
      out.write(
          (java.lang.String)
              org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                  "${urlLocaleEn}",
                  java.lang.String.class,
                  (PageContext) _jspx_page_context,
                  null,
                  false));
      out.write("\">en</a> | <a href=\"");
      out.write(
          (java.lang.String)
              org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                  "${urlLocaleCz}",
                  java.lang.String.class,
                  (PageContext) _jspx_page_context,
                  null,
                  false));
      out.write("\">cz</a>\r\n");
      out.write("\t\t\t\t\r\n");
      out.write("\t\t\t\t<br>\r\n");
      out.write("\t\t\t\t\r\n");
      out.write("\t\t\t\t");
      if (loggedUser != null) {
        out.write("\r\n");
        out.write("\t\t\t\t\t<br>\r\n");
        out.write("\t\t\t\t\t");
        if (_jspx_meth_c_005fout_005f0(_jspx_page_context)) return;
        out.write("\r\n");
        out.write("\t\t\t\t\t<br>\r\n");
        out.write("\t\t\t\t\t");
        if (_jspx_meth_c_005furl_005f2(_jspx_page_context)) return;
        out.write("\r\n");
        out.write("\t\t\t\t\t<a href=\"");
        out.write(
            (java.lang.String)
                org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                    "${urlLogout}",
                    java.lang.String.class,
                    (PageContext) _jspx_page_context,
                    null,
                    false));
        out.write('"');
        out.write('>');
        if (_jspx_meth_spring_005fmessage_005f4(_jspx_page_context)) return;
        out.write("</a>\r\n");
        out.write("\t\t\t\t");
      }
      out.write("\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("    \t</header>\r\n");
      out.write("    \t\r\n");
      out.write("    \t<br class=\"clear\">\r\n");
      out.write("    \t\r\n");
      out.write("    \t<nav>\r\n");
      out.write("    \t\t");
      if (_jspx_meth_tiles_005finsertAttribute_005f0(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("    \t</nav>\r\n");
      out.write("    \t\r\n");
      out.write("    \t<article>\r\n");
      out.write("    \t\t");
      if (_jspx_meth_tiles_005finsertAttribute_005f1(_jspx_page_context)) return;
      out.write("\r\n");
      out.write("    \t</article>\r\n");
      out.write("    \t\r\n");
      out.write("    \t<footer>\r\n");
      out.write("    \t\t<p>Copyright 2013 &#169; Pavel Reznicek. All rights reserved.</p>\r\n");
      out.write("    \t</footer>\r\n");
      out.write("    </body>\r\n");
      out.write("</html>\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);
    }
  }
Example #20
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    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 {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=gb2312");
      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");

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\t\t\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("\t<head>\r\n");
      out.write("\t\t<base href=\"");
      out.print(basePath);
      out.write("\">\r\n");
      out.write("\t\t<title>左侧导航</title>\r\n");
      out.write("\t\t<style type=text/css>\r\n");
      out.write("\t\t\tbody  {\r\n");
      out.write("\t\t\t\tmargin:0px;\r\n");
      out.write("\t\t\t\tbackground-color: #0080C0;\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t\ttable  { border:0px; }\r\n");
      out.write("\t\t\ttd  { font:normal 12px 宋体; }\r\n");
      out.write("\t\t\timg  { vertical-align:bottom; border:0px; }\r\n");
      out.write("\t\t\ta  { font:normal 12px 宋体; color:#000000; text-decoration:none; }\r\n");
      out.write("\t\t\ta:hover  { color:#cc0000;text-decoration:underline; }\r\n");
      out.write(
          "\t\t\t.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#EAEAEA; }\r\n");
      out.write("\t\t\t.menu_title  {\r\n");
      out.write("\t\t\t\tpadding-left: 20px;\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t</style>\r\n");
      out.write("\t\t<script language=\"JavaScript\">\r\n");
      out.write("\t\t\tfunction preloadImg(src)\r\n");
      out.write("\t\t\t{\r\n");
      out.write("\t\t\t\tvar img=new Image();\r\n");
      out.write("\t\t\t\timg.src=src\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t\tpreloadImg(\"image/dh_open.gif\");\r\n");
      out.write("\t\t\t\r\n");
      out.write("\t\t\tvar displayBar=true;\r\n");
      out.write("\t\t\tfunction switchBar(obj)\r\n");
      out.write("\t\t\t{\r\n");
      out.write("\t\t\t\tif (displayBar)\r\n");
      out.write("\t\t\t\t{\r\n");
      out.write("\t\t\t\t\tparent.frame.cols=\"0,*\";\r\n");
      out.write("\t\t\t\t\tdisplayBar=false;\r\n");
      out.write("\t\t\t\t\tobj.src=\"image/dh_open.gif\";\r\n");
      out.write("\t\t\t\t\tobj.title=\"打开管理菜单\";\r\n");
      out.write("\t\t\t\t}\r\n");
      out.write("\t\t\t\telse{\r\n");
      out.write("\t\t\t\t\tparent.frame.cols=\"180,*\";\r\n");
      out.write("\t\t\t\t\tdisplayBar=true;\r\n");
      out.write("\t\t\t\t\tobj.src=\"image/dh_close.gif\";\r\n");
      out.write("\t\t\t\t\tobj.title=\"关闭管理菜单\";\r\n");
      out.write("\t\t\t\t}\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t\tfunction spread(thename,img)\r\n");
      out.write("\t\t\t{\r\n");
      out.write("\t\t\tif(document.all[thename].style.display==\"none\")\r\n");
      out.write("\t\t\t  {document.all[thename].style.display=\"\";\r\n");
      out.write("\t\t\t  img.src=\"admin/images/up.gif\"}\r\n");
      out.write("\t\t\telse\r\n");
      out.write("\t\t\t  {document.all[thename].style.display=\"none\";\r\n");
      out.write("\t\t\t  img.src=\"admin/images/down.gif\"}\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t</script>\r\n");
      out.write("\t</head>\r\n");
      out.write("\t<body>\r\n");

      Teacher user = (Teacher) session.getAttribute("USER");

      out.write("\r\n");
      out.write("\t\t<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\"\r\n");
      out.write("\t\t\tcellspacing=\"0\">\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<td height=\"1\">&nbsp;\r\n");
      out.write("\t\t\t\t\t\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write(
          "\t\t\t\t<td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write(
          "\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t\t\t<td>\r\n");
      out.write("\t\t\t\t\t\t\t\t<a href=\"admin/main.jsp\" target=\"main\"><b>管理首页</b>\r\n");
      out.write("\t\t\t\t\t\t\t\t</a> |\r\n");
      out.write("\t\t\t\t\t\t\t\t<a href=\"admin/logout.jsp\" target=\"_parent\"><b>退出</b>\r\n");
      out.write("\t\t\t\t\t\t\t\t</a>\r\n");
      out.write("\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t\t<td width=\"40\" align=\"center\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t<img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img0\" onClick=\"javascript:spread('list0',this)\" style=\"cursor:hand\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\r\n");
      out.write("\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\t</table>\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<td align=\"center\">\r\n");
      out.write("\t\t\t\t\t<div class=\"sec_menu\" style=\"width:158\">\r\n");
      out.write(
          "\t\t\t\t\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\"\r\n");
      out.write("\t\t\t\t\t\t\tcellspacing=\"0\" id=\"list0\" style=\"display:\">\r\n");
      out.write("\t\t\t\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t<td height=\"20\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t用户名:\t");
      out.print(user.getTeacher());
      out.write("\t\t\t\t\t\t\t\t\r\n");
      out.write("\t\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t<td height=\"20\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t部&nbsp;&nbsp;门:");
      out.print(user.getPart());
      out.write("\t\t\t\t\t\t\t\t\t\r\n");
      out.write("\t\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t<td height=\"20\">\r\n");
      out.write(
          "\t\t\t\t\t\t\t\t\t<a href=\"admin/users/ModifyPwd.jsp\" target=\"main\">修改登录密码</a>\r\n");
      out.write("\t\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\t\t</table>\r\n");
      out.write("\t\t\t\t\t</div>\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t\t<tr>\r\n");
      out.write("\t\t\t\t<td height=\"1\">&nbsp;\r\n");
      out.write("\t\t\t\t\t\r\n");
      out.write("\t\t\t\t</td>\r\n");
      out.write("\t\t\t</tr>\r\n");
      out.write("\t\t</table>\r\n");
      out.write(
          "\t\t<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list1','img1');\">网站管理</td>\r\n");
      out.write(
          "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list1','img1');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img1\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t\t<div class=\"sec_menu\" style=\"width:158\">\r\n");
      out.write(
          "\t\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list1\" style=\"display:\">\r\n");
      out.write("      \t\t\t<tr>\r\n");
      out.write(
          "        \t\t\t<td height=\"20\"><a href=\"admin/news/AddNews.jsp\" target=\"main\">添加文章</a></td>\r\n");
      out.write("      \t\t\t</tr>\r\n");
      out.write("      \t\t\t<tr>\r\n");
      out.write(
          "        \t\t\t<td height=\"20\"><a href=\"admin/news/NewsList.jsp\" target=\"main\">文章管理</a></td>\r\n");
      out.write("      \t\t\t</tr>\r\n");
      out.write(" ");

      if (UserManage.HasRight(2, user)
          || UserManage.HasRight(3, user)
          || UserManage.HasRight(4, user)
          || UserManage.HasRight(6, user)) {

        out.write("\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/dailyfiles/Upload.jsp\" target=\"main\">上传常用资料</a> | <a href=\"admin/dailyfiles/FileList.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
      }
      if (UserManage.HasRight(4, user)) {

        out.write("\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/lecture/lecture_add.jsp\" target=\"main\">发布学术活动</a> | <a href=\"admin/lecture/lecture_list.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
      }
      if (UserManage.HasRight(8, user)) {

        out.write("\r\n");
        out.write(" \r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/vote/AddVote.jsp\" target=\"main\">发布网站调查</a> | <a href=\"admin/vote/VoteList.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("        \t\t</tr>\r\n");
      }
      if (UserManage.HasRight(2, user) || UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/message/Msg_list.jsp\" target=\"main\">回复站内留言</a></td>\r\n");
        out.write("        \t\t\r\n");
        out.write("        \t\t</tr>\r\n");
      }
      if (UserManage.HasRight(8, user)) {

        out.write("\r\n");
        out.write("\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/classroom/ClassroomList.jsp\" target=\"main\">批复活动申请</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
      }
      if (user.getIsadmin() != null && user.getIsadmin() > 0) {

        out.write("\r\n");
        out.write("        <tr>\r\n");
        out.write(
            "          <td height=\"20\"><a href=\"admin/users/UserList.jsp\" target=\"main\">用户管理</a> | <a href=\"admin/column/ClassList.jsp\" target=\"main\">栏目管理</a></td>\r\n");
        out.write("        </tr>\r\n");
      }

      out.write("\r\n");
      out.write("        <!--  \r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td height=\"20\"><a href=\"admin_sys.asp\" target=\"main\">系统管理</a> | <a href=\"count/main.asp\" target=\"main\">统计系统</a></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("       \t-->\r\n");
      out.write("      </table>\r\n");
      out.write("\t  </div>\r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list2','img2');\">信息库管理</td>\r\n");
      out.write(
          "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list2','img2');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img2\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
      out.write(
          "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list2\" style=\"display:\">\r\n");

      if (UserManage.HasRight(9, user)) {

        out.write("\r\n");
        out.write("      \t\t<tr>\r\n");
        out.write(
            "       \t \t\t<td height=\"20\"><a href=\"admin/leader/LeaderList.jsp\" target=\"main\">领导信息库</a></td>\r\n");
        out.write("     \t \t</tr>\r\n");
      }
      if (UserManage.HasRight(5, user)) {

        out.write("\r\n");
        out.write("       \t\t<tr>\r\n");
        out.write(
            "         \t\t<td height=\"20\"><a href=\"admin/professor/ProfessorList.jsp\" target=\"main\">教师信息库</a></td>\r\n");
        out.write("        \t</tr>\r\n");
      }
      if (UserManage.HasRight(0, user)) {

        out.write("\r\n");
        out.write("     \t \t<tr>\r\n");
        out.write(
            "        \t\t<td height=\"20\"><a href=\"admin/student/StudentList.jsp\" target=\"main\">学生信息库</a></td>\r\n");
        out.write("      \t\t</tr>\r\n");
      }
      if (UserManage.HasRight(0, user) || UserManage.HasRight(7, user)) {

        out.write("\r\n");
        out.write("       \t\t<tr>\r\n");
        out.write(
            "        \t\t<td height=\"20\"><a href=\"admin/commie/CommieList.jsp\" target=\"main\">学生党员信息库</a></td>\r\n");
        out.write("      \t\t</tr>\r\n");
      }
      if (UserManage.HasRight(0, user)) {

        out.write("\r\n");
        out.write("      \t\t<tr>\r\n");
        out.write(
            "        \t\t<td height=\"20\"><a href=\"admin/student/AidStudentList.jsp\" target=\"main\">经济困难学生信息库</a></td>\r\n");
        out.write("      \t\t</tr>\r\n");
        out.write("      \t\t<tr>\r\n");
        out.write(
            "        \t\t<td height=\"20\"><a href=\"admin/course/Course_List.jsp\" target=\"main\">课程信息库</a></td>\r\n");
        out.write("      \t\t</tr>\r\n");
        out.write("      \t\t<tr>\r\n");
        out.write(
            "        \t\t<td height=\"20\"><a href=\"admin/quality/ExpList.jsp\" target=\"main\">创新实验信息库</a></td>\r\n");
        out.write("      \t\t</tr>\r\n");
      }

      out.write("\r\n");
      out.write("\t  \t</table>\r\n");
      out.write("\t  </div>\r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");

      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write("\r\n");
        out.write(
            "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
        out.write("  <tr>\r\n");
        out.write(
            "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
        out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
        out.write("        <tr>\r\n");
        out.write(
            "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list8','img8');\">科学发展观学习</td>\r\n");
        out.write(
            "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list8','img8');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img8\"></td>\r\n");
        out.write("        </tr>\r\n");
        out.write("      </table></td>\r\n");
        out.write("  </tr>\r\n");
        out.write("  <tr>\r\n");
        out.write("    <td align=\"center\">\r\n");
        out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
        out.write(
            "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list8\" style=\"display:\">\t\t\t\r\n");
        out.write(" \r\n");
        out.write("                <tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/kxfzg/AddNews.jsp\" target=\"main\">添加文章</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/kxfzg/NewsList.jsp\" target=\"main\">文章管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/kxfzg/LookInfo.jsp\" target=\"main\">留言管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("\t\t\t\r\n");
      }
      // if(UserManage.HasRight(8,user)){

      out.write("\r\n");
      out.write("\r\n");
      out.write("      </table>\r\n");
      out.write("\t  </div>\r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list3','img3');\">推免生招生系统</td>\r\n");
      out.write(
          "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list3','img3');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img3\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
      out.write(
          "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list3\" style=\"display:\">\t\t\t\r\n");
      out.write(" ");

      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/tmszsxt/Open.jsp\" target=\"main\">开启</a>|<a href=\"admin/tmszsxt/Close.jsp\" target=\"main\">关闭推免生系统</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
      }
      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write("                \r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/tmszsxt/tmnews/TmnewsAdd.jsp\" target=\"main\">发布推免生通知</a> | <a href=\"admin/tmszsxt/tmnews/TmnewsList.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/tmszsxt/tmstudent/TmstudentListSq.jsp\" target=\"main\">查看推免生申请结果</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
      }
      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write(" \r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/tmszsxt/tmstudent/TmstudentList.jsp\" target=\"main\">添加考核通知和录取信息</a>\r\n");
        out.write("        \t\t</tr>\r\n");
      }
      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/tmszsxt/tmstudent/TmstudentListDc.jsp\" target=\"main\">导出申请人列表</a></td>\r\n");
        out.write("        \t\t\r\n");
        out.write("        \t\t</tr>\r\n");
        out.write("\t\t\t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"http://eaie.njtu.edu.cn/lwtj/adminlogin.aspx\" target=\"main\">硕士答辩论文提交系统</a></td>\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\t<td height=\"20\"><a href=\"http://eaie.njtu.edu.cn/bslwtj/adminlogin.aspx\" target=\"main\">博士答辩论文提交系统</a></td>\r\n");
        out.write("        \t\t\r\n");
        out.write("        \t\t</tr>\r\n");
        out.write("\r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"http://eaie.bjtu.edu.cn/yanjiu/course/admin/admin_login.asp\" target=\"main\">研究生课程评价系统</a></td>\r\n");
        out.write("        \t\t\r\n");
        out.write("        \t\t</tr>\r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"http://eaie.bjtu.edu.cn/yanjiu/assistant/admin/admin_login.asp\" target=\"main\">研究生三助系统</a></td>\r\n");
        out.write("        \t\t\r\n");
        out.write("        \t\t</tr>\r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"http://eaie.bjtu.edu.cn/yanjiu/lwps/admin/admin_login.asp\" target=\"main\">研究生学位论文评审系统</a></td>\r\n");
        out.write("        \t\t\r\n");
        out.write("        \t\t</tr>\r\n");
        out.write("       ");
      }

      out.write(" \t\t\r\n");
      out.write("                    \r\n");
      out.write("                  </table>\r\n");
      out.write("                  </div>\r\n");
      out.write("                  </td>\r\n");
      out.write("                  </tr>\r\n");
      out.write("                  </table>\r\n");
      out.write("                 \r\n");
      out.write(
          "                   <table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list4','img4');\">硕博连读招生系统</td>\r\n");
      out.write(
          "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list4','img4');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img4\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
      out.write(
          "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list4\" style=\"display:\">\t\t\t\r\n");
      out.write(" ");

      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write(" <tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/sbldxt/Sbopen.jsp\" target=\"main\">开启</a>|<a href=\"admin/sbldxt/Sbclose.jsp\" target=\"main\">关闭招生系统</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/sbldxt/sbldnews/SbnewsAdd.jsp\" target=\"main\">发布硕博通知</a> | <a href=\"admin/sbldxt/sbldnews/SbnewsList.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/sbldxt/sbldstudent/SbstudentListSq.jsp\" target=\"main\">查看申请结果</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/sbldxt/sbldstudent/SbstudentListDc.jsp\" target=\"main\">导出申请列表</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("\t\t\t\r\n");
      }
      // if(UserManage.HasRight(8,user)){

      out.write("\r\n");
      out.write("\r\n");
      out.write("      </table>\r\n");
      out.write("\t  </div>\r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list5','img5');\">提前攻博招生系统</td>\r\n");
      out.write(
          "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list5','img5');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img3\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
      out.write(
          "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list5\" style=\"display:\">\t\t\t\r\n");
      out.write(" ");

      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write(" <tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/tqgbxt/Tqgbopen.jsp\" target=\"main\">开启</a>|<a href=\"admin/tqgbxt/Tqgbclose.jsp\" target=\"main\">关闭招生系统</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/tqgbxt/tqgbnews/TqgbnewsAdd.jsp\" target=\"main\">发布硕博通知</a> | <a href=\"admin/tqgbxt/tqgbnews/TqgbnewsList.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/tqgbxt/tqgbstudent/TqgbstudentListSq.jsp\" target=\"main\">查看申请结果</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/tqgbxt/tqgbstudent/TqgbstudentListDc.jsp\" target=\"main\">导出申请列表</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("\t\t\t\r\n");
      }
      // if(UserManage.HasRight(8,user)){

      out.write("\r\n");
      out.write("\r\n");
      out.write("      </table>\r\n");
      out.write("\t  </div>\r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list6','img6');\">博士生系统管理</td>\r\n");
      out.write(
          "          <td width=\"40\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list6','img6');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img4\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
      out.write(
          "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list6\" style=\"display:\">\t\t\t\r\n");
      out.write(" ");

      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/bszsxt/bsnews/BsnewsAdd.jsp\" target=\"main\">发布博士生通知</a> | <a href=\"admin/bszsxt/bsnews/BsnewsList.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/bszsxt/bsstudent/BsstudentList.jsp\" target=\"main\">上传博士生信息</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("\t\t\t\t<tr>\r\n");
        out.write(
            "          \t<td height=\"20\"><a href=\"admin/bszsxt/bsstudent/BsstudentListbj.jsp\" target=\"main\">编辑博士生信息</a>\r\n");
        out.write("        \t\t</tr>\r\n");
      }

      out.write("\r\n");
      out.write("       \r\n");
      out.write("      </table>\r\n");
      out.write("      \r\n");
      out.write("  </div>\r\n");
      out.write("  </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  </table>\r\n");
      out.write("  \r\n");
      out.write(
          "  <table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"1\">&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write(
          "<table width=\"158\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("  <tr>\r\n");
      out.write(
          "    <td height=\"25\" background=\"admin/images/dh_bg.gif\" class=\"menu_title\">\r\n");
      out.write("\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("        <tr>\r\n");
      out.write(
          "          <td style=\"cursor:hand\" onClick=\"javascript:spread('list7','img7');\">工程硕士选课系统</td>\r\n");
      out.write(
          "          <td width=\"30\" align=\"center\" style=\"cursor:hand\" onClick=\"javascript:spread('list7','img7');\"><img src=\"admin/images/up.gif\" width=\"12\" height=\"12\" border=\"0\" id=\"img5\"></td>\r\n");
      out.write("        </tr>\r\n");
      out.write("      </table></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\">\r\n");
      out.write("\t<div class=sec_menu style=\"width:158\">\r\n");
      out.write(
          "\t\t<table width=\"130\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" id=\"list7\" style=\"display:\">\t\t\t\r\n");
      out.write(" ");

      if (UserManage.HasRight(3, user)) {

        out.write("\r\n");
        out.write(" <tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/gcxkxt/gcxkopen.jsp\" target=\"main\">开启</a>|<a href=\"admin/gcxkxt/gcxkclose.jsp\" target=\"main\">关闭选课系统</a>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\t  \t\t\t<tr>\r\n");
        out.write(
            "        \t\t\t<td height=\"20\"><a href=\"admin/gcxkxt/gcxknews/gcxknewsadd.jsp\" target=\"main\">发布选课通知</a> | <a href=\"admin/gcxkxt/gcxknews/gcxknewslist.jsp\" target=\"main\">管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/gcxkxt/gcxkcourse/Gcchoose.jsp\" target=\"main\">课程管理</a> | <a href=\"admin/gcxkxt/gcxkteacher/GcteacherList.jsp\" target=\"main\">教师管理</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("      \t\t\t\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/gcxkxt/gcxkstudent/GcstudentList.jsp\" target=\"main\">学生管理</a>|<a href=\"admin/gcxkxt/gcxkstudent/GcstudentListbj.jsp\" target=\"main\">上传学生信息</a></td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("      \t\t\t<tr>\r\n");
        out.write(
            "          \t\t\t<td height=\"20\"><a href=\"admin/gcxkxt/gcxkinfo/Gcchoose.jsp\" target=\"main\">选课管理</a>\r\n");
        out.write("      \t\t\t</td>\r\n");
        out.write("      \t\t\t</tr>\r\n");
        out.write("\r\n");
        out.write("\t\t\t\r\n");
      }
      // if(UserManage.HasRight(8,user)){

      out.write("\r\n");
      out.write("\r\n");
      out.write("      </table>\r\n");
      out.write("\t  </div>\r\n");
      out.write("    </td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("                   \r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #21
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    String _value = null;
    try {

      if (_jspx_inited == false) {
        synchronized (this) {
          if (_jspx_inited == false) {
            _jspx_init();
            _jspx_inited = true;
          }
        }
      }
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=GBK");
      pageContext =
          _jspxFactory.getPageContext(this, request, response, "/error.jsp", true, 8192, true);

      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();

      // HTML // begin [file="/gmc/integrate.jsp";from=(0,147);to=(1,0)]
      out.write("\r\n");

      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(1,57);to=(2,0)]
      out.write("\r\n");

      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(2,56);to=(3,0)]
      out.write("\r\n");

      // end
      // begin [file="/gmc/integrate.jsp";from=(3,0);to=(3,43)]
      /* ----  power:checkpower ---- */
      com.kingsoft.gmsystem.web.taglib.PowerTag _jspx_th_power_checkpower_0 =
          new com.kingsoft.gmsystem.web.taglib.PowerTag();
      _jspx_th_power_checkpower_0.setPageContext(pageContext);
      _jspx_th_power_checkpower_0.setParent(null);
      _jspx_th_power_checkpower_0.setModulecode("havelogin");
      try {
        int _jspx_eval_power_checkpower_0 = _jspx_th_power_checkpower_0.doStartTag();
        if (_jspx_eval_power_checkpower_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
          throw new JspTagException(
              "Since tag handler class com.kingsoft.gmsystem.web.taglib.PowerTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
        if (_jspx_eval_power_checkpower_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            // end
            // begin [file="/gmc/integrate.jsp";from=(3,0);to=(3,43)]
          } while (_jspx_th_power_checkpower_0.doAfterBody()
              == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
        }
        if (_jspx_th_power_checkpower_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
          return;
      } finally {
        _jspx_th_power_checkpower_0.release();
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(3,43);to=(10,0)]
      out.write(
          "\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\">\r\n<title>GM频道处理</title>\r\n<link href=\"../css/public.css\" rel=\"stylesheet\" type=\"text/css\">\r\n<script language=\"JavaScript\" src=\"../js/public.js\"></script>\r\n");

      // end
      // begin [file="/gmc/integrate.jsp";from=(10,2);to=(15,0)]

      response.addHeader("Pragma", "no-cache");
      response.addHeader("Cache-Control", "no-cache");
      response.addDateHeader("Expires", -1);
      UserInfo userinfo = (UserInfo) session.getAttribute("userinfo");
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(15,2);to=(17,13)]
      out.write("\r\n<script language=\"Javascript\">\r\nvar AbsPath=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(17,16);to=(17,40)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(17,42);to=(220,48)]
      out.write(
          "\";\r\n\r\n//取得系统当前日期\r\n\r\nfunction CheckEnter()\r\n{\r\n\tif(event.ctrlKey && window.event.keyCode==10){\r\n\t\t onAnswer();\r\n\t}\r\n}\r\n\r\nfunction SetSubmitData()\r\n{\r\n\t\tfrmSubmit.document.all(\"questionid\").value=document.all(\"questionid\").value;\r\n\t\tfrmSubmit.document.all(\"quiztime\").value=document.all(\"quiztime\").value;\r\n\t\tfrmSubmit.document.all(\"gateway\").value=document.all(\"selGateway\").options[document.all(\"selGateway\").selectedIndex].value;\r\n\t\tfrmSubmit.document.all(\"game_id\").value=document.all(\"game_id\").value;\r\n\t\tfrmSubmit.document.all(\"area\").value=document.all(\"area\").value;\r\n\t\tfrmSubmit.document.all(\"group\").value=document.all(\"group\").value;\r\n\t\tfrmSubmit.document.all(\"account\").value=document.all(\"account\").value;\r\n\t\tfrmSubmit.document.all(\"role\").value=document.all(\"role\").value;\r\n\t\tfrmSubmit.document.all(\"question\").value=document.all(\"question\").value;\r\n\t\tfrmSubmit.document.all(\"answer\").value=document.all(\"answer\").value;\r\n\t\tfrmSubmit.document.all(\"usercode\").value=document.all(\"usercode\").value;\r\n\t\tfrmSubmit.document.all(\"term\").value=document.all(\"term\").value;\r\n\t\tfrmSubmit.document.all(\"allquestion\").value=document.all(\"allquestion\").checked?\"1\":\"0\";\r\n\t\tfrmSubmit.document.all(\"message\").value=document.all(\"answer\").value;\r\n}\r\n\r\n/***********************************************\r\n答复问题\r\n***********************************************/\r\n\r\nfunction onAnswer()\r\n{\r\n\t\tvar strErr=\"\";\r\n\t\tif(IsEmpty(\"answer\"))\r\n\t\t{\r\n\t\t\tstrErr+=\"答复内容不能为空!\\n\";\r\n\t\t}\r\n\t\telse if(document.all(\"answer\").value.length>106)\tstrErr+=\"答复内容已超过106个字符(53个汉字),请缩短答复内容后再试!\\n\";\r\n\t\tif(strErr!=\"\")\r\n\t\t{\r\n\t\t\talert(strErr);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"action\").value=\"answerquestion\";\r\n\t\t\tfrmSubmit.document.all(\"frmSubmit\").submit();\r\n\t\t\tfrmPlayerList.objOption.answer=document.all(\"answer\").value;\r\n\t\t\tSetQuestionState();\r\n\t\t}\r\n}\r\n\r\n/***********************************************\r\n删除问题\r\n***********************************************/\r\nfunction onDelete()\r\n{\r\n\t\tSetSubmitData();\r\n\t\tfrmSubmit.document.all(\"action\").value=\"deletequestion\";\r\n\t\tfrmSubmit.document.all(\"frmSubmit\").submit();\r\n\t\tfrmPlayerList.objOption.answer=\"此问题已删除!\";\r\n\t\tSetQuestionState();\r\n}\r\n\r\nfunction SetQuestionState()\r\n{\r\n\t\tfrmPlayerList.document.all(\"selPlayerList\").focus();\r\n\t\tfrmSubmit.src=AbsPath+\"/submit.jsp\";\r\n\t\tfrmPlayerList.objOption.className=\"haveanswer\";\r\n\t\tfrmPlayerList.intHaveAnswer++;\r\n\t\tdocument.all(\"lblHaveAnswer\").innerText=frmPlayerList.intHaveAnswer;\r\n\t\tdocument.all(\"answer\").disabled=true;\r\n\t\tdocument.all(\"selQuickanswer\").disabled=true;\r\n\t\tdocument.all(\"btnAnswer\").disabled=true;\r\n\t\tdocument.all(\"btnDelete\").disabled=true;\r\n\t\tif(frmPlayerList.intHaveAnswer!=frmPlayerList.intQuestion)\r\n\t\t{\r\n\t\t\tvar objSelPlayList=frmPlayerList.document.all(\"selPlayerList\");//玩家列表\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t \tfrmPlayerList.intCurrent++;\r\n\t\t\t\tif(frmPlayerList.intCurrent==frmPlayerList.intQuestion) frmPlayerList.intCurrent=0;\r\n\t\t\t}while(objSelPlayList.options[frmPlayerList.intCurrent].className==\"haveanswer\")\r\n\t\t\tobjSelPlayList.selectedIndex =frmPlayerList.intCurrent;\r\n\t\t\tfrmPlayerList.onSelectPlayer();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tReloadPlayerList();\r\n\t\t}\r\n\t\tif(document.all(\"allquestion\").checked){\r\n\t\t\tReloadPlayerList();\r\n\t\t}\r\n\t\tdocument.all(\"allquestion\").checked=false;\r\n}\r\n\r\n/***********************************************\r\n刷新问题列表\r\n***********************************************/\r\nfunction ReloadPlayerList()\r\n{\r\n\tdocument.all(\"allquestion\").checked=false;\r\n\tfrmPlayerList.window.location.reload();\r\n}\r\n\r\n/***********************************************\r\n选择快速答复列表\r\n***********************************************/\r\nfunction onQuickanswer()\r\n{\r\n\tdocument.all(\"answer\").value=document.all(\"selQuickanswer\").value\r\n}\r\n\r\nfunction answerlog(){\r\n\twindow.open(AbsPath+\"/search/answerlog.jsp\",\"_blank\");\r\n}\r\n/**********************************\r\n执行GM操作\r\n***********************************/\r\nfunction onGMFunction()\r\n{\r\n\tvar objSel=document.all(\"selGMFunction\");\r\n\tvar strErr=\"\";\r\n\tif(objSel.value==\"\")\r\n\t{\r\n\t\tstrErr+=\"*请先选择GM操作\\n\";\r\n\t}\r\n\tif(IsEmpty(\"account\")&&IsEmpty(\"role\"))\r\n\t{\r\n\t\tstrErr+=\"*玩家帐号和角色不能同时为空\\n\";\r\n\t}\r\n\tif(strErr!=\"\")\r\n\t{\r\n\t\talert(strErr);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tSetSubmitData();\r\n\t\tfrmSubmit.document.all(\"action\").value=\"quickgmfunction\";\r\n\t\tif(objSel.value==\"踢号\")\r\n\t\t{\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"卡号\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"kickaccount\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"踢人\")\r\n\t\t{\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"卡号\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"kickrole\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"禁言\")\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"乱发言\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"forbidsay\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"冻结帐号\")\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"违规\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"A_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"freeze\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"解除禁言\")\r\n\t\t{\r\n\t\t\tSetSubmitData();\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"改正以前违规行为\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"R_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"permitsay\";\r\n\t\t}\r\n\t\telse if(objSel.value==\"解冻帐号\")\r\n\t\t{\r\n\t\t\tfrmSubmit.document.all(\"message\").value=\"改正以前违规行为\";\r\n\t\t\tfrmSubmit.document.all(\"category\").value=\"A_N_CTRL\";\r\n\t\t\tfrmSubmit.document.all(\"command\").value=\"unfreeze\";\r\n\t\t}\r\n\t\tfrmSubmit.document.all(\"frmSubmit\").submit();\r\n\t\tdocument.all(\"allquestion\").checked=false;\r\n\t}\r\n}\r\n\tfunction setQuestionType(iid){\r\n\t\tvar objSelTemp = document.all(\"selQuestionTypeTemp\");\t\t\r\n\t\tvar objOption;\r\n\t\tdocument.all(\"typeDiv\").innerHTML = \"<button name=all onclick=changeQuestionType('0','all')>全部</button>\";\r\n\t\t\r\n\t\tvar i=0;\r\n\t\tfor(i=0;i<objSelTemp.length;i++){\r\n\t\t\tobjOption=objSelTemp.options[i];\r\n\t\t\tif(objOption.fid==0){\r\n\t\t\t\tdocument.all(\"typeDiv\").innerHTML += \"&nbsp;&nbsp;<button name=\"+objOption.value+\" onclick=changeQuestionType('\"+objOption.iid+\"','\"+objOption.value+\"')>\"+objOption.text+\"</button>\";\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\tvar preClickType = \"\";\r\n\tfunction changeQuestionType(iid,type){\r\n\t\tdocument.getElementById(\"frmPlayerList\").src=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(220,51);to=(220,75)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(220,77);to=(263,31)]
      out.write(
          "/GMCServlet?action=playerlist&type=\"+type+\"&iid=\"+iid;\r\n\t\t//ReloadPlayerList();\r\n\t\r\n\t\twindow.open(document.all.frmPlayerList.src,'frmPlayerList','');\r\n\t\t\r\n\t\tdocument.all(\"subTypeTd\").style.display = \"none\";\r\n\t\tvar objSel=document.all(\"subType\");\r\n\t\tvar objSelTemp=document.all(\"selQuestionTypeTemp\");\r\n\t\tvar objOption;\r\n\t\tobjSel.length=0;\r\n\t\tvar i=0;\r\n\t\tvar channel = \"全部\";\r\n\t\tfrmSubmit.document.all(\"channel\").value=channel;\r\n\t\t\r\n\t\tif(preClickType!=\"\"){\r\n\t\t\t\tdocument.getElementById(preClickType).className =\"\";\r\n\t\t}\r\n\t\tdocument.getElementById(type).className =\"ClickBUTTON\";\r\n\t\tpreClickType = type;\t\r\n\t\t\t\t\t\r\n\t\tif(iid == 0){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(i=0;i<objSelTemp.length;i++){\r\n\t\t\tobjOption=objSelTemp.options[i];\r\n\t\t\t\r\n\t\t\tif(objOption.iid==iid){\t\t\r\n\t\t\t\tchannel = objOption.text;\r\n\t\t\t\tfrmSubmit.document.all(\"channel\").value=channel;\r\n\t\t\t}\t\t\r\n\t\t\tif(objOption.fid==iid){\r\n\t\t\t\tobjSel.options[objSel.length]=new Option(objOption.text,objOption.value);\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\tif(objSel.length>0){\r\n\t\t\tdocument.all(\"subTypeTd\").style.display = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n</script>\r\n</head>\r\n<body onload=\"setQuestionType('");

      // end
      // begin [file="/gmc/integrate.jsp";from=(263,34);to=(263,82)]
      out.print(Util.setNullToNull(request.getParameter("iid")));
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(263,84);to=(281,104)]
      out.write(
          "')\">\r\n<table width=\"100%\" height=\"100%\" border=\"0\" align=\"center\" cellspacing=\"0\">\r\n  <tr>\r\n    <td height=\"20\" bgcolor=\"#BBDDFD\">&nbsp;&nbsp;当前位置:<span class=\"title\">服务功能</span> &gt;&gt; <span class=\"title\">GM频道处理(基于GCD新协议)</span></td>\r\n  </tr>\r\n  <tr>\r\n    <td align=\"center\" valign=\"top\">\r\n      <table width=\"100%\" border=\"1\" cellspacing=\"0\" bordercolor=\"#000000\" class=\"tablelist\">\r\n        <tbody>\r\n          <tr align=\"center\" height=\"50\">\r\n            <td background=\"../images/tab_bg.gif\"><div id=\"typeDiv\"></div><font color=\"#FFFFFF\">玩家问题列表(问题总数:</font><font color=\"#FF0000\">\r\n              <label id=\"lblNumber\">0</label>\r\n            </font><font color=\"#FFFFFF\">,已处理:</font><font color=\"#FF0000\">\r\n            <label id=\"lblHaveAnswer\">0</label>\r\n            </font>)</td>\r\n          </tr>\r\n          <tr align=\"center\">\r\n            <td height=\"380\">\r\n              <iframe name=\"frmPlayerList\" width=\"100%\" height=\"100%\" frameborder=0 scrolling=\"no\" src=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(281,107);to=(281,131)]
      out.print(request.getContextPath());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(281,133);to=(294,33)]
      out.write(
          "/GMCServlet?action=playerlist&type=all&iid=0\" marginwidth=\"0\" marginheight=\"0\">\r\n              对不起,你的浏览器不支持嵌入式框架。请升级到更高的版本。 </iframe>\r\n\t\t\t</td>\r\n          </tr>\r\n          <tr align=\"center\">\r\n            <td background=\"../images/tab_bg.gif\"><font color=\"#FFFFFF\">问题详情</font></td>\r\n          </tr>\r\n          <tr>\r\n            <td valign=\"top\">\r\n              <table width=\"100%\" border=\"0\" cellspacing=\"0\">\r\n                <tr>\r\n                  <td nowrap>玩家帐号<input type=\"text\" name=\"account\" value=\"\" size=\"15\"></td>\r\n                  <td nowrap>玩家角色<input type=\"text\" name=\"role\" value=\"\" size=\"15\"></td>\r\n                  <td nowrap>所属区服");

      // end
      // begin [file="/gmc/integrate.jsp";from=(294,33);to=(294,121)]
      /* ----  display:display ---- */
      com.kingsoft.gmsystem.web.taglib.UserTag _jspx_th_display_display_0 =
          new com.kingsoft.gmsystem.web.taglib.UserTag();
      _jspx_th_display_display_0.setPageContext(pageContext);
      _jspx_th_display_display_0.setParent(null);
      _jspx_th_display_display_0.setDisplayCode("select_gateway_person");
      _jspx_th_display_display_0.setProperty("selGateway");
      _jspx_th_display_display_0.setParameter("");
      try {
        int _jspx_eval_display_display_0 = _jspx_th_display_display_0.doStartTag();
        if (_jspx_eval_display_display_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
          throw new JspTagException(
              "Since tag handler class com.kingsoft.gmsystem.web.taglib.UserTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
        if (_jspx_eval_display_display_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            // end
            // HTML // begin [file="/gmc/integrate.jsp";from=(294,121);to=(294,131)]
            out.write("          ");

            // end
            // begin [file="/gmc/integrate.jsp";from=(294,131);to=(294,149)]
          } while (_jspx_th_display_display_0.doAfterBody()
              == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
        }
        if (_jspx_th_display_display_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } finally {
        _jspx_th_display_display_0.release();
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(294,149);to=(298,62)]
      out.write(
          "\r\n\t\t\t\t  <input type=\"hidden\" name=\"game_id\">\r\n                  <input type=\"hidden\" name=\"area\">\r\n                  <input type=\"hidden\" name=\"group\"></td>\r\n                  <input type=\"hidden\" name=\"usercode\" value=\"");

      // end
      // begin [file="/gmc/integrate.jsp";from=(298,65);to=(298,87)]
      out.print(userinfo.getUsercode());
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(298,89);to=(318,139)]
      out.write(
          "\">\r\n                  <input type=\"hidden\" name=\"questionid\"></td>\r\n                  <td nowrap id=\"subTypeTd\" style=\"display:none\">类型<select name=\"subType\"></select></td>\r\n                  <td nowrap>提问日期<input type=\"text\" name=\"quiztime\" value=\"\" readonly=\"true\"></td>\r\n                </tr>\r\n                <tr>\r\n                  <td colspan=\"6\"><textarea name=\"question\" style=\"width:100%\" rows=\"2\" readonly onMouseOver=\"this.focus()\" ></textarea></td>\r\n                </tr>\r\n              </table>\r\n            </td>\r\n          </tr>\r\n          <tr>\r\n            <td align=\"center\" background=\"../images/tab_bg.gif\"><font color=\"#FFFFFF\">答复内容</font></td>\r\n          </tr>\r\n          <tr>\r\n            <td>\r\n              <textarea name=\"answer\" style=\"width:100%\" rows=\"2\" disabled onKeyPress=\"CheckEnter()\"></textarea>\r\n            </td>\r\n          </tr>\r\n          <tr>\r\n            <td nowrap>快速答复<SELECT name='selQuickanswer'  onclick='onQuickanswer()' style='width:90%'  onmouseover='this.focus()'></SELECT>");

      // end
      // begin [file="/gmc/integrate.jsp";from=(318,139);to=(318,219)]
      /* ----  display:display ---- */
      com.kingsoft.gmsystem.web.taglib.UserTag _jspx_th_display_display_1 =
          new com.kingsoft.gmsystem.web.taglib.UserTag();
      _jspx_th_display_display_1.setPageContext(pageContext);
      _jspx_th_display_display_1.setParent(null);
      _jspx_th_display_display_1.setDisplayCode("select_quickanswer");
      _jspx_th_display_display_1.setProperty("selQuickanswerTemp");
      try {
        int _jspx_eval_display_display_1 = _jspx_th_display_display_1.doStartTag();
        if (_jspx_eval_display_display_1 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
          throw new JspTagException(
              "Since tag handler class com.kingsoft.gmsystem.web.taglib.UserTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
        if (_jspx_eval_display_display_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            // end
            // HTML // begin [file="/gmc/integrate.jsp";from=(318,219);to=(319,12)]
            out.write("\r\n            ");

            // end
            // begin [file="/gmc/integrate.jsp";from=(319,12);to=(319,30)]
          } while (_jspx_th_display_display_1.doAfterBody()
              == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
        }
        if (_jspx_th_display_display_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } finally {
        _jspx_th_display_display_1.release();
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(319,30);to=(333,5)]
      out.write(
          "\r\n\t\t\t</td>\r\n          </tr>\r\n          <tr>\r\n            <td align=\"right\" nowrap>\r\n              <table width=\"700\" border=\"0\" cellspacing=\"0\">\r\n                <tr align=\"center\">\r\n                  <td><input type=\"checkbox\" name=\"allquestion\">\r\n                  对此玩家所有问题操作</td>\r\n                  <td><button name=\"btnAnswer\" style=\"width:80\" onClick=\"onAnswer()\" disabled>答复问题</button></td>\r\n                  <td><button name=\"btnDelete\" style=\"width:80\"  onClick=\"onDelete()\" disabled>删除问题</button></td>\r\n                  <td><button name=\"btnFresh\" style=\"width:80\"  onClick=\"ReloadPlayerList()\">刷新问题列表</button><button name=\"btnanswerlog\" style=\"width:80\"  onClick=\"answerlog()\">答复记录</button></td>\r\n                  <td>GM操作<select name=\"selGMFunction\">\r\n\t\t\t\t\t<option value=\"\">=请选择=</option>\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(333,7);to=(333,63)]
      if (userinfo.getUserpower().indexOf("kickplayer") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(333,65);to=(333,97)]
        out.write(" <option value=\"踢号\">踢号</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(333,99);to=(333,100)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(333,102);to=(334,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(334,7);to=(334,63)]
      if (userinfo.getUserpower().indexOf("kickplayer") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(334,65);to=(334,97)]
        out.write(" <option value=\"踢人\">踢人</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(334,99);to=(334,100)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(334,102);to=(335,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(335,7);to=(335,63)]
      if (userinfo.getUserpower().indexOf("rolebehave") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(335,65);to=(335,97)]
        out.write(" <option value=\"禁言\">禁言</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(335,99);to=(335,100)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(335,102);to=(336,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(336,7);to=(336,65)]
      if (userinfo.getUserpower().indexOf("accountnctrl") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(336,67);to=(336,103)]
        out.write(" <option value=\"冻结帐号\">冻结帐号</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(336,105);to=(336,106)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(336,108);to=(337,6)]
      out.write("\r\n\t\t\t\t\t ");

      // end
      // begin [file="/gmc/integrate.jsp";from=(337,8);to=(337,63)]
      if (userinfo.getUserpower().indexOf("rolebehave") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(337,65);to=(337,101)]
        out.write(" <option value=\"解除禁言\">解除禁言</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(337,103);to=(337,104)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(337,106);to=(338,5)]
      out.write("\r\n\t\t\t\t\t");

      // end
      // begin [file="/gmc/integrate.jsp";from=(338,7);to=(338,65)]
      if (userinfo.getUserpower().indexOf("accountnctrl") != -1) {
        // end
        // HTML // begin [file="/gmc/integrate.jsp";from=(338,67);to=(338,103)]
        out.write(" <option value=\"解冻帐号\">解冻帐号</option> ");

        // end
        // begin [file="/gmc/integrate.jsp";from=(338,105);to=(338,106)]
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(338,108);to=(358,18)]
      out.write(
          "\r\n                  </select>期限<select name=\"term\">\r\n              <option value=\"0\" selected>无限</option>\r\n              <option value=\"1\">1</option>\r\n              <option value=\"2\">2</option>\r\n              <option value=\"3\">3</option>\r\n              <option value=\"4\">4</option>\r\n              <option value=\"5\">5</option>\r\n              <option value=\"6\">6</option>\r\n              <option value=\"7\">7</option>\r\n              <option value=\"10\">10</option>\r\n              <option value=\"15\">15</option>\r\n              <option value=\"20\">20</option>\r\n              <option value=\"25\">25</option>\r\n              <option value=\"30\">30</option>\r\n              <option value=\"35\">35</option>\r\n              <option value=\"40\">40</option>\r\n              <option value=\"50\">50</option>\r\n              <option value=\"60\">60</option>                  </select>天\r\n                  <button onclick=\"onGMFunction()\">确定</button></td>\r\n                  ");

      // end
      // begin [file="/gmc/integrate.jsp";from=(358,18);to=(358,125)]
      /* ----  display:display ---- */
      com.kingsoft.gmsystem.web.taglib.UserTag _jspx_th_display_display_2 =
          new com.kingsoft.gmsystem.web.taglib.UserTag();
      _jspx_th_display_display_2.setPageContext(pageContext);
      _jspx_th_display_display_2.setParent(null);
      _jspx_th_display_display_2.setDisplayCode("select_questiontype");
      _jspx_th_display_display_2.setProperty("selQuestionTypeTemp");
      _jspx_th_display_display_2.setParameter("display:none");
      try {
        int _jspx_eval_display_display_2 = _jspx_th_display_display_2.doStartTag();
        if (_jspx_eval_display_display_2 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
          throw new JspTagException(
              "Since tag handler class com.kingsoft.gmsystem.web.taglib.UserTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG");
        // end
        // begin [file="/gmc/integrate.jsp";from=(358,18);to=(358,143)]
        if (_jspx_th_display_display_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return;
      } finally {
        _jspx_th_display_display_2.release();
      }
      // end
      // HTML // begin [file="/gmc/integrate.jsp";from=(358,143);to=(376,0)]
      out.write(
          "\r\n                </tr>\r\n              </table>\r\n\t\t\t</td>\r\n          </tr>\r\n        </tbody>\r\n      </table>\r\n      <iframe name=\"frmSubmit\" width=\"100%\" height=\"0\" frameborder=0 scrolling=\"auto\" src=\"submit.jsp\" marginwidth=\"0\" marginheight=\"0\">\r\n      对不起,你的浏览器不支持嵌入式框架。请升级到更高的版本。 </iframe>\r\n\r\n\t</td>\r\n  </tr>\r\n  <tr>\r\n    <td height=\"16\" align=\"center\" bgcolor=\"#BBDDFD\">Copyright &copy; 2005 Kingsoft Corp,All Rights Reserved</td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</html>\r\n");

      // end

    } catch (Throwable t) {
      if (out != null && out.getBufferSize() != 0) out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
Example #22
0
  public void getEnv(VariableTable vt) {
    Enumeration e = null;
    HttpServletRequest request = (HttpServletRequest) (pageContext.getRequest());
    HttpSession session = request.getSession(false);

    String db_charset = "gb2312";
    String url_charset = null;

    vt.remove("SESSION.LOGINID");
    vt.remove("SESSION.LOGINNAME");
    vt.remove("SESSION.LOGINROLE");

    if (vt.exists("WEBCHART.DB_CHARSET")) {
      db_charset = vt.getString("WEBCHART.DB_CHARSET");
    }

    if (vt.exists("WEBCHART.URL_CHARSET")) {
      url_charset = vt.getString("WEBCHART.URL_CHARSET");
    }

    if (session != null) {
      e = session.getAttributeNames();
      while (e.hasMoreElements()) {
        String name = (String) e.nextElement();
        Object value = session.getAttribute(name);
        vt.add(name, java.sql.Types.VARCHAR);
        if (value != null) vt.setValue(name, value.toString());
      }
      vt.add("SESSION.ID", java.sql.Types.VARCHAR);
      vt.setValue("SESSION.ID", session.getId());
      vt.add("SESSION.CREATE", java.sql.Types.VARCHAR);
      vt.setValue(
          "SESSION.CREATE",
          DBOperation.toString(
              new java.util.Date(session.getCreationTime()), "yyyy-MM-dd HH:mm:ss"));
      vt.add("SESSION.ACCESS", java.sql.Types.VARCHAR);
      vt.setValue(
          "SESSION.ACCESS",
          DBOperation.toString(
              new java.util.Date(session.getLastAccessedTime()), "yyyy-MM-dd HH:mm:ss"));
    }
    e = request.getParameterNames();
    while (e.hasMoreElements()) {
      String name = (String) e.nextElement();
      String value = request.getParameter(name);
      ;
      String par_values[] = request.getParameterValues(name);
      name = name.toUpperCase();
      if (name.equalsIgnoreCase("WEBCHART.SECURITY")
          || name.equalsIgnoreCase("WEBCHART.DEFAULTACCESS")
          || name.equalsIgnoreCase("WEBCHART.ALLOW")
          || name.equalsIgnoreCase("WEBCHART.DENY")
          || name.equalsIgnoreCase("WEBCHART.IPSECURITY")
          || name.equalsIgnoreCase("WEBCHART.IPACCESS")
          || name.equalsIgnoreCase("WEBCHART.IPALLOW")
          || name.equalsIgnoreCase("WEBCHART.IPDENY")
          || name.equalsIgnoreCase("WEBCHART.XSLDOC")
          || name.equalsIgnoreCase("WEBCHART.IMAGEONLY")
          || name.equalsIgnoreCase("WEBCHART.XMLDATA")
          || name.equalsIgnoreCase("WEBCHART.LOGSQL")
          || name.equalsIgnoreCase("WEBCHART.DATATYPE")
          || name.equalsIgnoreCase("WEBCHART.URLS")
          || name.equalsIgnoreCase("WEBCHART.TOPURLS")
          || name.equalsIgnoreCase("WEBCHART.TOPCURR")
          || name.equalsIgnoreCase("WEBCHART.LEFTURLS")
          || name.equalsIgnoreCase("WEBCHART.LEFTCURR")
          || name.equalsIgnoreCase("WEBCHART.INPUTS")
          || name.equalsIgnoreCase("WEBCHART.CACHE")
          || name.equalsIgnoreCase("WEBCHART.DATA")
          || name.equalsIgnoreCase("WEBCHART.CSS")
          || name.equalsIgnoreCase("WEBCHART.RELOAD")
          || name.equalsIgnoreCase("WEBCHART.EXPIRE")
          || name.equalsIgnoreCase("WEBCHART.DMLKEY")
          || name.equalsIgnoreCase("WEBCHART.ENGINE")
          || name.equalsIgnoreCase("WEBCHART.EXCELURL")
          || name.equalsIgnoreCase("WEBCHART.DBID")
          || name.equalsIgnoreCase("WEBCHART.DBIDSEED")
          || name.equalsIgnoreCase("WEBCHART.SECUREFIELDS")
          || name.equalsIgnoreCase("WEBCHART.KEEP_CACHE_IMAGE")
          || name.equalsIgnoreCase("WEBCHART.KEEP_CACHE_TIME")
          || name.startsWith("WEBCHART.SECUREMEMO")
          || name.startsWith("WEBCHART.QUERY_")
          || name.startsWith("WEBCHART.HEADHTML_")
          || name.startsWith("WEBCHART.DATAHTML_")
          || name.startsWith("WEBCHART.VARLIST_")
          || name.startsWith("WEBCHART.FORALL_")
          || name.startsWith("WEBCHART.XMLDATA_")
          || name.startsWith("WEBCHART.TABLE_")
          || name.startsWith("WEBCHART.COLUMN_")
          || name.startsWith("SESSION.")) continue;
      if (name.startsWith("WEBCHART.") && !name.equals("WEBCHART.DOCTYPE")) continue;
      vt.add(name, java.sql.Types.VARCHAR);

      if (par_values != null && par_values.length > 1) {
        StringBuffer temp = new StringBuffer();
        for (int i = 0; i < par_values.length; i++) {
          if (par_values[i] != null && par_values[i].trim().length() > 0) {
            if (temp.length() > 0) {
              temp.append(",");
            }
            temp.append(par_values[i]);
          }
        }
        value = temp.toString();
      }
      if (url_charset != null) {
        try {
          value = new String(value.getBytes(url_charset), db_charset);
        } catch (java.io.UnsupportedEncodingException uee) {
        }
        ;
      }
      vt.setValue(name, value);
    }
    vt.add("REQUEST.REMOTEADDR", java.sql.Types.VARCHAR);
    vt.setValue("REQUEST.REMOTEADDR", getClientIPAddr());
    vt.add("REQUEST.REMOTEHOST", java.sql.Types.VARCHAR);
    vt.setValue("REQUEST.REMOTEHOST", request.getRemoteAddr());
    vt.add("REQUEST.REFERER", java.sql.Types.VARCHAR);
    vt.setValue("REQUEST.REFERER", request.getHeader("Referer"));
    vt.add("REQUEST.QUERYSTRING", java.sql.Types.VARCHAR);
    vt.setValue("REQUEST.QUERYSTRING", request.getQueryString());
  }
Example #23
0
  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('\n');

      String path = request.getContextPath();
      String basePath =
          request.getScheme()
              + "://"
              + request.getServerName()
              + ":"
              + request.getServerPort()
              + path
              + "/";

      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE html>\n");
      out.write("<html>\n");
      out.write("<head>\n");
      out.write("<base href=\"");
      out.print(basePath);
      out.write("\">\n");
      out.write("\n");
      out.write("<title>工程师工作纪要 查看</title>\n");
      out.write("<meta http-equiv=\"pragma\" content=\"no-cache\">\n");
      out.write("<meta http-equiv=\"cache-control\" content=\"no-cache\">\n");
      out.write("<meta http-equiv=\"expires\" content=\"0\">\n");
      out.write("<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\n");
      out.write("<meta http-equiv=\"description\" content=\"This is my page\">\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\" />\n");
      out.write("<script type=\"text/javascript\" src=\"js/jquery.min.js\"></script>\n");
      out.write("<script type=\"text/javascript\" src=\"js/common.js\"></script>\n");
      out.write("</head>\n");

      WorksBean worksBean = (WorksBean) request.getAttribute("worksBean");

      if (worksBean == null) {
        return;
      }

      out.write("\n");
      out.write("<body>\n");
      out.write("\t<div class=\"container\">\n");
      out.write("\t\t<div class=\"header headermiddle\">\n");
      out.write("\t\t\t<div class=\"headermleft\"></div>\n");
      out.write("\n");
      out.write("\t\t\t<div class=\"headermright vText\" style=\" float: right\">\n");
      out.write("\t\t\t\t<div style=\"font-size:12px\">您好!欢迎您来到工程师工作纪要</div>\n");
      out.write("\t\t\t\t<div style=\"margin-top: 20px\">\n");
      out.write("\t\t\t\t");

      UserBean userBean = (UserBean) session.getAttribute("userBean");
      if (userBean == null) {

        out.write("\n");
        out.write("\t\t\t\t\t<a href=\"/login.jsp\" target=\"_blank\">登陆</a>\n");
        out.write("\t\t\t\t");

      } else {

        out.write("\n");
        out.write("\t\t\t\t\t<font class=\"fontsong17\">当前用户</font>: <font class=\"fontsong14\">");
        out.print(userBean.getName());
        out.write("</font>, &nbsp;\n");
        out.write(
            "\t\t\t\t\t<font class=\"fontsong17\"><a href=\"/login.jsp?action=logout\">退出</a></font>\n");
        out.write("\t\t\t\t");
      }

      out.write("\n");
      out.write("\t\t\t\t</div>\n");
      out.write("\t\t\t</div>\n");
      out.write("\t\t</div>\n");
      out.write("\t\t<!-- 导航 -->\n");
      out.write("\t\t<div class=\" headernav\">\n");
      out.write("\t\t\t<div class=\" nav\">\n");
      out.write("\t\t\t\t<ul>\n");
      out.write(
          "\t\t\t\t\t<li class=\"navcurrent\"><a href=\"/servlet/Works?howdo=list\">工作纪要</a></li>\n");
      out.write("\t\t\t\t\t<li><a href=\"/servlet/Customer?howdo=list\">客户管理</a></li>\n");
      out.write("\t\t\t\t\t<li><a href=\"/servlet/User?howdo=list\">帐号管理</a></li>\n");
      out.write("\t\t\t\t</ul>\n");
      out.write("\t\t\t</div>\n");
      out.write("\t\t</div>\n");
      out.write("\t\t<div class=\"titleDiv\">工作纪要查看</div>\n");
      out.write("\t\t<div class=\"titleLineDiv\"></div>\n");
      out.write("\t\t<div class=\"addContentDiv\">\n");
      out.write("\t\t\t<table class=\"addContentTable\" border=\"0\" cellspacing=\"0\"\n");
      out.write("\t\t\t\tcellpadding=\"0\">\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"120px\" align=\"right\">客户:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getCustomername());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td width=\"120px\" align=\"right\">工程师:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getUsername());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">事件属性:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getLevel());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">事件描述:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      out.print(worksBean.getDescribe());
      out.write("</div>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">二级单位:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getErjidanwei());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">客户联系人:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getKehulianxiren());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">联系方式:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getLianxifangshi());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">联系邮箱:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px;max-width: 700px\">");
      out.print(worksBean.getLianximail());
      out.write("</span>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">是否转800:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      if (worksBean.isIsphonecall()) {
        out.write('是');
        out.write(' ');
      } else {
        out.write(' ');
        out.write('否');
      }
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">800 case号码:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
      out.print(worksBean.getPhonecallnumber());
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">解决办法:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      out.print(worksBean.getSolution());
      out.write("</div>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">是否关闭:</td>\n");
      out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px \">");
      if (worksBean.getIsclosed() == 1) {
        out.write('关');
        out.write('闭');
        out.write(' ');
      } else {
        out.write(' ');
        out.write('开');
        out.write('启');
      }
      out.write("</span></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\">更新内容:</td>\n");
      out.write("\t\t\t\t\t<td><div class=\"lineDiv\">");
      if (worksBean.getNewcontent() != null) {
        out.write(' ');
        out.print(worksBean.getNewcontent());
        out.write(' ');
      }
      out.write("</div></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t\t");

      if (worksBean.getIsclosed() == 1 && worksBean.getClosedate() != null) {

        out.write("\n");
        out.write("\t\t\t\t<tr>\n");
        out.write("\t\t\t\t\t<td align=\"right\">关闭时间:</td>\n");
        out.write("\t\t\t\t\t<td><span style=\"margin-left: 20px\">");
        out.print(worksBean.getClosedate());
        out.write("</span></td>\n");
        out.write("\t\t\t\t</tr>\n");
        out.write("\t\t\t\t");
      }

      out.write("\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"right\"></td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write(
          "\t\t\t\t\t\t<div class=\"divBtn ml20 fl mt20\" onclick=\"window.history.back(-1);\">返回</div></td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t</table>\n");
      out.write("\n");
      out.write("\t\t</div>\n");
      out.write("\t\t");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("\r\n");
      out.write("<title>智友汇</title>\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("<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">\r\n");
      out.write("<meta http-equiv=\"description\" content=\"This is my page\">\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/css.css\" />\r\n");
      out.write("<script type=\"text/javascript\" src=\"/js/jquery.min.js\"></script>\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("\t<div class=\"footer\">\r\n");
      out.write("\t\r\n");
      out.write("\t<div class=\"footerbottom\">\r\n");
      out.write("\t<div style=\"margin-top: 10px;margin-bottom: 30px\">Copyright&copy;2015\r\n");
      out.write("\t\t\t北京恒光数码科技有限公司 版权所有</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("\t</div>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\n");
      out.write("\t\t<!-- end .container -->\n");
      out.write("\t</div>\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("</html>\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);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();

    try {
      // 实例化

      HttpSession session = request.getSession();
      ServletContext context = session.getServletContext();
      String path = context.getRealPath("/");
      counter count = new counter(dbApplication);
      SmartUpload mySmartUpload = new SmartUpload();
      mySmartUpload.setCharset("UTF-8");
      nseer_db_backup1 qcs_db = new nseer_db_backup1(dbApplication);

      if (qcs_db.conn((String) dbSession.getAttribute("unit_db_name"))) {

        mySmartUpload.initialize(pageContext);
        String file_type = getFileLength.getFileType((String) session.getAttribute("unit_db_name"));
        long d = getFileLength.getFileLength((String) session.getAttribute("unit_db_name"));
        mySmartUpload.setMaxFileSize(d);
        mySmartUpload.setAllowedFilesList(file_type);

        try {
          mySmartUpload.upload();
          String qcs_id = mySmartUpload.getRequest().getParameter("qcs_id");
          String config_id = mySmartUpload.getRequest().getParameter("config_id");

          String[] item = mySmartUpload.getRequest().getParameterValues("item");
          if (item != null) {
            String[] file_name = new String[mySmartUpload.getFiles().getCount()];
            String[] not_change = new String[mySmartUpload.getFiles().getCount()];
            java.util.Date now = new java.util.Date();
            SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
            String time = formatter.format(now);
            String standard_id = mySmartUpload.getRequest().getParameter("standard_id");
            String sqla =
                "select attachment1 from qcs_intrmanufacture where qcs_id='"
                    + qcs_id
                    + "' and (check_tag='5' or check_tag='9')";
            ResultSet rs = qcs_db.executeQuery(sqla);
            if (!rs.next()) {
              response.sendRedirect("draft/qcs/intrmanufacture_ok.jsp?finished_tag=1");
            } else {
              String[] attachment = mySmartUpload.getRequest().getParameterValues("attachment");
              String[] delete_file_name = new String[0];
              if (attachment != null) {
                delete_file_name = new String[attachment.length];
                for (int i = 0; i < attachment.length; i++) {
                  delete_file_name[i] = rs.getString(attachment[i]);
                }
              }
              for (int i = 0; i < mySmartUpload.getFiles().getCount(); i++) {
                com.jspsmart.upload.SmartFile file = mySmartUpload.getFiles().getFile(i);
                if (file.isMissing()) {
                  file_name[i] = "";
                  int q = i + 1;
                  String field_name = "attachment" + q;
                  if (!rs.getString(field_name).equals("")) not_change[i] = "yes";
                  continue;
                }
                int filenum =
                    count.read(
                        (String) dbSession.getAttribute("unit_db_name"), "qcsAttachmentcount");
                count.write(
                    (String) dbSession.getAttribute("unit_db_name"), "qcsAttachmentcount", filenum);
                file_name[i] = filenum + file.getFileName();
                file.saveAs(path + "qcs/file_attachments/" + filenum + file.getFileName());
              }
              String apply_id = mySmartUpload.getRequest().getParameter("apply_id");
              String product_id = mySmartUpload.getRequest().getParameter("product_id");
              String product_name = mySmartUpload.getRequest().getParameter("product_name");
              String qcs_amount = mySmartUpload.getRequest().getParameter("qcs_amount");
              String qcs_time = mySmartUpload.getRequest().getParameter("qcs_time");
              String quality_way = mySmartUpload.getRequest().getParameter("quality_way");
              String quality_solution = mySmartUpload.getRequest().getParameter("quality_solution");
              String sampling_standard =
                  mySmartUpload.getRequest().getParameter("sampling_standard");
              String sampling_amount = mySmartUpload.getRequest().getParameter("sampling_amount");
              String accept = mySmartUpload.getRequest().getParameter("accept");
              String reject = mySmartUpload.getRequest().getParameter("reject");
              String qualified = mySmartUpload.getRequest().getParameter("qualified");
              String unqualified = mySmartUpload.getRequest().getParameter("unqualified");
              String qcs_result = mySmartUpload.getRequest().getParameter("qcs_result");
              String checker = mySmartUpload.getRequest().getParameter("checker");
              String checker_id = mySmartUpload.getRequest().getParameter("checker_id");
              String check_time = mySmartUpload.getRequest().getParameter("check_time");
              String changer = mySmartUpload.getRequest().getParameter("changer");
              String changer_id = mySmartUpload.getRequest().getParameter("changer_id");
              String change_time = mySmartUpload.getRequest().getParameter("change_time");
              String bodyab =
                  new String(
                      mySmartUpload.getRequest().getParameter("remark").getBytes("UTF-8"), "UTF-8");
              String remark = exchange.toHtml(bodyab);

              sqla =
                  "update qcs_intrmanufacture set apply_id='"
                      + apply_id
                      + "',product_id='"
                      + product_id
                      + "',product_name='"
                      + product_name
                      + "',qcs_amount='"
                      + qcs_amount
                      + "',qcs_time='"
                      + qcs_time
                      + "',quality_way='"
                      + quality_way
                      + "',quality_solution='"
                      + quality_solution
                      + "',sampling_standard='"
                      + sampling_standard
                      + "',sampling_amount='"
                      + sampling_amount
                      + "',accept='"
                      + accept
                      + "',reject='"
                      + reject
                      + "',qualified='"
                      + qualified
                      + "',unqualified='"
                      + unqualified
                      + "',changer_id='"
                      + changer_id
                      + "',qcs_result='"
                      + qcs_result
                      + "',changer='"
                      + changer
                      + "',change_time='"
                      + change_time
                      + "',remark='"
                      + remark
                      + "',check_tag='5'";
              String sqlb = " where qcs_id='" + qcs_id + "'";
              if (attachment != null) {
                for (int i = 0; i < attachment.length; i++) {
                  sqla = sqla + "," + attachment[i] + "=''";
                  java.io.File file =
                      new java.io.File(path + "qcs/file_attachments/" + delete_file_name[i]);
                  file.delete();
                }
              }
              for (int i = 0; i < mySmartUpload.getFiles().getCount(); i++) {
                if (not_change[i] != null && not_change[i].equals("yes")) continue;
                int p = i + 1;
                sqla = sqla + ",attachment" + p + "='" + file_name[i] + "'";
              }
              String sql = sqla + sqlb;
              qcs_db.executeUpdate(sql);

              sql = "delete from qcs_intrmanufacture_details where qcs_id='" + qcs_id + "'";
              qcs_db.executeUpdate(sql);

              String[] default_basis =
                  mySmartUpload.getRequest().getParameterValues("default_basis");
              String[] ready_basis = mySmartUpload.getRequest().getParameterValues("ready_basis");
              String[] quality_method =
                  mySmartUpload.getRequest().getParameterValues("quality_method");
              String[] analyse_method =
                  mySmartUpload.getRequest().getParameterValues("analyse_method");
              String[] standard_value =
                  mySmartUpload.getRequest().getParameterValues("standard_value");
              String[] standard_max = mySmartUpload.getRequest().getParameterValues("standard_max");
              String[] standard_min = mySmartUpload.getRequest().getParameterValues("standard_min");
              String[] quality_value =
                  mySmartUpload.getRequest().getParameterValues("quality_value");
              String[] sampling_amount_d =
                  mySmartUpload.getRequest().getParameterValues("sampling_amount_d");
              String[] qualified_d = mySmartUpload.getRequest().getParameterValues("qualified_d");
              String[] unqualified_d =
                  mySmartUpload.getRequest().getParameterValues("unqualified_d");
              String[] quality_result =
                  mySmartUpload.getRequest().getParameterValues("quality_result");
              String[] unqualified_reason =
                  mySmartUpload.getRequest().getParameterValues("unqualified_reason");
              for (int i = 0; i < item.length; i++) {
                if (!item[i].equals("")) {
                  sql =
                      "insert into qcs_intrmanufacture_details(qcs_id,item,default_basis,ready_basis,quality_method,analyse_method,standard_value,standard_max,standard_min,quality_value,sampling_amount_d,qualified_d,unqualified_d,quality_result,unqualified_reason,details_number) values('"
                          + qcs_id
                          + "','"
                          + item[i]
                          + "','"
                          + default_basis[i]
                          + "','"
                          + ready_basis[i]
                          + "','"
                          + quality_method[i]
                          + "','"
                          + analyse_method[i]
                          + "','"
                          + standard_value[i]
                          + "','"
                          + standard_max[i]
                          + "','"
                          + standard_min[i]
                          + "','"
                          + quality_value[i]
                          + "','"
                          + sampling_amount_d[i]
                          + "','"
                          + qualified_d[i]
                          + "','"
                          + unqualified_d[i]
                          + "','"
                          + quality_result[i]
                          + "','"
                          + unqualified_reason[i]
                          + "','"
                          + i
                          + "')";
                  qcs_db.executeUpdate(sql);
                }
              }
              response.sendRedirect("draft/qcs/intrmanufacture_ok.jsp?finished_tag=0");
            }
            qcs_db.commit();
            qcs_db.close();
          } else {
            response.sendRedirect("draft/qcs/intrmanufacture_ok.jsp?finished_tag=7");
          }

        } catch (Exception ex) {
          response.sendRedirect("draft/qcs/intrmanufacture_ok.jsp?finished_tag=6");
        }

      } else {
        response.sendRedirect("error_conn.htm");
      }

    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  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");
      ArrayList<listeningFormBean> list = (ArrayList) session.getAttribute("listening");
      String tensu = (String) session.getAttribute("TEN");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      out.write("<html lang=\"ja\">\r\n");
      out.write("<script type=\"text/javascript\" src=\"js/listeningReturn.js\"></script>\r\n");
      out.write("<script type=\"text/css\" src=\"css/Listening.css\"></script>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n");
      out.write("<title>Lesson1</title>\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("\r\n");
      out.write("\t\tp.line {color:black; background:yellowgreen;}\r\n");
      out.write("\r\n");
      out.write("</style>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<h3>Lesson1</h3>\r\n");
      out.write("<center>\r\n");
      out.write("<h2>Lesson1 回答および解説</h2>\r\n");
      out.write("\r\n");
      out.write("<input type=\"text\" value=\"");
      out.print(tensu);
      out.write("\" size=\"4\">点\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</center>\r\n");
      out.write("<div id=Q>\r\n");
      out.write("\r\n");
      for (int i = 0; i < list.size(); i++) {
        listeningFormBean lis = list.get(i);
        out.write("\r\n");
        out.write("\r\n");
        out.write("<p>");
        out.print(lis.getQuestionText());
        out.write("</p>\r\n");
        out.write("\r\n");
        out.write("<br>\r\n");
        out.write("\r\n");
        out.write("<br><br>\r\n");
        out.write("<center>\r\n");
        out.write("<!--<p class=\"line\">-->\r\n");
        out.write("<audio id=\"audio\" controls width=\"320\" height=\"240\">\r\n");
        out.write("<source src=\"");
        out.print(lis.getMusicName());
        out.write("\">\r\n");
        out.write("</audio><br>\r\n");
        out.write("\r\n");
        out.write("<input type=\"text\" ><br>\r\n");
        out.write("答え”");
        out.print(lis.getAnswer());
        out.write("”<br>\r\n");
        out.print(lis.getAnswerText());
        out.write("\r\n");
        out.write("\r\n");
        out.write("</center>\r\n");
        out.write("</div>\r\n");
      }
      out.write("\r\n");
      out.write("\r\n");
      out.write("<center>\r\n");
      out.write("<form action=\"/eLearning/ListeningNextServlet\">\r\n");
      out.write("<BUTTON>リトライ!</BUTTON>\r\n");
      out.write("</form>\r\n");
      out.write("\r\n");
      out.write("<form action=\"/eLearning/ListeningServlet\" id=\"EnglishForm\">\r\n");
      out.write("<BUTTON id=\"Lbtn\">Listening目次へ</BUTTON>\r\n");
      out.write("<input type=\"hidden\" id=\"kamokuID\" name=\"kamokuID\"></input>\r\n");
      out.write("\r\n");
      out.write("</form>\r\n");
      out.write("\r\n");
      out.write("<BR>\r\n");
      out.write("\r\n");
      out.write("</center>\r\n");
      out.write("</body>\r\n");
      out.write("\r\n");
      out.write("</html>\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);
    }
  }
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();
    try {
      HttpSession session = request.getSession();
      PrintWriter out = response.getWriter();
      nseer_db_backup1 fund_db = new nseer_db_backup1(dbApplication);
      nseer_db_backup1 fund_db1 = new nseer_db_backup1(dbApplication);
      if (fund_db.conn((String) dbSession.getAttribute("unit_db_name"))
          && fund_db1.conn((String) dbSession.getAttribute("unit_db_name"))) {
        counter count = new counter(dbApplication);
        ValidataRecordNumber vrn = new ValidataRecordNumber();
        ValidataTag vt = new ValidataTag();
        ValidataNumber validata = new ValidataNumber();
        try {
          String time = "";
          java.util.Date now = new java.util.Date();
          SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
          time = formatter.format(now);

          String apply_pay_ID = request.getParameter("apply_pay_ID");
          String register_time = request.getParameter("register_time");
          String register = request.getParameter("register");
          String register_ID = request.getParameter("register_ID");
          String bodyc = new String(request.getParameter("remark").getBytes("UTF-8"), "UTF-8");
          String remark = exchange.toHtml(bodyc);
          String amount = request.getParameter("amount");
          String[] file_kind = request.getParameterValues("file_kind");
          String[] cost_price_subtotal = request.getParameterValues("cost_price_subtotal");
          int p = 0;
          String file_kinda = ",";
          for (int j = 1; j < file_kind.length; j++) {
            file_kinda += file_kind[j] + ",";
            if (cost_price_subtotal[j].equals("")) cost_price_subtotal[j] = "0";
            StringTokenizer tokenTO4 = new StringTokenizer(cost_price_subtotal[j], ",");
            String cost_price_subtotal1 = "";
            while (tokenTO4.hasMoreTokens()) {
              cost_price_subtotal1 += tokenTO4.nextToken();
            }
            if (!validata.validata(cost_price_subtotal1)) {
              p++;
            }
          }
          int n = 0;
          for (int i = 1; i <= Integer.parseInt(amount); i++) {
            String tem_file_kind = "file_kind" + i;
            String file_kind2 = request.getParameter(tem_file_kind);
            if (file_kinda.indexOf(file_kind2) != -1) n++;
          }
          if (n == 0) {
            if (p == 0) {
              if (vt.validata(
                          (String) dbSession.getAttribute("unit_db_name"),
                          "fund_apply_pay",
                          "apply_pay_ID",
                          apply_pay_ID,
                          "check_tag")
                      .equals("5")
                  || vt.validata(
                          (String) dbSession.getAttribute("unit_db_name"),
                          "fund_apply_pay",
                          "apply_pay_ID",
                          apply_pay_ID,
                          "check_tag")
                      .equals("9")) {
                String currency_name = "";
                String personal_unit = "";
                String chain_ID = "";
                String chain_name = "";
                String funder = "";
                String funder_ID = "";
                String sql11 =
                    "select * from fund_apply_pay where apply_pay_ID='" + apply_pay_ID + "'";
                ResultSet rs11 = fund_db.executeQuery(sql11);
                while (rs11.next()) {
                  chain_ID = rs11.getString("chain_ID");
                  chain_name = rs11.getString("chain_name");
                  funder = rs11.getString("human_name");
                  funder_ID = rs11.getString("human_ID");
                  currency_name = rs11.getString("currency_name");
                  personal_unit = rs11.getString("personal_unit");
                }
                int expenses_amount = 0;
                String sql6 =
                    "select count(*) from fund_apply_pay_details where apply_pay_ID='"
                        + apply_pay_ID
                        + "'";
                ResultSet rs6 = fund_db.executeQuery(sql6);
                if (rs6.next()) {
                  expenses_amount = rs6.getInt("count(*)");
                }
                double demand_cost_price_sum = 0.0d;
                for (int i = 1; i <= expenses_amount; i++) {
                  String tem_cost_price_subtotal = "cost_price_subtotal" + i;
                  String cost_price_subtotal2 = request.getParameter(tem_cost_price_subtotal);
                  demand_cost_price_sum += Double.parseDouble(cost_price_subtotal2);
                  sql6 =
                      "update fund_apply_pay_details set cost_price_subtotal='"
                          + cost_price_subtotal2
                          + "' where apply_pay_ID='"
                          + apply_pay_ID
                          + "' and details_number='"
                          + i
                          + "'";
                  fund_db.executeUpdate(sql6);
                }
                for (int i = 1; i < file_kind.length; i++) {
                  StringTokenizer tokenTO1 = new StringTokenizer(file_kind[i], "/");
                  String file_chain_ID = "";
                  String file_chain_name = "";
                  while (tokenTO1.hasMoreTokens()) {
                    file_chain_ID = tokenTO1.nextToken();
                    file_chain_name = tokenTO1.nextToken();
                  }
                  StringTokenizer tokenTO4 = new StringTokenizer(cost_price_subtotal[i], ",");
                  String cost_price_subtotal1 = "";
                  while (tokenTO4.hasMoreTokens()) {
                    cost_price_subtotal1 += tokenTO4.nextToken();
                  }
                  demand_cost_price_sum += Double.parseDouble(cost_price_subtotal1);
                  expenses_amount++;
                  String sql1 =
                      "insert into fund_apply_pay_details(apply_pay_ID,details_number,file_chain_ID,file_chain_name,cost_price_subtotal) values ('"
                          + apply_pay_ID
                          + "','"
                          + expenses_amount
                          + "','"
                          + file_chain_ID
                          + "','"
                          + file_chain_name
                          + "','"
                          + cost_price_subtotal1
                          + "')";
                  fund_db.executeUpdate(sql1);
                }

                String sql =
                    "update fund_apply_pay set demand_cost_price_sum='"
                        + demand_cost_price_sum
                        + "',check_tag='2',register_time='"
                        + register_time
                        + "',register='"
                        + register
                        + "',remark='"
                        + remark
                        + "' where apply_pay_ID='"
                        + apply_pay_ID
                        + "'";
                fund_db.executeUpdate(sql);

                response.sendRedirect("draft/fund/applyPayExpenses_ok.jsp?finished_tag=2");
              } else {
                response.sendRedirect("draft/fund/applyPayExpenses_ok.jsp?finished_tag=3");
              }
            } else {
              response.sendRedirect("draft/fund/applyPayExpenses_ok.jsp?finished_tag=6");
            }
          } else {
            response.sendRedirect("draft/fund/applyPayExpenses_ok.jsp?finished_tag=7");
          }
        } catch (Exception ex) {
          ex.printStackTrace();
        }
        fund_db.commit();
        fund_db1.commit();
        fund_db.close();
        fund_db1.close();
      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    HttpSession dbSession = request.getSession();
    JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    PageContext pageContext =
        _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
    ServletContext dbApplication = dbSession.getServletContext();
    PrintWriter out = response.getWriter();
    ServletContext application;
    HttpSession session = request.getSession();
    nseer_db_backup1 finance_db = new nseer_db_backup1(dbApplication);
    ValidataNumber validata = new ValidataNumber();
    try {

      if (finance_db.conn((String) dbSession.getAttribute("unit_db_name"))) {
        String file_id = request.getParameter("file_id");
        String balance_sum = request.getParameter("balance_sum");
        String balance_sum1 = request.getParameter("balance_sum1");
        if (validata.validata(balance_sum) && validata.validata(balance_sum1)) {
          String sql2 = "select id from finance_bill where tag='1' and file_id='" + file_id + "'";
          ResultSet rs2 = finance_db.executeQuery(sql2);
          String sql = "";
          if (rs2.next()) {
            sql =
                "update finance_bill set debit_subtotal='"
                    + balance_sum1
                    + "' where tag='1' and file_id='"
                    + file_id
                    + "'";
          } else {

            sql =
                "insert into finance_bill(debit_subtotal,file_id,tag) values('"
                    + balance_sum1
                    + "','"
                    + file_id
                    + "','1')";
          }
          finance_db.executeUpdate(sql);

          sql2 =
              "select id from finance_voucher where account_period='18' and chain_id='"
                  + file_id
                  + "'";
          rs2 = finance_db.executeQuery(sql2);
          if (rs2.next()) {
            sql =
                "update finance_voucher set debit_subtotal='"
                    + balance_sum
                    + "' where account_period='18' and chain_id='"
                    + file_id
                    + "'";
          } else {

            sql =
                "insert into finance_voucher(debit_subtotal,chain_id,account_period) values('"
                    + balance_sum
                    + "','"
                    + file_id
                    + "','18')";
          }
          finance_db.executeUpdate(sql);

          finance_db.commit();
          finance_db.close();
        } else {
          out.println("1");
        }
      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
Example #28
0
  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;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      String captcha = (String) session.getAttribute("passprotect");
      System.out.println("captcha" + captcha);

      out.write('\n');
      if (captcha == null) {
        out.write('\n');
        if (true) {
          _jspx_page_context.forward("esacombank.jsp");
          return;
        }
        out.write('\n');
      }
      out.write('\n');
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      Customer cus = (Customer) session.getAttribute("sessionlogin");
      if (cus == null) {
        response.sendRedirect("loginbank.jsp");
        return;
      }
      out.write("\n");
      out.write("<html>\n");
      out.write("    <head>\n");
      out.write(
          "        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("\n");
      out.write(
          "        <link rel=\"shortcut icon\" href=\"https://www.e-sacombank.com.vn/sacomweb/sacomicon.ico\">\n");
      out.write(
          "        <link href=\"loginbank_img/Style.css\" rel=\"stylesheet\" type=\"text/css\">\n");
      out.write(
          "        <script type=\"text/javascript\" src=\"verticalmenu/stmenu.js\"></script>\n");
      out.write("    </head>\n");
      out.write("    <body topmargin=\"0\" leftmargin=\"0\">\n");
      out.write("    <center>\n");
      out.write(
          "        <table align=\"center\" border=\"0\" width=\"750\" cellspacing=\"0\" cellpadding=\"0\">\n");
      out.write("            <tbody>\n");
      out.write("                <tr>\n");
      out.write(
          "                    <td width=\"10\" height=\"22\"><img border=\"0\" src=\"./loginbank_img/pagecorner_01.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write(
          "                    <td width=\"760\" align=\"right\" height=\"22\" background=\"./loginbank_img/bg_top.gif\"><map name=\"FPMap0\">\t\n");
      out.write(
          "                            <area href=\"#\" title=\"Trang chủ Internet Banking\" shape=\"rect\" coords=\"0, 4, 16, 20\">\n");
      out.write(
          "                            <area title=\"Quy định chung\" coords=\"25, 4, 45, 19\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Điều khoản sử dụng\" coords=\"53, 5, 70, 18\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Hỏi đáp\" coords=\"78, 4, 96, 21\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Sơ đồ Site\" coords=\"105, 4, 123, 21\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Góp ý\" coords=\"133, 4, 149, 21\" shape=\"rect\" href=\"#\">\n");
      out.write("                        </map>\n");
      out.write(
          "                        <img border=\"0\" src=\"./loginbank_img/nav.gif\" width=\"150\" height=\"22\" usemap=\"#FPMap0\"></td>\n");
      out.write(
          "                    <td background=\"./loginbank_img/bg_top.gif\" valign=\"middle\" align=\"center\" width=\"30\">\n");
      out.write(
          "                        <img border=\"0\" src=\"./loginbank_img/en_flag.gif\" height=\"15\" width=\"20\"> </td>\n");
      out.write(
          "                    <td width=\"10\" height=\"22\"><img border=\"0\" src=\"./loginbank_img/pagecorner_02.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write("                </tr>\n");
      out.write("                <tr>\n");
      out.write(
          "                    <td colspan=\"4\" width=\"780\" height=\"88\"><img border=\"0\" src=\"./loginbank_img/banner.gif\" width=\"780\" height=\"88\"></td>\n");
      out.write("                </tr>\n");
      out.write("                <tr>\n");
      out.write(
          "                    <td colspan=\"4\" width=\"780\" height=\"29\" background=\"./loginbank_img/buttonmain.gif\" align=\"center\" valign=\"top\"><table border=\"0\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\" height=\"25\">\n");
      out.write("                            <tbody>\n");
      out.write("                                <tr>\n");
      out.write(
          "                                    <td align=\"center\" width=\"160\"><font color=\"#FFFF00\"><b>TRANG CHỦ</b></font> </td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"5\" class=\"line\">|</td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"220\"><a href=\"term.htm\" class=\"mainmenu\">ĐIỀU KHOẢN SỬ DỤNG</a> </td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"5\" class=\"line\">|</td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"180\"><a class=\"mainmenu\" href=\"#\">HƯỚNG DẪN SỬ DỤNG</a> </td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"5\" class=\"line\">|</td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"180\"><a class=\"mainmenu\" href=\"#\">ĐĂNG XUẤT</a> </td>\n");
      out.write("                                </tr>\n");
      out.write("                            </tbody>\n");
      out.write("                        </table></td>\n");
      out.write("                </tr>\n");
      out.write("            </tbody>\n");
      out.write("        </table>\n");
      out.write(
          "        <table border=\"1\" width=\"780\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#E8F4FD\">\n");
      out.write("\n");
      out.write("            <tr>\n");
      out.write("                <td bgcolor=\"#E8F4FD\" valign=\"middle\" class=\"style1\">\n");
      out.write("                    CHUYỂN KHOẢN\n");
      out.write("                </td>\n");
      out.write("\n");
      out.write("            </tr>\n");
      out.write("            <tr>\n");
      out.write("                <td>\n");
      out.write("                    <form action=\"ConfirmTransfer\" method=\"POST\">\n");
      out.write("                        <table  border=\"0\" width=\"100%\">\n");
      out.write("                            <tr>\n");
      out.write(
          "                                <td colspan=\"2\" scope=\"col\" class=\"style1\">\n");
      out.write("                                    ");
      String accountError = (String) request.getAttribute("notexist");
      String amountError = (String) request.getAttribute("notnumber");
      String contentError = (String) request.getAttribute("content");

      if (accountError != null) {
        out.print("<span class='style2'>" + accountError + "</span><br>");
      }
      if (amountError != null) {
        out.print("<span class='style2'>" + amountError + "</span><br>");
      }
      if (contentError != null) {
        out.print("<span class='style2'>" + contentError + "</span><br>");
      }

      out.write("\n");
      out.write("\n");
      out.write("                                    Cá nhân/đơn vị chuyển tiền</td>    \n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td width=\"150px\">Tài khoản số</td>\n");
      out.write("                                <td>");
      out.print(cus.getAccountid());
      out.write("</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Họ tên</td>\n");
      out.write("                                <td>");
      out.print(cus.getName());
      out.write("</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Số dư</td>\n");
      out.write("                                <td class=\"style2\">");
      out.print(cus.getBalance());
      out.write(" VND</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write(
          "                                <td colspan=\"2\" class=\"style1\">Cá nhân/đơn vị thụ hưởng</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Số tài khoản</td>\n");
      out.write("                                <td>\n");
      out.write(
          "                                    <input type=\"text\" name=\"toaccount\" id=\"toaccount\" size=\"40\"><span class=\"style2\">(*)</span></td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Số tiền bằng số</td>\n");
      out.write(
          "                                <td><input type=\"text\" name=\"amount\" id=\"amount\" size=\"40\"> VND <span class=\"style2\">(*)</span></td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Nội dung thanh toán</td>\n");
      out.write(
          "                                <td><textarea name=\"content\" id=\"content\" cols=\"45\" rows=\"4\"></textarea><span class=\"style2\">(*)</span></td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>&nbsp;</td>\n");
      out.write(
          "                                <td class=\"style2\">Nội dung thanh toán vui lòng không gõ kí tự đặc biệt</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td colspan=\"2\" align=\"center\">\n");
      out.write(
          "                                    <input type=\"submit\" name=\"confirm\" id=\"confirm\" value=\"Xác nhận\">\n");
      out.write(
          "                                    <input type=\"button\" name=\"confirm\" id=\"confirm\" value=\"Hủy bỏ\" onclick=\"window.location='transaction.jsp'\">\n");
      out.write("                                </td>\n");
      out.write("                            </tr>\n");
      out.write("\n");
      out.write("                        </table>\n");
      out.write("                    </form>\n");
      out.write("\n");
      out.write("        </table>\n");
      out.write("    </td>\n");
      out.write("</tr>\n");
      out.write("\n");
      out.write("</tbody>\n");
      out.write("</table>\n");
      out.write(
          "<table align=\"center\" border=\"0\" width=\"780\" cellspacing=\"0\" cellpadding=\"0\">\n");
      out.write("    <tbody>\n");
      out.write("        <tr>\n");
      out.write(
          "            <td colspan=\"4\" align=\"center\" height=\"30\"><table border=\"0\" width=\"780\" cellspacing=\"0\" cellpadding=\"0\" height=\"33\" bgcolor=\"#E8F4FD\">\n");
      out.write("                    <tbody>\n");
      out.write("                        <tr height=\"28\">\n");
      out.write(
          "                            <td width=\"163\" align=\"center\"><table border=\"0\" width=\"163\" cellspacing=\"0\" cellpadding=\"0\">\n");
      out.write("                                </table></td>\n");
      out.write(
          "                            <td width=\"550\" align=\"center\"><a href=\"#\" class=\"footer\">Trang chủ</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/rulesFirstAction.stb\" class=\"footer\">Quy định chung</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/termsOfUsageAction.stb\" class=\"footer\">Điều khoản sử dụng</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/faqAction.stb\" class=\"footer\">Hỏi đáp</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/sitemapAction.stb\" class=\"footer\">Sơ đồ Site</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/commentAction.stb\" class=\"footer\">Góp ý</a> </td>\n");
      out.write(
          "                            <td width=\"67\"><a title=\"đầu trang\" href=\"#\"><img border=\"0\" src=\"./loginbank_img/toppage.gif\" width=\"62\" height=\"20\"></a> </td>\n");
      out.write("                        </tr>\n");
      out.write("                    </tbody>\n");
      out.write("                </table></td>\n");
      out.write("        </tr>\n");
      out.write("        <tr>\n");
      out.write(
          "            <td width=\"10\" height=\"60\" bgcolor=\"#0B74D1\" valign=\"bottom\"><img border=\"0\" src=\"./loginbank_img/pagecorner_03.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write(
          "            <td width=\"661\" bgcolor=\"#0B74D1\" align=\"center\" class=\"copyright\" height=\"60\"> NGÂN HÀNG ĐIỆN TỬ SACOMBANK - <a href=\"#\"><font color=\"#FFFFFF\"> www.e-sacombank.com.vn</font></a><br>\n");
      out.write(
          "                HỘI SỞ 266-268 Nam Kỳ Khởi Nghĩa, P.8, Q.3, Tp.HCM&nbsp; -&nbsp; ĐT:  (08) 39.321.606&nbsp; -&nbsp; Fax: (08) 39.320.419<br>\n");
      out.write(
          "                <a href=\"https://www.e-sacombank.com.vn/sacomweb/cert.stb\"><font color=\"#FFFFFF\">Bản quyền © 2007</font></a> <a href=\"index.jsp\" target=\"_blank\"><font color=\"#FFFFFF\">SACOMBANK</font></a></td>\n");
      out.write(
          "            <td width=\"99\" bgcolor=\"#0B74D1\" align=\"center\" class=\"copyright\" height=\"60\"><a href=\"https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=WWW.E-SACOMBANK.COM.VN&lang=en\" target=\"_blank\"><img border=\"0\" src=\"./loginbank_img/signseal.gif\" width=\"98\" height=\"54\"></a></td>\n");
      out.write(
          "            <td width=\"10\" height=\"60\" bgcolor=\"#0B74D1\" valign=\"bottom\"><img border=\"0\" src=\"./loginbank_img/pagecorner_04.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write("        </tr>\n");
      out.write("    </tbody>\n");
      out.write("</table>\n");
      out.write("</center>\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Example #29
0
  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");
      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('\n');
      //  cas:auth
      edu.yale.its.tp.cas.taglib.CasTag _jspx_th_cas_005fauth_005f0 =
          (edu.yale.its.tp.cas.taglib.CasTag)
              _005fjspx_005ftagPool_005fcas_005fauth_0026_005fscope_005fid_005fnobody.get(
                  edu.yale.its.tp.cas.taglib.CasTag.class);
      _jspx_th_cas_005fauth_005f0.setPageContext(_jspx_page_context);
      _jspx_th_cas_005fauth_005f0.setParent(null);
      // /index.jsp(2,0) name = id type = java.lang.String reqTime = false required = true fragment
      // = false deferredValue = false expectedTypeName = null deferredMethod = false
      // methodSignature = null
      _jspx_th_cas_005fauth_005f0.setId("user");
      // /index.jsp(2,0) name = scope type = java.lang.String reqTime = false required = false
      // fragment = false deferredValue = false expectedTypeName = null deferredMethod = false
      // methodSignature = null
      _jspx_th_cas_005fauth_005f0.setScope("session");
      int _jspx_eval_cas_005fauth_005f0 = _jspx_th_cas_005fauth_005f0.doStartTag();
      if (_jspx_th_cas_005fauth_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _005fjspx_005ftagPool_005fcas_005fauth_0026_005fscope_005fid_005fnobody.reuse(
            _jspx_th_cas_005fauth_005f0);
        return;
      }
      _005fjspx_005ftagPool_005fcas_005fauth_0026_005fscope_005fid_005fnobody.reuse(
          _jspx_th_cas_005fauth_005f0);
      java.lang.String user = null;
      user = (java.lang.String) _jspx_page_context.findAttribute("user");
      out.write("\n");
      out.write("<html>\n");
      out.write("<body onload=\"submitform()\">\n");
      out.write("redirection ");
      out.print(session.getAttribute("user"));
      out.write(" !!!<br>\n");
      out.write("<form id=\"myForm\" method=POST action=\"login\">\n");
      out.write("\t<input type=\"hidden\" name=\"nom\" value=\"");
      out.print(session.getAttribute("user"));
      out.write("\"/>\n");
      out.write("</form>\n");
      out.write("</body>\n");
      out.write("</html>\n");
      out.write("<script type=\"text/javascript\" language=\"javascript\">\n");
      out.write("function submitform(){\n");
      out.write("\tdocument.getElementById('myForm').submit();\n");
      out.write("}\n");
      out.write("</script>\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);
    }
  }
Example #30
0
  public synchronized void service(HttpServletRequest request, HttpServletResponse response)
      throws IOException, ServletException {
    try {
      HttpSession dbSession = request.getSession();
      ServletContext dbApplication = dbSession.getServletContext();
      nseer_db_backup1 design_db = new nseer_db_backup1(dbApplication);
      nseer_db_backup1 design_db1 = new nseer_db_backup1(dbApplication);
      ValidataNumber validata = new ValidataNumber();
      ValidataTag vt = new ValidataTag();
      counter count = new counter(dbApplication);

      if (design_db.conn((String) dbSession.getAttribute("unit_db_name"))
          && design_db1.conn((String) dbSession.getAttribute("unit_db_name"))) {
        String config_id = request.getParameter("config_id");
        String product_ID = request.getParameter("product_ID");
        String choice = request.getParameter("choice");
        String checker_ID = request.getParameter("checker_ID");
        String checker = request.getParameter("checker");
        String check_time = request.getParameter("check_time");
        String sql6 =
            "select id from design_workflow where type_id='02' and object_ID='"
                + product_ID
                + "' and ((check_tag='0' and config_id<'"
                + config_id
                + "') or (check_tag='1' and config_id='"
                + config_id
                + "'))";
        ResultSet rs6 = design_db.executeQuery(sql6);
        if (!rs6.next()
            && vt.validata(
                    (String) dbSession.getAttribute("unit_db_name"),
                    "design_file",
                    "product_ID",
                    product_ID,
                    "excel_tag")
                .equals("1")) {
          if (choice != null) {
            if (choice.equals("")) {
              String sql =
                  "update design_file set price_change_tag='9' where product_ID='"
                      + product_ID
                      + "'";
              design_db.executeUpdate(sql);

              sql =
                  "delete from design_workflow where type_id='02' and object_ID='"
                      + product_ID
                      + "'";
              design_db.executeUpdate(sql);

            } else {

              sql6 =
                  "select id from design_workflow where type_id='02' and object_ID='"
                      + product_ID
                      + "' and config_id<'"
                      + config_id
                      + "' and config_id>='"
                      + choice
                      + "'";
              rs6 = design_db.executeQuery(sql6);
              while (rs6.next()) {
                String sql =
                    "update design_workflow set check_tag='0' where type_id='02' and id='"
                        + rs6.getString("id")
                        + "'";
                design_db1.executeUpdate(sql);
              }
            }
            response.sendRedirect("design/price_change/check_delete_ok.jsp?finished_tag=0");
          } else {
            response.sendRedirect("design/price_change/check_delete_ok.jsp?finished_tag=1");
          }
        } else {
          response.sendRedirect("design/price_change/check_delete_ok.jsp?finished_tag=2");
        }
        design_db.commit();
        design_db1.commit();
        design_db.close();
        design_db1.close();
      } else {
        response.sendRedirect("error_conn.htm");
      }
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }