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=EUC-KR");
      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("<HTML>\r\n");
      out.write("<BODY bgcolor=\"white\">\r\n");
      out.write("<H3>요청 정보 </H3>\r\n");

      response.setDateHeader("Expires", 0);
      response.setHeader("Pragma", "no-cache");
      if (request.getProtocol().equals("HTTP/1.1")) {
        response.setHeader("Cache-Control", "no-cache");
      }

      out.write("\r\n");
      out.write("<FONT size=\"4\">\r\n");
      out.write("JSP Request Method:");
      out.print(request.getMethod());
      out.write("<BR>\r\n");
      out.write("Request URI:");
      out.print(request.getRequestURI());
      out.write("<BR>\r\n");
      out.write("Request Protocol:");
      out.print(request.getProtocol());
      out.write("<BR>\r\n");
      out.write("Servlet path:");
      out.print(request.getServletPath());
      out.write("<BR>\r\n");
      out.write("Query string:");
      out.print(request.getQueryString());
      out.write("<BR>\r\n");
      out.write("Content length:");
      out.print(request.getContentLength());
      out.write("<BR>\r\n");
      out.write("Content type:");
      out.print(request.getContentType());
      out.write("<BR>\r\n");
      out.write("Server name:");
      out.print(request.getServerName());
      out.write("<BR>\r\n");
      out.write("Server port:");
      out.print(request.getServerPort());
      out.write("<BR>\r\n");
      out.write("Remote address:");
      out.print(request.getRemoteAddr());
      out.write("<BR>\r\n");
      out.write("Remote host:");
      out.print(request.getRemoteHost());
      out.write("<BR>\r\n");
      out.write("<HR>\r\n");
      out.write("The browser you are using is ");
      out.print(request.getHeader("User-Agent"));
      out.write("\r\n");
      out.write("</FONT>\r\n");
      out.write("</BODY>\r\n");
      out.write("</HTML>\r\n");
      out.write("\t");
    } 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);
    }
  }
Exemple #2
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 generateFileDetails(JspWriter out, HttpServletRequest req, Configuration conf)
      throws IOException, InterruptedException {

    int chunkSizeToView = 0;
    long startOffset = 0;
    int datanodePort;

    String blockIdStr = null;
    long currBlockId = 0;
    blockIdStr = req.getParameter("blockId");
    if (blockIdStr == null) {
      out.print("Invalid input (blockId absent)");
      return;
    }
    currBlockId = Long.parseLong(blockIdStr);

    String datanodePortStr = req.getParameter("datanodePort");
    if (datanodePortStr == null) {
      out.print("Invalid input (datanodePort absent)");
      return;
    }
    datanodePort = Integer.parseInt(datanodePortStr);

    String namenodeInfoPortStr = req.getParameter("namenodeInfoPort");
    int namenodeInfoPort = -1;
    if (namenodeInfoPortStr != null) namenodeInfoPort = Integer.parseInt(namenodeInfoPortStr);

    String chunkSizeToViewStr = req.getParameter("chunkSizeToView");
    if (chunkSizeToViewStr != null && Integer.parseInt(chunkSizeToViewStr) > 0) {
      chunkSizeToView = Integer.parseInt(chunkSizeToViewStr);
    } else {
      chunkSizeToView = JspHelper.getDefaultChunkSize(conf);
    }

    String startOffsetStr = req.getParameter("startOffset");
    if (startOffsetStr == null || Long.parseLong(startOffsetStr) < 0) startOffset = 0;
    else startOffset = Long.parseLong(startOffsetStr);

    String filename = HtmlQuoting.unquoteHtmlChars(req.getParameter("filename"));
    if (filename == null || filename.length() == 0) {
      out.print("Invalid input");
      return;
    }

    String blockSizeStr = req.getParameter("blockSize");
    long blockSize = 0;
    if (blockSizeStr == null || blockSizeStr.length() == 0) {
      out.print("Invalid input");
      return;
    }
    blockSize = Long.parseLong(blockSizeStr);

    String tokenString = req.getParameter(JspHelper.DELEGATION_PARAMETER_NAME);
    UserGroupInformation ugi = JspHelper.getUGI(req, conf);
    DFSClient dfs = JspHelper.getDFSClient(ugi, jspHelper.nameNodeAddr, conf);
    List<LocatedBlock> blocks =
        dfs.namenode.getBlockLocations(filename, 0, Long.MAX_VALUE).getLocatedBlocks();
    // Add the various links for looking at the file contents
    // URL for downloading the full file
    String downloadUrl =
        "http://"
            + req.getServerName()
            + ":"
            + +req.getServerPort()
            + "/streamFile"
            + URLEncoder.encode(filename, "UTF-8")
            + "?"
            + JspHelper.DELEGATION_PARAMETER_NAME
            + "="
            + tokenString;
    out.print("<a name=\"viewOptions\"></a>");
    out.print("<a href=\"" + downloadUrl + "\">Download this file</a><br>");

    DatanodeInfo chosenNode;
    // URL for TAIL
    LocatedBlock lastBlk = blocks.get(blocks.size() - 1);
    long blockId = lastBlk.getBlock().getBlockId();
    try {
      chosenNode = jspHelper.bestNode(lastBlk);
    } catch (IOException e) {
      out.print(e.toString());
      dfs.close();
      return;
    }
    String fqdn = InetAddress.getByName(chosenNode.getHost()).getCanonicalHostName();
    String tailUrl =
        "http://"
            + fqdn
            + ":"
            + chosenNode.getInfoPort()
            + "/tail.jsp?filename="
            + URLEncoder.encode(filename, "UTF-8")
            + "&namenodeInfoPort="
            + namenodeInfoPort
            + "&chunkSizeToView="
            + chunkSizeToView
            + "&referrer="
            + URLEncoder.encode(req.getRequestURL() + "?" + req.getQueryString(), "UTF-8")
            + JspHelper.getDelegationTokenUrlParam(tokenString);
    out.print("<a href=\"" + tailUrl + "\">Tail this file</a><br>");

    out.print("<form action=\"/browseBlock.jsp\" method=GET>");
    out.print("<b>Chunk size to view (in bytes, up to file's DFS block size): </b>");
    out.print("<input type=\"hidden\" name=\"blockId\" value=\"" + currBlockId + "\">");
    out.print("<input type=\"hidden\" name=\"blockSize\" value=\"" + blockSize + "\">");
    out.print("<input type=\"hidden\" name=\"startOffset\" value=\"" + startOffset + "\">");
    out.print("<input type=\"hidden\" name=\"filename\" value=\"" + filename + "\">");
    out.print("<input type=\"hidden\" name=\"datanodePort\" value=\"" + datanodePort + "\">");
    out.print(
        "<input type=\"hidden\" name=\"namenodeInfoPort\" value=\"" + namenodeInfoPort + "\">");
    out.print(
        "<input type=\"text\" name=\"chunkSizeToView\" value="
            + chunkSizeToView
            + " size=10 maxlength=10>");
    out.print("&nbsp;&nbsp;<input type=\"submit\" name=\"submit\" value=\"Refresh\">");
    out.print("</form>");
    out.print("<hr>");
    out.print("<a name=\"blockDetails\"></a>");
    out.print("<B>Total number of blocks: " + blocks.size() + "</B><br>");
    // generate a table and dump the info
    out.println("\n<table>");
    for (LocatedBlock cur : blocks) {
      out.print("<tr>");
      blockId = cur.getBlock().getBlockId();
      blockSize = cur.getBlock().getNumBytes();
      String blk = "blk_" + Long.toString(blockId);
      out.print("<td>" + Long.toString(blockId) + ":</td>");
      DatanodeInfo[] locs = cur.getLocations();
      for (int j = 0; j < locs.length; j++) {
        String datanodeAddr = locs[j].getName();
        datanodePort =
            Integer.parseInt(
                datanodeAddr.substring(datanodeAddr.indexOf(':') + 1, datanodeAddr.length()));
        fqdn = InetAddress.getByName(locs[j].getHost()).getCanonicalHostName();
        String blockUrl =
            "http://"
                + fqdn
                + ":"
                + locs[j].getInfoPort()
                + "/browseBlock.jsp?blockId="
                + Long.toString(blockId)
                + "&blockSize="
                + blockSize
                + "&filename="
                + URLEncoder.encode(filename, "UTF-8")
                + "&datanodePort="
                + datanodePort
                + "&genstamp="
                + cur.getBlock().getGenerationStamp()
                + "&namenodeInfoPort="
                + namenodeInfoPort
                + "&chunkSizeToView="
                + chunkSizeToView;
        out.print(
            "<td>&nbsp</td>" + "<td><a href=\"" + blockUrl + "\">" + datanodeAddr + "</a></td>");
      }
      out.println("</tr>");
    }
    out.println("</table>");
    out.print("<hr>");
    String namenodeHost = jspHelper.nameNodeAddr.getHostName();
    out.print(
        "<br><a href=\"http://"
            + InetAddress.getByName(namenodeHost).getCanonicalHostName()
            + ":"
            + namenodeInfoPort
            + "/dfshealth.jsp\">Go back to DFS home</a>");
    dfs.close();
  }
