archive_family_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. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>人事档案管理</title>
  12. <link href="../common.css" rel="stylesheet" type="text/css">
  13. <%@ include file="../inc/nocache.jsp"%>
  14. <style type="text/css">
  15. <!--
  16. .STYLE2 {color: #0033FF}
  17. .STYLE3 {color: #FF0000}
  18. -->
  19. </style>
  20. </head>
  21. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  22. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  23. <jsp:useBean id="archivePrivilege" scope="page" class="com.redmoon.oa.archive.ArchivePrivilege"/>
  24. <% 
  25. String userName = ParamUtil.get(request,"userName");
  26. if (!privilege.isUserPrivValid(request, "archive.family")||!archivePrivilege.canAdminUser(request,userName)) {
  27. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  28. return;
  29. }
  30. %>
  31. <%@ include file="archive_inc_menu_top.jsp"%>
  32. <br>
  33. <table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main">
  34.   <tr> 
  35.     <td width="840" height="23" valign="middle" class="right-title"><span>&nbsp;家庭信息管理</span></td>
  36.   </tr>
  37.   <tr> 
  38.     <td valign="top" background="images/tab-b-back.gif">
  39. <%
  40. String sql = "";
  41. if(userName.equals("")){
  42.     sql = ArchiveSQLBuilder.getUserFamily();
  43. }else{
  44.     sql = ArchiveSQLBuilder.getUserFamily(userName);
  45. }
  46. String querystr = "";
  47. int pagesize = 10;
  48. Paginator paginator = new Paginator(request);
  49. int curpage = paginator.getCurPage();
  50. UserFamilyDb ufd = new UserFamilyDb();
  51. ListResult lr = ufd.listResult(sql, curpage, pagesize);
  52. int total = lr.getTotal();
  53. Vector v = lr.getResult();
  54.     Iterator ir = null;
  55. if (v!=null)
  56. ir = v.iterator();
  57. paginator.init(total, pagesize);
  58. // 设置当前页数和总页数
  59. int totalpages = paginator.getTotalPages();
  60. if (totalpages==0)
  61. {
  62. curpage = 1;
  63. totalpages = 1;
  64. }
  65. %>
  66.       <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  67.         <tr> 
  68.           <td width="47">&nbsp;</td>
  69.           <td align="right" backgroun="images/title1-back.gif">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=curpage %>/<%=totalpages %></td>
  70.         </tr>
  71.       </table>
  72.   <form name="form1" action="archive_family_add.jsp" method="post">
  73.     <table width="97%" border="0" align="center" cellpadding="2" cellspacing="0" >
  74.           <tr align="center" bgcolor="#C4DAFF">
  75.             <td width="19%" height="24" >称谓</td>
  76.             <td width="15%" bgcolor="#C4DAFF" >成员姓名</td>
  77.             <td width="16%" bgcolor="#C4DAFF" >出生日期</td>
  78.             <td width="14%" >政治面貌</td>
  79.             <td width="12%" >联系电话</td>
  80.             <td width="24%" >操作</td>
  81.           </tr>
  82.         </table>
  83.     <%
  84.    int i = 0;
  85. while (ir!=null && ir.hasNext()) {
  86. ufd = (UserFamilyDb)ir.next();
  87. %>
  88.       <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#B6CFC5" bgcolor="#FFFFFF">
  89.         <tr align="center" >
  90.           <td width="19%" height="22"><%=ufd.getAppellation()%></td> 
  91.           <td width="15%"><%=ufd.getName()%></td>
  92.   <td width="16%"><%=DateUtil.format(ufd.getBirthday(),"yyyy-MM-dd")%></td>
  93.   <td width="14%"><%=ufd.getPolitic()%></td>
  94.   <td width="12%"><%=ufd.getPhone()%></td>
  95.           <td width="12%"><a href="archive_family_modify.jsp?id=<%=ufd.getId()%>&userName=<%=StrUtil.UrlEncode(userName)%>">编辑</a></td>
  96.   <td width="12%"><a href="archive_family_do.jsp?id=<%=ufd.getId()%>&op=del&userName=<%=StrUtil.UrlEncode(userName)%>">删除</a></td>
  97.         </tr>
  98.       </table>
  99.       <%}%>
  100.   <input type="hidden" name="userName" value="<%=userName%>"> 
  101.   </form>  
  102.       <table width="98%" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  103.         <tr> 
  104.           <td width="1%" height="23">&nbsp;</td>
  105.           <td height="23" valign="baseline"> 
  106.             <div align="right">
  107.              <%
  108.    out.print(paginator.getCurPageBlock("?"+querystr));
  109.  %>
  110.             &nbsp;</div></td>
  111.         </tr>
  112.       </table>    </td>
  113.   </tr>
  114.   <tr> 
  115.     <td height="30" colspan="2" align="center">
  116.       <input name="button" type="submit" class="button1"  value="添加家庭信息" onClick="form1.submit()">
  117.     </td>
  118.   </tr>
  119. </table>
  120. </body>
  121. </html>