select.jsp 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <%@ page language="java" pageEncoding="UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <HTML>
  4. <HEAD>
  5. <meta http-equiv="Content-Language" content="zh-cn">
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <link href="${pageContext.request.contextPath}/css/Style.css" rel="stylesheet" type="text/css" />
  8. <script language="javascript" src="${pageContext.request.contextPath}/js/public.js"></script>
  9. <script type="text/javascript" src="${pageContext.request.contextPath}/jquery/jquery-1.4.2.js"></script>
  10. <script type="text/javascript">
  11. function addUser(){
  12. window.location.href = "${pageContext.request.contextPath}/user/add.jsp";
  13. }
  14. function deletePerson(pid) {
  15. var flag = window.confirm("是否删除?");
  16. if(flag) {
  17. location.href="${pageContext.request.contextPath}/person?method=delete&pid="+pid;
  18. }
  19. }
  20. $(function() {
  21. //获取所有option
  22. $("#education1 option[value='${pageBean.education}']").attr("selected","selected");
  23. })
  24. $(function() {
  25. //获取所有option
  26. $("#gender option[value='${pageBean.gender}']").attr("selected","selected");
  27. })
  28. $(function() {
  29. //获取所有option
  30. $("#resume option[value='${pageBean.resume}']").attr("selected","selected");
  31. })
  32. </script>
  33. </HEAD>
  34. <body>
  35. <br>
  36. <form id="Form1" name="Form1" action="${pageContext.request.contextPath}/person?method=selectPerson&currentPage=1" method="post">
  37. <table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#f5fafe" border="0">
  38. <TBODY>
  39. <tr>
  40. <td class="ta_01" align="center" bgColor="#afd1f3">
  41. <strong>查 询 条 件</strong>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td>
  46. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  47. <tr>
  48. <td height="22" align="center" bgColor="#f5fafe" class="ta_01">
  49. 用户姓名
  50. </td>
  51. <td class="ta_01" bgColor="#ffffff">
  52. <input type="text" name="realname" size="15" value="${pageBean.realname }" id="Form1_userName" class="bg"/>
  53. </td>
  54. <td height="22" align="center" bgColor="#f5fafe" class="ta_01">
  55. 性别:
  56. </td>
  57. <td class="ta_01" bgColor="#ffffff">
  58. <select name="gender" id="gender">
  59. <option value="">--选择性别--</option>
  60. <option value="男">男</option>
  61. <option value="女">女</option>
  62. </select>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td height="22" align="center" bgColor="#f5fafe" class="ta_01">
  67. 学历:
  68. </td>
  69. <td class="ta_01" bgColor="#ffffff">
  70. <select name="education" id="education1">
  71. <option value="">--选择学历--</option>
  72. <option value="博士">博士</option>
  73. <option value="硕士">硕士</option>
  74. <option value="研究生">研究生</option>
  75. <option value="本科">本科</option>
  76. <option value="专科">专科</option>
  77. <option value="高中">高中</option>
  78. </select>
  79. </td>
  80. <td height="22" align="center" bgColor="#f5fafe" class="ta_01">
  81. 是否上传简历
  82. </td>
  83. <td class="ta_01" bgColor="#ffffff">
  84. <select name="resume" id="resume">
  85. <option value="">--请选择--</option>
  86. <option value="1">有</option>
  87. <option value="2">无</option>
  88. </select>
  89. </td>
  90. </tr>
  91. <tr>
  92. <td width="100" height="22" align="center" bgColor="#f5fafe"
  93. class="ta_01">
  94. </td>
  95. <td class="ta_01" bgColor="#ffffff">
  96. <font face="宋体" color="red"> &nbsp;</font>
  97. </td>
  98. <td align="right" bgColor="#ffffff" class="ta_01"><br><br></td>
  99. <td align="right" bgColor="#ffffff" class="ta_01">
  100. <button type="submit" id="search" name="search" value="&#26597;&#35810;" class="button_view">
  101. &#26597;&#35810;
  102. </button>
  103. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  104. <input type="reset" name="reset" value="&#37325;&#32622;" class="button_view"/>
  105. </td>
  106. </tr>
  107. </table>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td class="ta_01" align="center" bgColor="#afd1f3">
  112. <strong>人员 列 表</strong>
  113. </TD>
  114. </tr>
  115. <tr>
  116. <td class="ta_01" align="right">
  117. <button type="button" id="add" name="add" value="&#28155;&#21152;" class="button_add" onclick="addUser()">
  118. &#28155;&#21152;
  119. </button>
  120. </td>
  121. </tr>
  122. <tr>
  123. <td class="ta_01" align="center" bgColor="#f5fafe">
  124. <table cellspacing="0" cellpadding="1" rules="all"
  125. bordercolor="gray" border="1" id="DataGrid1"
  126. style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 100%; WORD-BREAK: break-all; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #f5fafe; WORD-WRAP: break-word">
  127. <tr
  128. style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 25px; BACKGROUND-COLOR: #afd1f3">
  129. <td align="center" width="18%">
  130. 登录名
  131. </td>
  132. <td align="center" width="17%">
  133. 用户姓名
  134. </td>
  135. <td align="center" width="8%">
  136. 性别
  137. </td>
  138. <td align="center" width="23%">
  139. 联系电话
  140. </td>
  141. <td width="11%" align="center">
  142. 学历
  143. </td>
  144. <td width="7%" align="center">
  145. 编辑
  146. </td>
  147. <td width="7%" align="center">
  148. 查看
  149. </td>
  150. <td width="7%" align="center">
  151. 删除
  152. </td>
  153. </tr>
  154. <c:forEach items="${pageBean.list }" var="p">
  155. <tr onmouseover="this.style.backgroundColor = 'white'"
  156. onmouseout="this.style.backgroundColor = '#F5FAFE';">
  157. <td style="CURSOR: hand; HEIGHT: 22px" align="center"
  158. width="18%">
  159. ${p.username }
  160. </td>
  161. <td style="CURSOR: hand; HEIGHT: 22px" align="center"
  162. width="17%">
  163. ${p.realname }
  164. </td>
  165. <td style="CURSOR: hand; HEIGHT: 22px" align="center"
  166. width="8%">
  167. ${p.gender }
  168. </td>
  169. <td style="CURSOR: hand; HEIGHT: 22px" align="center"
  170. width="23%">
  171. ${p.phone }
  172. </td>
  173. <td style="CURSOR: hand; HEIGHT: 22px" align="center">
  174. ${p.education }
  175. </td>
  176. <td align="center" style="HEIGHT: 22px">
  177. <a href="${pageContext.request.contextPath}/person?method=toUpdatePage&pid=${p.pid }">
  178. <img src="${pageContext.request.contextPath}/images/i_edit.gif" border="0" style="CURSOR: hand">
  179. </a>
  180. </td>
  181. <td align="center" style="HEIGHT: 22px">
  182. <a href="${pageContext.request.contextPath}/person?method=viewPerson&pid=${p.pid}">
  183. <img src="${pageContext.request.contextPath}/images/button_view.gif" border="0" style="CURSOR: hand">
  184. </a>
  185. </td>
  186. <td align="center" style="HEIGHT: 22px">
  187. <a href="#" onclick="deletePerson('${p.pid}');">
  188. <img src="${pageContext.request.contextPath}/images/i_del.gif" width="16" height="16" border="0" style="CURSOR: hand">
  189. </a>
  190. </td>
  191. </tr>
  192. </c:forEach>
  193. </table>
  194. <span>
  195. 当前 ${pageBean.currentPage} 页/ ${pageBean.totalPage}页,共 ${pageBean.totalCount}记录
  196. &nbsp;
  197. <a href="${pageContext.request.contextPath}/person?method=selectPerson&currentPage=1&realname=${pageBean.realname}&education=${pageBean.education}&gender=${pageBean.gender}&resume=${pageBean.resume}">首页</a>
  198. <c:if test="${pageBean.currentPage!=1 }">
  199. <a href="${pageContext.request.contextPath}/person?method=selectPerson&currentPage=${pageBean.currentPage-1}&realname=${pageBean.realname}&education=${pageBean.education}&gender=${pageBean.gender}&resume=${pageBean.resume}">上一页</a>
  200. </c:if>
  201. <c:if test="${pageBean.currentPage!=pageBean.totalPage }">
  202. <a href="${pageContext.request.contextPath}/person?method=selectPerson&currentPage=${pageBean.currentPage+1}&realname=${pageBean.realname}&education=${pageBean.education}&gender=${pageBean.gender}&resume=${pageBean.resume}">下一页</a>
  203. </c:if>
  204. <a href="${pageContext.request.contextPath}/person?method=selectPerson&currentPage=${pageBean.totalPage}&realname=${pageBean.realname}&education=${pageBean.education}&gender=${pageBean.gender}&resume=${pageBean.resume}">尾页</a>
  205. </span>
  206. </td>
  207. </tr>
  208. </TBODY>
  209. </table>
  210. </form>
  211. </body>
  212. </HTML>