Exemple #4
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());
  }
Exemple #5
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("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html>\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(
          request, response, "/resource/jsp/resource_js.jsp", out, false);
      out.write("\r\n");
      out.write("<html lang=\"en\">\r\n");
      out.write("    <head>\r\n");
      out.write("        <meta charset=\"utf-8\">\r\n");
      out.write(
          "        <meta name=\"viewport\" content=\"width=device-width,initial-scale=1,user-scalable=0\">\r\n");
      out.write("        <title>项目详情</title>\r\n");
      out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"../css/weui.css\">\r\n");
      out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"../css/base.css\">\r\n");
      out.write(
          "        <link rel=\"stylesheet\" type=\"text/css\" href=\"../css/details-jie.css\">\r\n");
      out.write(
          "        <script src=\"http://res.wx.qq.com/open/js/jweixin-1.0.0.js\"></script>\r\n");
      out.write(
          "        <script type=\"text/javascript\" src=\"../js/jquery.2.1.4.js\"></script>\r\n");
      out.write("        <style type=\"text/css\">\r\n");
      out.write("\r\n");
      out.write("\t\t\t/*报名人员列表*/\r\n");
      out.write("\t\t\t.people-list{ color:#333;}\r\n");
      out.write("\t\t\t.people-list li{ padding:8px 0;}\r\n");
      out.write("\t\t\t.people-list li img{ height:40px; width:40px; border-radius:50%;}\r\n");
      out.write("\t\t\t.people-list p{line-height:40px; padding-left:15px;}\r\n");
      out.write("\t\t\t.people-list-ico{\r\n");
      out.write("\t\t\t\theight:25px;\r\n");
      out.write("\t\t\t\twidth:25px;\r\n");
      out.write("\t\t\t\tbackground: url(../images/p-li2.png) 0 0 no-repeat;\r\n");
      out.write("\t\t\t\tbackground-size:100%;\r\n");
      out.write("\t\t\t\tmargin-top:7px;\r\n");
      out.write("\t\t\t}\r\n");
      out.write("\t\t\t.yes .people-list-ico{background-image:url(../images/p-li1.png);}\r\n");
      out.write("        </style>\r\n");
      out.write("    </head>\r\n");
      out.write("    ");

      String openid = request.getParameter("OPENID");
      String wxid = request.getParameter("WXID");
      String itemid = request.getParameter("ITEMID");
      String appid = new String("");
      String noncestr = new String("");
      String signature = new String("");
      String timestamp = new String("");
      JsSdkConfig ro =
          WxJSSDKUtil.getConfig(
              wxid, request.getRequestURL().toString() + "?" + request.getQueryString());
      if (ro != null) {
        System.out.println(request.getRequestURL().toString() + "?" + request.getQueryString());
        appid = ro.getAppid();
        noncestr = ro.getNonceStr();
        signature = ro.getSignature();
        timestamp = ro.getTimestamp();
      }

      out.write("\r\n");
      out.write("    <body>\r\n");
      out.write("   <!--  头部区域 -->\r\n");
      out.write("    \t<header class=\"clearfix ft16 pd10 cor9\">\r\n");
      out.write(
          "    \t\t<p class=\"jie-hd-lf fl\">接单期限: 还剩<span style=\"color:#FE0000;\"></span>天</p>\r\n");
      out.write("    \t\t<div class=\"jie-hd-rt fr\">\r\n");
      out.write("    \t\t\t<p><i class=\"jie-hd-ico di\"></i></p>\r\n");
      out.write("    \t\t</div>\r\n");
      out.write("    \t</header>\r\n");
      out.write("    \t<!-- 预算区域 -->\r\n");
      out.write("    \t<div class=\"yu tc clearfix bd1\">\r\n");
      out.write("    \t\t<p class=\"cor9 yusuan fl\">预算</p>\r\n");
      out.write("    \t\t<p class=\"money fl\"> <i class=\"money-ico di\"></i></p>\r\n");
      out.write("\t\t\t<div class=\"starttime fl\">\r\n");
      out.write("\t\t\t\t<p>启动时间</p>\r\n");
      out.write("\t\t\t\t<p></p>\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("\t\t\t<div class=\"endtime tr fl\">\r\n");
      out.write("\t\t\t\t<p>完成时间</p>\r\n");
      out.write("\t\t\t\t<p></p>\r\n");
      out.write("\t\t\t</div>\r\n");
      out.write("    \t</div>\r\n");
      out.write("    \t<!-- 详情 -->\r\n");
      out.write("    \t<div class=\"jie-inf cor9 pd10 ft14 bd1\">\r\n");
      out.write("    \t\t<h1 class=\"ft16\">项目详情:</h1>\r\n");
      out.write("    \t\t <ul class=\"inf-lei\">\r\n");
      out.write("    \t\t\t<!-- <li>Java3人</li>\r\n");
      out.write("    \t\t\t<li>PHP3人</li> -->\r\n");
      out.write("    \t\t</ul> \r\n");
      out.write("    \t\t<p></p>\r\n");
      out.write("    \t</div>\r\n");
      out.write("    \t<div class=\"pd10 cor9\" id=\"bmlist\">\r\n");
      out.write("    \t\t<p style=\"padding:10px 0;\">报名人数: <span>0</span>人</p>\r\n");
      out.write("    \t\t<ul class=\"people-list\">\r\n");
      out.write("    \t\t\t<!-- <li class=\"clearfix\">\r\n");
      out.write("    \t\t\t\t<a href=\"ta.html\" class=\"fl clearfix\">\r\n");
      out.write("    \t\t\t\t\t<img src=\"../images/1.jpg\" class=\"fl\">\r\n");
      out.write("\t    \t\t\t\t<p class=\"fl\">西门科技有限公司</p>\r\n");
      out.write("    \t\t\t\t</a>\r\n");
      out.write("\t    \t\t\t<i class=\"di people-list-ico fr\"></i>\r\n");
      out.write("    \t\t\t</li>\r\n");
      out.write("    \t\t\t<li class=\"clearfix yes\">\r\n");
      out.write("    \t\t\t\t<a href=\"ta.html\" class=\"fl clearfix\">\r\n");
      out.write("    \t\t\t\t\t<img src=\"../images/1.jpg\" class=\"fl\">\r\n");
      out.write("\t    \t\t\t\t<p class=\"fl\">西门科技有限公司</p>\r\n");
      out.write("    \t\t\t\t</a>\r\n");
      out.write("\t    \t\t\t<i class=\"di people-list-ico fr\"></i>\r\n");
      out.write("    \t\t\t</li>  -->\r\n");
      out.write("    \t\t</ul>\r\n");
      out.write(
          "    \t\t<a  class=\"jie-btn weui_btn weui_btn_primary\" style=\"display: none\"></a>\r\n");
      out.write("    \t</div>\r\n");
      out.write("        <div class=\"down\" ></div>\r\n");
      out.write("    \t <!-- 补充资料 -->\r\n");
      out.write("    \t<div class=\"add\">\r\n");
      out.write("\t\t    <div class=\"weui_cells weui_cells_form adddate\">\r\n");
      out.write("\t\t    \t<div class=\"adddate-hd weui_cell bd1\" >\r\n");
      out.write(
          "\t\t    \t\t<p class=\"tc\">补充资料<i class=\"adddate-hd-ico di\"></i></p>\r\n");
      out.write("\t\t    \t</div>\r\n");
      out.write("\t\t    \t<div class=\"weui_cell bd1\" id=\"imgurl\">\r\n");
      out.write(
          "\t                <div class=\"weui_cell_hd\"><img  class=\"tou-img\" src=\"\"></div>\r\n");
      out.write("\t                <div class=\"weui_cell_bd weui_cell_primary\">\r\n");
      out.write(
          "\t                    <input class=\"weui_input tr\" disabled=\"disabled\" type=\"text\" placeholder=\"上传头像\"/>\r\n");
      out.write("\t                </div>\r\n");
      out.write("\t            </div>\r\n");
      out.write("\t            <div class=\"weui_cell bd1\" >\r\n");
      out.write(
          "\t                <div class=\"weui_cell_hd\"><label class=\"weui_label\" >昵称</label></div>\r\n");
      out.write("\t                <div class=\"weui_cell_bd weui_cell_primary\">\r\n");
      out.write(
          "\t                    <input class=\"weui_input tr\" type=\"text\" id=\"nickname\" placeholder=\"请输入\"/>\r\n");
      out.write("\t                </div>\r\n");
      out.write("\t            </div>\r\n");
      out.write("\t            <div class=\"weui_cell bd1\">\r\n");
      out.write(
          "\t                <div class=\"weui_cell_hd\"><label class=\"weui_label\">公司名</label></div>\r\n");
      out.write("\t                <div class=\"weui_cell_bd weui_cell_primary\">\r\n");
      out.write(
          "\t                    <input class=\"weui_input tr\" type=\"text\" id=\"company_name\" placeholder=\"请输入\"/>\r\n");
      out.write("\t                </div>\r\n");
      out.write("\t            </div>\r\n");
      out.write("\t            <div class=\"weui_cell bd1\">\r\n");
      out.write(
          "\t                <div class=\"weui_cell_hd\"><label class=\"weui_label\">联系人</label></div>\r\n");
      out.write("\t                <div class=\"weui_cell_bd weui_cell_primary\">\r\n");
      out.write(
          "\t                    <input class=\"weui_input tr\" type=\"text\" id=\"contact\" placeholder=\"请输入\"/>\r\n");
      out.write("\t                </div>\r\n");
      out.write("\t            </div>\r\n");
      out.write("\t            <div class=\"weui_cell bd1\">\r\n");
      out.write(
          "\t                <div class=\"weui_cell_hd\"><label class=\"weui_label\">联系电话</label></div>\r\n");
      out.write("\t                <div class=\"weui_cell_bd weui_cell_primary\">\r\n");
      out.write(
          "\t                    <input class=\"weui_input tr\" type=\"tel\" id=\"tel\" placeholder=\"请输入\"/>\r\n");
      out.write("\t                </div>\r\n");
      out.write("\t            </div>\r\n");
      out.write("\t\t\t\t<div class=\"weui_cell bd1\">\r\n");
      out.write(
          "\t                <div class=\"weui_cell_hd\"><label class=\"weui_label\">联系地址</label></div>\r\n");
      out.write("\t                <div class=\"weui_cell_bd weui_cell_primary\">\r\n");
      out.write(
          "\t                    <input class=\"weui_input tr\" type=\"text\" id=\"addr\" placeholder=\"请输入\"/>\r\n");
      out.write("\t                </div>\r\n");
      out.write("\t            </div>\r\n");
      out.write("\t\t\t\t<div class=\"weui_btn_area\">\r\n");
      out.write(
          "\t\t            <a class=\"weui_btn weui_btn_primary\" href=\"javascript:\" id=\"showTooltips\">提交资料</a>\r\n");
      out.write("\t\t        </div>\r\n");
      out.write("\t        </div>\r\n");
      out.write("    \t</div>\r\n");
      out.write("    </body>\r\n");
      out.write("    <script type=\"text/javascript\">\r\n");
      out.write("    var openid=\"");
      out.print(openid);
      out.write("\";\r\n");
      out.write("    var wxid=\"");
      out.print(wxid);
      out.write("\";\r\n");
      out.write("    var itemid=\"");
      out.print(itemid);
      out.write("\";\r\n");
      out.write("    var memberInfo=JSON.parse(sessionStorage.getItem(\"MEMBERINFO\"));\r\n");
      out.write("    var state=0;\r\n");
      out.write("    var serverId=\"\";\r\n");
      out.write("    var data=\"\";\r\n");
      out.write("    var hasbm=false;\r\n");
      out.write("    var isJD=false;  // 此项目是否已接单\r\n");
      out.write("\t\t    $(function() {\r\n");
      out.write("\t\t\t\tinitBind();\r\n");
      out.write("\t\t\t\tgetItemInfo();\t\r\n");
      out.write("\t\t\t\tgetJssdkConfig();\r\n");
      out.write("\t\t\t\tsetmemberinfo();\r\n");
      out.write("\t\t\t});\r\n");
      out.write("\t\t  //获取会员信息\r\n");
      out.write("    \t\tfunction setmemberinfo(){\r\n");
      out.write("    \t\t\t//alert(JSON.stringify(memberInfo));\r\n");
      out.write("    \t\t\tif(memberInfo==null){\r\n");
      out.write("    \t\t\t\tgetmemberinfo();\r\n");
      out.write("    \t\t\t\treturn;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\tif(memberInfo.STATE==\"0\"){\r\n");
      out.write("    \t\t\t\t$(\"#imgurl img\").attr(\"src\",memberInfo.data.HEADIMGURL);\r\n");
      out.write("    \t\t\t\t$(\"#nickname\").val(memberInfo.data.NICKNAME);\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t    if(memberInfo.STATE==\"1\"){\r\n");
      out.write("    \t\t    \tstate=1;\r\n");
      out.write("    \t\t    }\r\n");
      out.write("    \t\t}\r\n");
      out.write("    \t\tfunction getmemberinfo(){\r\n");
      out.write("        \t\t$.ajax({\r\n");
      out.write("        \t\t\turl:\"");
      out.print(request.getContextPath());
      out.write("/wci/yw/GetMemberInfo.do\",\r\n");
      out.write("        \t\t\tdata:{\"OPENID\":openid,\"WXID\":wxid},\r\n");
      out.write("        \t\t\tsuccess:function(res){\r\n");
      out.write(
          "        \t\t\t\tsessionStorage.setItem(\"MEMBERINFO\",JSON.stringify(res.data));\r\n");
      out.write("        \t\t\t\tmemberInfo=res.data;\r\n");
      out.write("        \t\t\t\tsetmemberinfo();\r\n");
      out.write(
          "        \t\t\t\t//window.location.href=base_url+\"/\"+reurl+\"?WXID=\"+wxid+\"&OPENID=\"+openid;\r\n");
      out.write("        \t\t\t}\r\n");
      out.write("        \t\t});\r\n");
      out.write("        \t}\r\n");
      out.write("\t\t    function getJssdkConfig(){\r\n");
      out.write("    \t\t\twx.config({\r\n");
      out.write("    \t\t\t    debug: false,\r\n");
      out.write("    \t\t\t    appId: \"");
      out.print(appid);
      out.write("\",\r\n");
      out.write("    \t\t\t    timestamp: \"");
      out.print(timestamp);
      out.write("\",\r\n");
      out.write("    \t\t\t    nonceStr: \"");
      out.print(noncestr);
      out.write("\",\r\n");
      out.write("    \t\t\t    signature: \"");
      out.print(signature);
      out.write("\",\r\n");
      out.write("    \t\t\t    jsApiList: [\r\n");
      out.write("    \t\t\t       'chooseImage',\r\n");
      out.write("    \t\t\t       'uploadImage',\r\n");
      out.write("    \t\t\t       'downloadImage'\r\n");
      out.write("    \t\t\t        ]\r\n");
      out.write("    \t\t\t  });\r\n");
      out.write("    \t\t\t\twx.error(function(res){\r\n");
      out.write("    \t\t\t\t\talert(\"服务器异常,请稍后重试!\");\r\n");
      out.write(
          "    \t\t\t\t    // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。\r\n");
      out.write("    \t\t\t\t});\r\n");
      out.write("    \t\t\t\twx.ready(function(){\r\n");
      out.write("    \t\t\t\t\tdocument.querySelector('#imgurl').onclick = function () {\r\n");
      out.write("    \t\t\t\t\t\twx.chooseImage({\r\n");
      out.write("    \t\t\t\t\t\t    count: 1, // 默认9\r\n");
      out.write(
          "    \t\t\t\t\t\t    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有\r\n");
      out.write(
          "    \t\t\t\t\t\t    sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有\r\n");
      out.write("    \t\t\t\t\t\t    success: function (res) {\r\n");
      out.write("    \t\t\t\t\t\t    \t//alert(JSON.stringify(res));\r\n");
      out.write("    \t\t\t\t\t\t    \t$(\"#imgurl img\").attr(\"src\",res.localIds[0]);\r\n");
      out.write("    \t\t\t\t\t\t        wx.uploadImage({\r\n");
      out.write(
          "    \t\t\t\t\t\t            localId: res.localIds[0], // 需要上传的图片的本地ID,由chooseImage接口获得\r\n");
      out.write(
          "    \t\t\t\t\t\t            isShowProgressTips: 1, // 默认为1,显示进度提示\r\n");
      out.write("    \t\t\t\t\t\t            success: function (res) {\r\n");
      out.write(
          "    \t\t\t\t\t\t               serverId = res.serverId; // 返回图片的服务器端ID\r\n");
      out.write("    \t\t\t\t\t\t            }\r\n");
      out.write("    \t\t\t\t\t\t        });\r\n");
      out.write("    \t\t\t\t\t\t    }\r\n");
      out.write("    \t\t\t\t\t\t});\r\n");
      out.write("    \t\t\t\t\t}\r\n");
      out.write("    \t\t\t\t\t\r\n");
      out.write("    \t\t\t\t});\r\n");
      out.write("    \t\t}\r\n");
      out.write("\t\t    function getItemInfo(){\r\n");
      out.write("\t\t    \t$.ajax({\r\n");
      out.write("\t\t    \t\turl:\"");
      out.print(request.getContextPath());
      out.write("/wci/yw/GetItemInfo.do\",\r\n");
      out.write("\t\t    \t\tdata:{\"ITEM_ID\":itemid},\r\n");
      out.write("\t\t    \t\tbeforeSend:function(){\r\n");
      out.write("\t\t    \t\t\twc.showLoadding(\"加载中\");\r\n");
      out.write("\t\t    \t\t},\r\n");
      out.write("\t\t    \t\tsuccess:function(res){\r\n");
      out.write("\t\t    \t\t\t//alert(JSON.stringify(res.data));\r\n");
      out.write("\t\t    \t\t\tsetData(res.data);\r\n");
      out.write("\t\t    \t\t\tdata=res.data;\r\n");
      out.write("\t\t    \t\t},\r\n");
      out.write("\t\t    \t\tcomplete:function(){\r\n");
      out.write("\t\t    \t\t\twc.closeLoadding();\r\n");
      out.write("\t\t    \t\t},\r\n");
      out.write("\t\t    \t\terror:function(){\r\n");
      out.write("\t\t    \t\t\twc.closeLoadding();\r\n");
      out.write("\t\t    \t\t}\r\n");
      out.write("\t\t    \t});\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function setData(data){\r\n");
      out.write("\t\t    \tsetCommData(data);\r\n");
      out.write("\t\t    \t//alert(JSON.stringify(data));\r\n");
      out.write("\t\t    \t// 若是发布人进入此页面\r\n");
      out.write("\t\t    \tif(data.ITEMINFO.OPENID==openid&&data.ITEMINFO.WXID==wxid){\r\n");
      out.write("\t\t    \t\tsetBMData(data);\r\n");
      out.write("\t\t    \t}else{  // 非发布人进入\r\n");
      out.write("\t\t    \t\tvar html=\"\";\r\n");
      out.write("\t\t    \t\t$(\"#bmlist span:first\").html(data.BMLIST.length);\r\n");
      out.write("\t\t    \t\tfor(var i=0;i<data.BMLIST.length;i++){\r\n");
      out.write("\t\t\t    \t\tif(data.BMLIST[i].IS_JD==\"1\"){\r\n");
      out.write("\t\t\t    \t\t\tisJD=true;\r\n");
      out.write("\t\t\t    \t\t}\r\n");
      out.write("\t\t\t    \t\tif(data.BMLIST[i].OPENID==openid&&data.BMLIST[i].WXID==wxid){\r\n");
      out.write("\t\t\t    \t\t\thasbm=true;\r\n");
      out.write("\t\t\t    \t\t}\r\n");
      out.write("\t\t\t    \t\thtml+=getPeopleHtml2(data.BMLIST[i]);\r\n");
      out.write("\t\t\t    \t}\r\n");
      out.write("\t\t    \t\t$(\".people-list\").html(html);\r\n");
      out.write("\t\t    \t\tif(!hasbm&&!isJD){\r\n");
      out.write("\t\t    \t\t\t$(\".jie-btn\").unbind();\r\n");
      out.write("\t\t\t    \t    $(\".jie-btn\").text(\"报名\");\r\n");
      out.write("\t\t\t    \t    $(\".jie-btn\").show();\r\n");
      out.write("\t\t\t    \t    $(\".jie-btn\").click(BMItem);\r\n");
      out.write("\t\t    \t\t}\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function BMItem(){\r\n");
      out.write("\t\t    \tif(state==0){\r\n");
      out.write("\t\t    \t\t$(\".add\").show();\r\n");
      out.write("\t\t    \t\t$(\".down\").show();\r\n");
      out.write("\t\t    \t}else{\r\n");
      out.write("\t\t    \t\t$.ajax({\r\n");
      out.write("\t\t\t    \t\turl:\"");
      out.print(request.getContextPath());
      out.write("/wci/yw/BMItem.do\",\r\n");
      out.write("\t\t\t    \t\tdata:{\"ITEM_ID\":itemid,\"OPENID\":openid,\"WXID\":wxid},\r\n");
      out.write("\t\t\t    \t\tbeforeSend:function(){\r\n");
      out.write("\t\t\t    \t\t\twc.showLoadding(\"操作中\");\r\n");
      out.write("\t\t\t    \t\t},\r\n");
      out.write("\t\t\t    \t\tsuccess:function(res){\r\n");
      out.write("\t\t\t    \t\t\tif(res.data==\"1\"){\r\n");
      out.write("\t\t\t    \t\t\t\twc.showMsg(\"报名成功\",function(){\r\n");
      out.write(
          "\t\t\t    \t\t\t\t\twindow.location.href=\"./succss-baoming.jsp?OPENID=\"+openid+\"&WXID=\"+wxid+\"&ITEM_ID=\"+itemid;\r\n");
      out.write("\t\t\t    \t\t\t\t});\r\n");
      out.write("\t\t\t    \t\t\t}\r\n");
      out.write("\t\t\t    \t\t\t\r\n");
      out.write("\t\t\t    \t\t},\r\n");
      out.write("\t\t\t    \t\tcomplete:function(){\r\n");
      out.write("\t\t\t    \t\t\twc.closeLoadding();\r\n");
      out.write("\t\t\t    \t\t}\r\n");
      out.write("\t\t\t    \t\t\r\n");
      out.write("\t\t\t    \t});\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    \t\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function setBMData(data){  //记载报名列表\r\n");
      out.write("\t\t    \tvar html=\"\";\r\n");
      out.write("\t\t        $(\"#bmlist span:first\").html(data.BMLIST.length);\r\n");
      out.write("\t\t        //alert(JSON.stringify(data));\r\n");
      out.write("\t\t    \tfor(var i=0;i<data.BMLIST.length;i++){\r\n");
      out.write("\t\t    \t\tif(data.BMLIST[i].IS_JD==\"1\"){\r\n");
      out.write("\t\t    \t\t\tisJD=true;\r\n");
      out.write("\t\t    \t\t}\r\n");
      out.write("\t\t    \t\thtml+=getPeopleHtml(data.BMLIST[i]);\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    \t$(\".people-list\").html(html);\r\n");
      out.write("\t\t    \tif(data.BMLIST.length==0){  //没有人接单可以进行修改\r\n");
      out.write("\t\t    \t\t$(\".jie-btn\").unbind();\r\n");
      out.write("\t\t    \t    $(\".jie-btn\").text(\"修改需求\");\r\n");
      out.write("\t\t    \t    $(\".jie-btn\").show();\r\n");
      out.write("\t\t    \t    $(\".jie-btn\").click(updateItem);\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    \tif(data.BMLIST.length>0&&!isJD){\r\n");
      out.write("\t\t    \t\t$(\".jie-btn\").unbind();\r\n");
      out.write("\t\t    \t    $(\".jie-btn\").text(\"确认接单公司\");\r\n");
      out.write("\t\t    \t    $(\".jie-btn\").show();\r\n");
      out.write("\t\t    \t    $(\".jie-btn\").click(updateJDGS);\r\n");
      out.write("\t\t    \t}\t\r\n");
      out.write("\t\t    \t\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    //确认接单公司\r\n");
      out.write("\t\t    \r\n");
      out.write("\t\t    function updateJDGS(data){\r\n");
      out.write("\t\t    \t\tif(checkJDGS()){\r\n");
      out.write("\t\t    \t\t\tsubmitJDGS();\r\n");
      out.write("\t\t    \t\t}\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function submitJDGS(){\r\n");
      out.write("\t\t    \t$.ajax({\r\n");
      out.write("\t    \t\t\turl:\"");
      out.print(request.getContextPath());
      out.write("/wci/yw/SetJD.do\",\r\n");
      out.write("\t    \t\t\tdata:{\"ITEM_ID\":itemid,\"JDGSARR\":JSON.stringify(jdgsarr)},\r\n");
      out.write("\t    \t\t\tbeforeSend:function(){\r\n");
      out.write("\t    \t\t\t\twc.showLoadding(\"操作中\");\r\n");
      out.write("\t    \t\t\t},\r\n");
      out.write("\t    \t\t\tsuccess:function(res){\r\n");
      out.write("\t    \t\t\t\tif(parseInt(res.data)>=1){\r\n");
      out.write("\t    \t\t\t\t\twc.showMsg(\"设置成功\",function(){\r\n");
      out.write("\t\t    \t\t\t\t\twindow.location.reload();\r\n");
      out.write("\t    \t\t\t\t\t});\r\n");
      out.write("\t    \t\t\t\t}\r\n");
      out.write("\t    \t\t\t},\r\n");
      out.write("\t    \t\t\tcomplete:function(){\r\n");
      out.write("\t    \t\t\t\twc.closeLoadding();\r\n");
      out.write("\t    \t\t\t}\r\n");
      out.write("\t    \t\t});\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    var jdgsarr=[];\r\n");
      out.write("\t\t    function checkJDGS(){\r\n");
      out.write("\t\t    \tif($(\".people-list>li.yes\").length==0){\r\n");
      out.write("\t\t    \t\twc.showDialog(\"\",\"请选择接单公司\");\r\n");
      out.write("\t\t    \t\treturn false\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    \t$(\".people-list>li.yes\").each(function(){\r\n");
      out.write("\t\t    \t\tvar item={};\r\n");
      out.write("\t\t    \t\titem.OPENID=$(this).attr(\"openid\");\r\n");
      out.write("\t\t    \t\titem.WXID=$(this).attr(\"wxid\");\r\n");
      out.write("\t\t    \t\titem.NAME=$(this).find(\"p\").html();\r\n");
      out.write("\t\t    \t\tjdgsarr.push(item);\r\n");
      out.write("\t\t    \t});\r\n");
      out.write("\t\t    \t//alert(JSON.stringify(jdgsarr));\r\n");
      out.write("\t\t    \treturn true;\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function updateItem(){\r\n");
      out.write("\t\t    \tif(data.ITEMINFO.ITEM_TYPE==\"1\"){\r\n");
      out.write(
          "\t\t    \t\twindow.location.href=\"./project.jsp?OPENID=\"+openid+\"&WXID=\"+wxid+\"&ITEMID=\"+itemid;\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    \tif(data.ITEMINFO.ITEM_TYPE==\"2\"){\r\n");
      out.write(
          "\t\t    \t\twindow.location.href=\"./resources.jsp?OPENID=\"+openid+\"&WXID=\"+wxid+\"&ITEMID=\"+itemid;\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function getPeopleHtml(item){\r\n");
      out.write(
          "\t\t    \tvar html=\"<li class='clearfix \"+(item.IS_JD==\"1\"?'yes':'')+\"' openid='\"+item.OPENID+\"' wxid='\"+item.WXID+\"'>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\t\"<a  class='fl clearfix'>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\t\"<img src='\"+item.IMGURL+\"' class='fl'>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\t\"<p class='fl'>\"+item.COMPANY_NAME+\"</p>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\"</a>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\"<i class='di people-list-ico fr' ></i>\"+\r\n");
      out.write("\t\t\t\t\t\t\"</li>\";\r\n");
      out.write("\t\t\t\t\t\treturn html;\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function getPeopleHtml2(item){\r\n");
      out.write(
          "\t\t    \tvar html=\"<li class='clearfix \"+(item.IS_JD==\"1\"?'yes':'')+\"' openid='\"+item.OPENID+\"' wxid='\"+item.WXID+\"'>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\t\"<a  class='fl clearfix'>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\t\"<img src='\"+item.IMGURL+\"' class='fl'>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\t\"<p class='fl'>\"+item.COMPANY_NAME+\"</p>\"+\r\n");
      out.write("\t\t\t\t\t\t\t\"</a>\"+\r\n");
      out.write(
          "\t\t\t\t\t\t\t\"<i class='di people-list-ico fr' style='display:\"+(item.IS_JD==\"1\"?'block':'none')+\"'></i>\"+\r\n");
      out.write("\t\t\t\t\t\t\"</li>\";\r\n");
      out.write("\t\t\t\t\t\treturn html;\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function setCommData(data){\r\n");
      out.write("\t\t    \tvar item=data.ITEMINFO;\r\n");
      out.write("\t\t    \t$(\"header p:first span\").html(item.JSQX);\r\n");
      out.write("\t\t    \t$(\"header p:last\").prepend(item.COMPANY_NAME);\r\n");
      out.write("\t\t    \t$(\".money\").prepend(cc(item.ITEM_XMYS));\r\n");
      out.write("\t\t    \t$(\".starttime p:last\").html(item.ITEM_QDSJ);\r\n");
      out.write("\t\t    \t$(\".endtime p:last\").html(item.ITEM_WCSJ);\r\n");
      out.write("\t\t    \t$(\".jie-inf p:last\").html(item.ITEM_XQ);\r\n");
      out.write("\t\t    \t\r\n");
      out.write("\t\t    \tif(item.ITEM_TYPE==\"2\"){\r\n");
      out.write("\t\t    \t\tfor(var i=0;i<data.TYPELIST.length;i++){\r\n");
      out.write(
          "\t\t    \t\t\t$(\".inf-lei\").append(\"<li>\"+data.TYPELIST[i].ITEM_TYPE_NAME+\" \"+data.TYPELIST[i].ITEM_TYPE_NUM+\"人</li>\");\r\n");
      out.write("\t\t    \t\t}\r\n");
      out.write("\t\t    \t}\r\n");
      out.write("\t\t    \t\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    function cc(s){\r\n");
      out.write("\t            if(/[^0-9\\.]/.test(s)) return \"invalid value\";\r\n");
      out.write("\t            s=s.replace(/^(\\d*)$/,\"$1.\");\r\n");
      out.write("\t            s=(s+\"00\").replace(/(\\d*\\.\\d\\d)\\d*/,\"$1\");\r\n");
      out.write("\t            s=s.replace(\".\",\",\");\r\n");
      out.write("\t            var re=/(\\d)(\\d{3},)/;\r\n");
      out.write("\t            while(re.test(s))\r\n");
      out.write("\t                    s=s.replace(re,\"$1,$2\");\r\n");
      out.write("\t            s=s.replace(/,(\\d\\d)$/,\".$1\");\r\n");
      out.write("\t            return  s.replace(/^\\./,\"0.\");\r\n");
      out.write("\t            }\r\n");
      out.write("\t\t    $(\"#showTooltips\").click(function(){\r\n");
      out.write("    \t\t\tif(memberCheck()){\r\n");
      out.write("    \t\t\t\tmemberSubmit();\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t});\r\n");
      out.write("    \t\tfunction memberSubmit(){\r\n");
      out.write("    \t\t\t//alert(1);\r\n");
      out.write("    \t\t\t$.ajax({\r\n");
      out.write("    \t\t\t\turl:\"");
      out.print(request.getContextPath());
      out.write("/wci/yw/MemberSubmit.do\",\r\n");
      out.write(
          "    \t\t\t\tdata:{\"OPENID\":openid,\"WXID\":wxid,\"SERVERID\":serverId,\"NICKNAME\":$(\"#nickname\").val(),\r\n");
      out.write(
          "    \t\t\t\t\t   \"COMPANY_NAME\":$(\"#company_name\").val(),\"CONTACT\":$(\"#contact\").val(),\"IMGURL\":memberInfo.data.HEADIMGURL,\r\n");
      out.write("    \t\t\t\t\t   \"TEL\":$(\"#tel\").val(),\"ADDR\":$(\"#addr\").val()\r\n");
      out.write("    \t\t\t\t     },\r\n");
      out.write("    \t\t\t\tbeforeSend:function(){\r\n");
      out.write("    \t\t\t\t\twc.showLoadding(\"提交中.....\");\r\n");
      out.write("    \t\t\t\t},\r\n");
      out.write("    \t\t\t\tsuccess:function(res){\r\n");
      out.write("    \t\t\t\t\tif(res.data==\"1\"){\r\n");
      out.write("    \t\t\t\t\t\twc.showMsg(\"提交成功\",function(){\r\n");
      out.write("        \t\t\t\t\t\t$(\".add\").hide();\r\n");
      out.write("                \t\t\t\t$(\".down\").hide();\r\n");
      out.write("                \t\t\t\tmemberInfo.STATE=1;\r\n");
      out.write(
          "                \t\t\t\tsessionStorage.setItem(\"MEMBERINFO\",JSON.stringify(memberInfo));\r\n");
      out.write("                \t\t\t\tstate=1;\r\n");
      out.write("        \t\t\t\t\t});\r\n");
      out.write("    \t\t\t\t\t}\r\n");
      out.write("    \t\t\t\t\t//setTime\r\n");
      out.write("    \t\t\t\t\t\r\n");
      out.write("    \t\t\t\t},\r\n");
      out.write("    \t\t\t\tcomplete:function(){\r\n");
      out.write("    \t\t\t\t\twc.closeLoadding();\r\n");
      out.write("    \t\t\t\t}\r\n");
      out.write("    \t\t\t});\r\n");
      out.write("    \t\t}\r\n");
      out.write("    \t\tfunction memberCheck(){\r\n");
      out.write("    \t\t\t//wc.showDialog(\"title\",\"text\");\r\n");
      out.write("    \t\t\tif($(\"#nickname\").val()==\"\"){\r\n");
      out.write("    \t\t\t\twc.showDialog(\"\",\"昵称不能为空!\");\r\n");
      out.write("    \t\t\t\treturn false;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\tif($(\"#company_name\").val()==\"\"){\r\n");
      out.write("    \t\t\t\twc.showDialog(\"\",\"公司名不能为空!\");\r\n");
      out.write("    \t\t\t\treturn false;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\tif($(\"#contact\").val()==\"\"){\r\n");
      out.write("    \t\t\t\twc.showDialog(\"\",\"联系人不能为空!\");\r\n");
      out.write("    \t\t\t\treturn false;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\tif($(\"#tel\").val()==\"\"){\r\n");
      out.write("    \t\t\t\twc.showDialog(\"\",\"联系电话不能为空!\");\r\n");
      out.write("    \t\t\t\treturn false;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\tif(!$(\"#tel\").val().match(/^1[0-9]{10}$/)){\r\n");
      out.write("    \t\t\t\twc.showDialog(\"\",\"联系电话格式不正确!\");\r\n");
      out.write("    \t\t\t\treturn false;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\tif($(\"#addr\").val()==\"\"){\r\n");
      out.write("    \t\t\t\twc.showDialog(\"\",\"联系地址不能为空!\");\r\n");
      out.write("    \t\t\t\treturn false;\r\n");
      out.write("    \t\t\t}\r\n");
      out.write("    \t\t\treturn true;\r\n");
      out.write("    \t\t}\r\n");
      out.write("            function initBind(){\r\n");
      out.write("            \t//人员列表情况\r\n");
      out.write(
          "            \t$(\".people-list\").delegate(\"i.people-list-ico\",\"click\",function(){\r\n");
      out.write("                       if(!isJD){  //没有人接单\r\n");
      out.write("                    \t   //$(\".people-list>li\").removeClass(\"yes\");\r\n");
      out.write("                           $(this).parent(\"li\").toggleClass(\"yes\");\r\n");
      out.write("                       }\r\n");
      out.write("            \t});\r\n");
      out.write("            \t$(\".people-list\").delegate(\"a\",\"click\",function(){\r\n");
      out.write(
          "            \t\twindow.location.href=\"./my.jsp?OPENID=\"+$(this).parent().attr(\"openid\")+\"&WXID=\"+$(this).parent().attr(\"wxid\");\r\n");
      out.write("            \t})\r\n");
      out.write("\t\t\t\t/* $(\".people-list-ico\").click(function(event) {\r\n");
      out.write("\t\t\t\t\t//判断是否具有类名\r\n");
      out.write("\t\t\t\t\tif ($(this).parent(\"li\").hasClass('yes')) {\r\n");
      out.write("\t\t\t\t\t\t$(this).parent(\"li\").removeClass('yes')\r\n");
      out.write("\t\t\t\t\t}else{\r\n");
      out.write("\t\t\t\t\t\t$(this).parent(\"li\").addClass('yes');\r\n");
      out.write("\t\t\t\t\t};\r\n");
      out.write("\t\t\t\t\t//如果li 任意具有就\r\n");
      out.write("\t\t\t\t\tif ($(\".people-list li\").hasClass('yes')) {\r\n");
      out.write("\t\t\t\t\t\t$(\".jie-btn\").text(\"确认接单公司\")\r\n");
      out.write("\t\t\t\t\t}else{\r\n");
      out.write("\t\t\t\t\t\t$(\".jie-btn\").text(\"修改需求\")\r\n");
      out.write("\t\t\t\t\t};\r\n");
      out.write("\t\t\t\t}); */\r\n");
      out.write("\t\t\t\t$(\".down\").click(function(){\r\n");
      out.write("\t\t\t\t\t$(\".down\").hide();\r\n");
      out.write("\t\t\t\t\t$(\".add\").hide();\r\n");
      out.write("\t\t\t\t});\r\n");
      out.write("            }\r\n");
      out.write("\t\t</script>\r\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);
        else log(t.getMessage(), t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }