archive_user_list.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.util.*"%>
  3. <%@ page import = "cn.js.fan.db.*"%>
  4. <%@ page import = "cn.js.fan.web.*"%>
  5. <%@ page import = "cn.js.fan.util.*"%>
  6. <%@ page import = "com.redmoon.oa.archive.*"%>
  7. <%@ page import = "com.redmoon.oa.person.*"%>
  8. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>人事档案管理</title>
  14. <link href="../common.css" rel="stylesheet" type="text/css">
  15. <%@ include file="../inc/nocache.jsp"%>
  16. <style type="text/css">
  17. <!--
  18. .STYLE2 {color: #0033FF}
  19. .STYLE3 {color: #FF0000}
  20. -->
  21. </style>
  22. </head>
  23. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  24. <br>
  25. <table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main">
  26.   <tr> 
  27.     <td width="840" height="23" valign="middle" class="right-title"><span>&nbsp;用户信息管理</span></td>
  28.   </tr>
  29.   <tr> 
  30.     <td valign="top" background="images/tab-b-back.gif">
  31. <%
  32.         String op = ParamUtil.get(request, "op");
  33. String sql = "",sex = "",userRealName = "";
  34. if(op.equals("search")){
  35. sql = ArchiveSQLBuilder.getSearchUserInfo(request);
  36. }else{
  37. sql = ArchiveSQLBuilder.getUserInfo();
  38. }
  39. String querystr = "";
  40. if(op.equals("search")){
  41.     querystr += "op=" + op + "realName=" + StrUtil.UrlEncode(ParamUtil.get(request, "realName")) + "&sex=" + StrUtil.UrlEncode(ParamUtil.get(request, "sex")) + "&fromBirthday=" + ParamUtil.get(request, "fromBirthday")
  42. + "&toBirthday=" + ParamUtil.get(request, "toBirthday") + "&fromJoinDepartmentDate=" + StrUtil.UrlEncode(ParamUtil.get(request, "fromJoinDepartmentDate")) + "&inActiveService=" + StrUtil.UrlEncode(ParamUtil.get(request, "inActiveService")) + "&healthState=" + StrUtil.UrlEncode(ParamUtil.get(request, "healthState"))
  43. + "&mostGrade=" + StrUtil.UrlEncode(ParamUtil.get(request, "mostGrade")) + "&culture=" + StrUtil.UrlEncode(ParamUtil.get(request, "culture"));
  44. }
  45. int pagesize = 10;
  46. Paginator paginator = new Paginator(request);
  47. int curpage = paginator.getCurPage();
  48. UserInfoDb uid = new UserInfoDb();
  49. ListResult lr = uid.listResult(sql, curpage, pagesize);
  50. int total = lr.getTotal();
  51. Vector v = lr.getResult();
  52.     Iterator ir = null;
  53. if (v!=null)
  54. ir = v.iterator();
  55. paginator.init(total, pagesize);
  56. // 设置当前页数和总页数
  57. int totalpages = paginator.getTotalPages();
  58. if (totalpages==0)
  59. {
  60. curpage = 1;
  61. totalpages = 1;
  62. }
  63. %>
  64.       <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  65.         <tr> 
  66.           <td width="47">&nbsp;</td>
  67.           <td align="right" backgroun="images/title1-back.gif">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=curpage %>/<%=totalpages %></td>
  68.         </tr>
  69.       </table>
  70.   <form name="form1" action="archive_user_add.jsp" method="post">
  71.     <table width="97%" border="0" align="center" cellpadding="2" cellspacing="0" >
  72.           <tr align="center" bgcolor="#C4DAFF">
  73.             <td width="19%" height="24" >姓名</td>
  74.             <td width="15%" bgcolor="#C4DAFF" >性别</td>
  75.             <td width="16%" bgcolor="#C4DAFF" >出生日期</td>
  76.             <td width="14%" >参加工作时间</td>
  77.             <td width="12%" >文化程度</td>
  78.             <td width="24%" >操作</td>
  79.           </tr>
  80.         </table>
  81.     <%
  82.    int i = 0;
  83. while (ir!=null && ir.hasNext()) {
  84. uid = (UserInfoDb)ir.next();
  85. %>
  86.       <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#B6CFC5" bgcolor="#FFFFFF">
  87.         <tr align="center" >
  88.           <td width="19%" height="22"><%=uid.getUserRealName()%></td> 
  89.           <td width="15%"><%=uid.getSex()%></td>
  90.   <td width="16%"><%=DateUtil.format(uid.getBirthday(),"yyyy-MM-dd")%></td>
  91.   <td width="14%"><%=DateUtil.format(uid.getJoinWorkDate(),"yyyy-MM-dd")%></td>
  92.   <td width="12%"><%=uid.getCulture()%></td>
  93.           <td width="12%"><a href="archive_user_modify.jsp?userName=<%=uid.getUserName()%>">编辑</a></td>
  94.   <td width="12%"><a href="archive_user_do.jsp?userName=<%=uid.getUserName()%>&op=del">删除</a></td>
  95.         </tr>
  96.       </table>
  97.       <%}%>  
  98.   </form> 
  99.       <table width="98%" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  100.         <tr> 
  101.           <td width="1%" height="23">&nbsp;</td>
  102.           <td height="23" valign="baseline"> 
  103.             <div align="right">
  104.              <%
  105.    out.print(paginator.getCurPageBlock("?"+querystr));
  106.  %>
  107.             &nbsp;</div></td>
  108.         </tr>
  109.       </table>    </td>
  110.   </tr>
  111. </table>
  112. </body>
  113. </html>