⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_jsp.java

📁 l劳动力管理系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import com.hr.actionform.UserActionForm;
import com.hr.vo.Employee;

public class admin_jsp extends HttpJspBase {


String name;
String gender;
int age;
String deptname;
String note;
String position;
Employee employee;


  private static java.util.Vector _jspx_includes;

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_form_method_action;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_hidden_property_name;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_logic_iterate_property_name_id;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_text_property_name_indexed;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_hidden_property_name_indexed;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_select_property_name_indexed;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_optionsCollection_value_property_name_label;

  public admin_jsp() {
    _jspx_tagPool_html_form_method_action = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_html_hidden_property_name = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_logic_iterate_property_name_id = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_html_text_property_name_indexed = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_html_hidden_property_name_indexed = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_html_select_property_name_indexed = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_html_optionsCollection_value_property_name_label = new org.apache.jasper.runtime.TagHandlerPool();
  }

  public java.util.List getIncludes() {
    return _jspx_includes;
  }

  public void _jspDestroy() {
    _jspx_tagPool_html_form_method_action.release();
    _jspx_tagPool_html_hidden_property_name.release();
    _jspx_tagPool_logic_iterate_property_name_id.release();
    _jspx_tagPool_html_text_property_name_indexed.release();
    _jspx_tagPool_html_hidden_property_name_indexed.release();
    _jspx_tagPool_html_select_property_name_indexed.release();
    _jspx_tagPool_html_optionsCollection_value_property_name_label.release();
  }

  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=utf-8");
      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");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n  ");
      out.write("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"css/shared.css\">\r\n");
      out.write("<title>\r\nadmin\r\n");
      out.write("</title>\r\n");
      out.write("<script language=\"javascript\">\r\nvar selectedTr = null;\r\nfunction setTrColor(colorTr,color)\r\n{\r\n if(colorTr.tagName==\"TR\")\r\n {\r\n  for(var i=0;i");
      out.write("<colorTr.childNodes.length;i++)\r\n  {\r\n   colorTr.childNodes(i).style.backgroundColor = color;\r\n   colorTr.childNodes(i).children(0).style.backgroundColor = color;\r\n  }\r\n }\r\n}\r\nfunction adduser()\r\n{\r\n     document.userActionForm.operation.value = \"add\";\r\n     document.userActionForm.submit();\r\n}\r\nfunction deleteuser()\r\n{\r\n//     alert(\"deleteuser\");\r\n     if(selectedTr!=null)\r\n    {   alert(selectedTr.childNodes(0).children(1).value);\r\n\tif(selectedTr.childNodes(0).children(1).value!=0&&selectedTr.childNodes(0).children(1).value!=null)\r\n        {\r\n\t\tdocument.userActionForm.deleteUID.value = selectedTr.childNodes(0).children(1).value;\r\n\t\tdocument.userActionForm.operation.value=\"delete\";\r\n\t\tuserRows.removeChild(selectedTr);\r\n       \t\tselectedTr = null;\r\n       \t\tdocument.userActionForm.submit();\r\n        }else\r\n\t{\r\n\t\tuserRows.removeChild(selectedTr);\r\n\t\tselectedTr = null;\r\n\t}\r\n    }\r\n}\r\nfunction saveuser()\r\n{\r\n//\talert(\"saveuser\");\r\n \tdocument.userActionForm.operation.value = \"save\";\r\n\tdocument.userActionForm.submit();\r\n");
      out.write("}\r\nfunction onClickedCell()\r\n{\r\n var clickedcell = event.srcElement;\r\n if(selectedTr!=null)\r\n{\r\n  setTrColor(selectedTr,\"#FFFFFF\");\r\n}\r\n while(clickedcell.tagName!=\"TR\")\r\n {\r\n   clickedcell = clickedcell.parentElement;\r\n }\r\n selectedTr = clickedcell;\r\n setTrColor(selectedTr,\"#FFDDFF\");\r\n}\r\n");
      out.write("</script>\r\n");
      out.write("</head>\r\n");
      out.write("<body bgcolor=\"#ffffff\">\r\n");
      out.write("\r\n");

 session = request.getSession(false);
if(session!=null)
{
   employee = (Employee)session.getAttribute("pass");
   if(employee!=null)
   {
	name =  employee.getEmployeeName();
	gender = employee.getGender();
	age = employee.getAge().intValue();
  	deptname = employee.getDept().getDeptName() ;
 	note = employee.getNote();
        int type = employee.getEmployeeType().intValue();
	switch(type)
        {
          case 1:
            position = "初级职称" ;
		break;
	  case 2:
		position="中级职称";
		break;
          case 3:
		position="高级职称";
		break;
          default:
		position="--";
         }
   }else
   {
     int i=1/0;
   }

}

      out.write("\r\n");
      out.write("<h1>\r\n欢迎使用劳力管理系统!\r\n");
      out.write("<br>\r\n");
      out.write("</h1>\r\n登录员工信息:\r\n");
      out.write("<br>\r\n");
      out.write("<hr height=1 />\r\n");
      out.write("<table width=100%>\r\n");
      out.write("<tbody >\r\n");
      out.write("<tr>\r\n");
      out.write("<td class=\"tdbg1\" width=15%>员工姓名:");
      out.write("</td>");
      out.write("<td class=\"tdbg2\" width=15% align=\"center\">");
      out.print(name);
      out.write("</td>\r\n");
      out.write("<td class=\"tdbg1\" width=15%>员工性别:");
      out.write("</td>");
      out.write("<td class=\"tdbg2\" width=15% align=\"center\">");
      out.print(gender);
      out.write("</td>\r\n");
      out.write("<td class=\"tdbg1\" width=15%>员工年龄:");
      out.write("</td>");
      out.write("<td class=\"tdbg2\" width=15% align=\"center\">");
      out.print(age);
      out.write("</td>\r\n\r\n");
      out.write("</tr>\r\n");
      out.write("<tr>\r\n");
      out.write("<td class=\"tdbg1\" width=15%>所属部门:");
      out.write("</td>");
      out.write("<td class=\"tdbg2\" width=15% align=\"center\">");
      out.print(deptname);
      out.write("</td>\r\n");
      out.write("<td class=\"tdbg1\" width=15%>员工职称:");
      out.write("</td>");
      out.write("<td class=\"tdbg2\" width=15% align=\"center\">");
      out.print(position);
      out.write("</td>\r\n");
      out.write("<td class=\"tdbg1\" width=15%>员工备注:");
      out.write("</td>");
      out.write("<td class=\"tdbg2\" width=15% align=\"center\">");
      out.print(note);
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      out.write("</tbody>\r\n");
      out.write("</table>\r\n");
      out.write("<hr height=1 />\r\n");
      out.write("<h2 align=\"center\">\r\n用户管理模块\r\n");
      out.write("</h2>\r\n");
      /* ----  html:form ---- */
      org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = (org.apache.struts.taglib.html.FormTag) _jspx_tagPool_html_form_method_action.get(org.apache.struts.taglib.html.FormTag.class);
      _jspx_th_html_form_0.setPageContext(pageContext);
      _jspx_th_html_form_0.setParent(null);
      _jspx_th_html_form_0.setMethod("post");
      _jspx_th_html_form_0.setAction("userAction.do");
      int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
      if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\r\n");
          if (_jspx_meth_html_hidden_0(_jspx_th_html_form_0, pageContext))
            return;
          out.write("\r\n");
          if (_jspx_meth_html_hidden_1(_jspx_th_html_form_0, pageContext))
            return;
          out.write("\r\n");

//UserActionForm userActionForm = (UserActionForm)request.getAttribute("userActionForm");
//
//out.print(userActionForm.getUsers().size() + "");

          out.write("\r\n");
          out.write("<table >\r\n");
          out.write("<tr>\r\n");
          out.write("<td class=\"tdframe\">\r\n");
          out.write("<table class=\"table1\">\r\n");
          out.write("<thead class=\"tdsectionbar\">\r\n");
          out.write("<td align=\"center\" class=\"tdsectionbar\">用户名");
          out.write("</td>\r\n");
          out.write("<td align=\"center\" class=\"tdsectionbar\">密码");
          out.write("</td>\r\n");
          out.write("<td align=\"center\" class=\"tdsectionbar\" width=\"200\">用户类型");
          out.write("</td>\r\n");
          out.write("<td align=\"center\" class=\"tdsectionbar\" width=\"200\">员工");
          out.write("</td>\r\n");
          out.write("</thead>\r\n");
          out.write("<tbody id=\"userRows\" onclick=\"onClickedCell()\">\r\n");
          /* ----  logic:iterate ---- */
          org.apache.struts.taglib.logic.IterateTag _jspx_th_logic_iterate_0 = (org.apache.struts.taglib.logic.IterateTag) _jspx_tagPool_logic_iterate_property_name_id.get(org.apache.struts.taglib.logic.IterateTag.class);
          _jspx_th_logic_iterate_0.setPageContext(pageContext);
          _jspx_th_logic_iterate_0.setParent(_jspx_th_html_form_0);
          _jspx_th_logic_iterate_0.setName("userActionForm");
          _jspx_th_logic_iterate_0.setProperty("users");
          _jspx_th_logic_iterate_0.setId("users");
          int _jspx_eval_logic_iterate_0 = _jspx_th_logic_iterate_0.doStartTag();
          if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            java.lang.Object users = null;
            if (_jspx_eval_logic_iterate_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
              javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
              out = _bc;
              _jspx_th_logic_iterate_0.setBodyContent(_bc);
              _jspx_th_logic_iterate_0.doInitBody();
            }
            users = (java.lang.Object) pageContext.findAttribute("users");
            do {
              out.write("\r\n");
              out.write("<tr class=\"tdsectionbar\">\r\n\r\n");
              out.write("<td class=\"tdbg0\">\r\n\r\n");
              if (_jspx_meth_html_text_0(_jspx_th_logic_iterate_0, pageContext))
                return;
              out.write("\r\n");
              if (_jspx_meth_html_hidden_2(_jspx_th_logic_iterate_0, pageContext))
                return;
              out.write("\r\n");
              out.write("</td>\r\n");
              out.write("<td class=\"tdbg0\">\r\n");
              if (_jspx_meth_html_text_1(_jspx_th_logic_iterate_0, pageContext))
                return;
              out.write("\r\n");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -