UserList.jsp
上传用户:sxychgz
上传日期:2019-04-21
资源大小:4772k
文件大小:11k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
  2. <%@ page import="com.bjsxt.shopping.user.*"%>
  3. <%
  4. final int PAGE_SIZE = 2; //每页显示多少条记录
  5. final int PAGES_PER_TIME = 10;//每次显示多少个页码链接
  6. int pageNo = 1;
  7. String strPageNo = request.getParameter("pageNo");
  8. if (strPageNo != null && !strPageNo.trim().equals("")) {
  9. try {
  10. pageNo = Integer.parseInt(strPageNo);
  11. } catch (NumberFormatException e) {
  12. pageNo = 1;
  13. }
  14. }
  15. if (pageNo <= 0)
  16. pageNo = 1;
  17. %>
  18. <%
  19. List<User> users = new ArrayList<User>();
  20. int totalRecords = User.getUsers(users, pageNo, PAGE_SIZE);
  21. int totalPages = (totalRecords + PAGE_SIZE - 1) / PAGE_SIZE;
  22. if (pageNo > totalPages)
  23. pageNo = totalPages;
  24. %>
  25. <html>
  26. <head>
  27. <title>会员列表</title>
  28. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  29. <meta name="keywords"
  30. content="Discuz!,Board,Comsenz,forums,bulletin board,">
  31. <meta name="description" content="金尚商城会员列表">
  32. <meta name="generator" content="Discuz! 4.0.0RC4 with Templates 4.0.0">
  33. <meta name="MSSmartTagsPreventParsing" content="TRUE">
  34. <meta http-equiv="MSThemeCompatible" content="Yes">
  35. <style type="text/css"><!--
  36. a { text-decoration: none; color: #000000 }
  37. a:hover { text-decoration: underline }
  38. body { scrollbar-base-color: #F3F6FA; scrollbar-arrow-color: #4D76B3; font-size: 12px; background-color: #ffffff }
  39. table { font: 12px Verdana,Tahoma; color: #000000 }
  40. input,select,textarea { font: 11px Verdana,Tahoma; color: #000000; font-weight: normal; background-color: #F3F6FA }
  41. select { font: 11px Verdana,Tahoma; color: #000000; font-weight: normal; background-color: #F3F6FA }
  42. .nav { font: 12px Verdana,Tahoma; color: #000000; font-weight: bold }
  43. .nav a { color: #000000 }
  44. .header { font: 11px Verdana,Tahoma; color: #000000; font-weight: bold; background-image: url("images/green/bg01.gif") }
  45. .header a { color: #FFFFFF }
  46. .category { font: 11px Verdana,Tahoma; color: #000000; background-color: #EFEFEF }
  47. .tableborder { background: #4D76B3; border: 0px solid #4D76B3 } 
  48. .singleborder { font-size: 0px; line-height: 0px; padding: 0px; background-color: #F3F6FA }
  49. .smalltxt { font: 11px Verdana,Tahoma }
  50. .outertxt { font: 12px Verdana,Tahoma; color: #000000 }
  51. .outertxt a { color: #000000 }
  52. .bold { font-weight: bold }
  53. .altbg1 { background: #F3F6FA }
  54. .altbg2 { background: #FFFFFF }
  55. --></style>
  56. <script language="JavaScript" src="images/common.js"></script>
  57. <style type="text/css" id="defaultPopStyle">.cPopText { font-family: Tahoma, Verdana; background-color: #FFFFCC; border: 1px #000000 solid; font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=80)}</style>
  58. </head>
  59. <body leftmargin="0" rightmargin="0" topmargin="0"
  60. onkeydown="if(event.keyCode==27) return false;">
  61. <div id="popLayer" style="position: absolute; z-index: 1000;"
  62. class="cPopText"></div>
  63. <table style="table-layout: fixed;" align="center" border="0"
  64. cellpadding="0" cellspacing="0" width="97%">
  65. <tbody>
  66. <tr>
  67. <td class="nav" align="left" nowrap="nowrap" width="90%">
  68. &nbsp;用户管理 &#187; 会员列表
  69. </td>
  70. <td align="right" width="10%">
  71. &nbsp;
  72. <a href="#bottom"><img src="../images/arrow_dw.gif"
  73. align="absmiddle" border="0">
  74. </a>
  75. </td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. <br>
  80. <table align="center" border="0" cellpadding="0" cellspacing="0"
  81. width="97%">
  82. <tbody>
  83. <tr>
  84. <td>
  85. <table border="0" cellpadding="0" cellspacing="0">
  86. <tbody>
  87. <tr>
  88. <td height="3"></td>
  89. </tr>
  90. <tr>
  91. <td>
  92. <table class="tableborder" cellpadding="2" cellspacing="1">
  93. <tbody>
  94. <tr class="smalltxt" bgcolor="#f3f6fa">
  95. <td class="header">
  96. &nbsp;<%=totalRecords %>&nbsp;
  97. </td>
  98. <td class="header">
  99. &nbsp;<%=pageNo %>/<%=totalPages %>&nbsp;
  100. </td>
  101. <%
  102. int start = ((pageNo - 1) / PAGES_PER_TIME) * PAGES_PER_TIME + 1;
  103. for(int i=start; i<start+PAGES_PER_TIME; i++) {
  104. if(i > totalPages) break;
  105. if(pageNo == i) {
  106.  %>
  107. <td bgcolor="#ffffff">&nbsp;<u><b><%=i %></b></u>&nbsp;</td>
  108. <%
  109. } else {
  110.  %>
  111. <td>&nbsp;
  112. <a href="UserList.jsp?pageNo=<%=i%>"><%=i%></a>&nbsp;
  113. </td>
  114. <%
  115. }
  116. }
  117.  %>
  118. <td>
  119. &nbsp;
  120. <a href="UserList.jsp?pageNo=<%=pageNo+1%>">&gt;</a>&nbsp;
  121. </td>
  122. <td>
  123. &nbsp;
  124. <a
  125. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=100">&gt;<b>|</b>
  126. </a>&nbsp;
  127. </td>
  128. <td style="padding: 0pt;">
  129. <input name="custompage" size="2"
  130. style="border: 1px solid rgb(77, 118, 179);"
  131. onKeyDown="javascript: if(window.event.keyCode == 13) window.location='member.php?action=list&srchmem=&order=&admins=&page='+this.value;"
  132. type="text">
  133. </td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. </td>
  138. </tr>
  139. <tr>
  140. <td height="3"></td>
  141. </tr>
  142. </tbody>
  143. </table>
  144. </td>
  145. </tr>
  146. </tbody>
  147. </table>
  148. <input name="formhash" value="93a2a31f" type="hidden">
  149. <table class="tableborder" align="center" cellpadding="4"
  150. cellspacing="1" width="97%">
  151. <tbody>
  152. <tr class="header">
  153. <td align="center" width="9%">
  154. 用户名
  155. </td>
  156. <td align="center" width="6%">
  157. UID
  158. </td>
  159. <td align="center" width="16%">
  160. 联系电话
  161. </td>
  162. <td align="center" width="20%">
  163. 注册时间
  164. </td>
  165. <td align="center" width="20%">
  166. 送货地址
  167. </td>
  168. <td align="center">
  169. 处理
  170. </td>
  171. </tr>
  172. <%
  173. for (int i = 0; i < users.size(); i++) {
  174. User u = users.get(i);
  175. %>
  176. <tr>
  177. <td class="altbg1" align="center" nowrap="nowrap">
  178. <%=u.getUsername()%>
  179. </td>
  180. <td class="altbg2" align="center">
  181. <%=u.getId()%>
  182. </td>
  183. <td class="altbg1" align="center">
  184. <%=u.getPhone()%>
  185. </td>
  186. <td class="altbg1" align="center">
  187. <%=new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
  188. .format(u.getRdate())%>
  189. </td>
  190. <td class="altbg1" align="center">
  191. <%=u.getAddr()%>
  192. </td>
  193. <td class="altbg1" align="right">
  194. <% String url = request.getRequestURL() + (request.getQueryString() == null ? "" : "?" + request.getQueryString()); %>
  195. <a target="detail" href="UserDelete.jsp?id=<%=u.getId()%>&from=<%=url%>" onclick="return confirm('真的要删除?')">删除</a>
  196. </td>
  197. </tr>
  198. <%
  199. }
  200. %>
  201. <form method="post" action="member.php?action=list"></form>
  202. <tr>
  203. <td colspan="5" class="altbg2">
  204. 搜索
  205. <input size="15" name="srchmem" type="text">
  206. <input value="提 &nbsp; 交" type="submit">
  207. &nbsp; &nbsp;
  208. <span class="bold">或</span> &nbsp; 排序方式:
  209. <a
  210. href="http://bbs.allsmart.com/member.php?action=list&amp;order=credits">积分</a>
  211. -
  212. <a
  213. href="http://bbs.allsmart.com/member.php?action=list&amp;order=username">用户名</a>
  214. -
  215. <a
  216. href="http://bbs.allsmart.com/member.php?action=list&amp;order=gender">性别</a>
  217. -
  218. <a
  219. href="http://bbs.allsmart.com/member.php?action=list&amp;order=regdate">注册日期</a>
  220. -
  221. <a
  222. href="http://bbs.allsmart.com/member.php?action=list&amp;admins=yes">管理头衔</a>
  223. </td>
  224. </tr>
  225. </tbody>
  226. </table>
  227. <table align="center" border="0" cellpadding="0" cellspacing="0"
  228. width="97%">
  229. <tbody>
  230. <tr>
  231. <td>
  232. <table border="0" cellpadding="0" cellspacing="0">
  233. <tbody>
  234. <tr>
  235. <td height="3"></td>
  236. </tr>
  237. <tr>
  238. <td>
  239. <table class="tableborder" cellpadding="2" cellspacing="1">
  240. <tbody>
  241. <tr class="smalltxt" bgcolor="#f3f6fa">
  242. <td class="header">
  243. &nbsp;46292&nbsp;
  244. </td>
  245. <td class="header">
  246. &nbsp;1/1852&nbsp;
  247. </td>
  248. <td bgcolor="#ffffff">
  249. &nbsp;
  250. <u><b>1</b>
  251. </u>&nbsp;
  252. </td>
  253. <td>
  254. &nbsp;
  255. <a
  256. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=6">6</a>&nbsp;
  257. </td>
  258. <td>
  259. &nbsp;
  260. <a
  261. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=7">7</a>&nbsp;
  262. </td>
  263. <td>
  264. &nbsp;
  265. <a
  266. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=8">8</a>&nbsp;
  267. </td>
  268. <td>
  269. &nbsp;
  270. <a
  271. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=9">9</a>&nbsp;
  272. </td>
  273. <td>
  274. &nbsp;
  275. <a
  276. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=10">10</a>&nbsp;
  277. </td>
  278. <td>
  279. &nbsp;
  280. <a
  281. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=2">&gt;</a>&nbsp;
  282. </td>
  283. <td>
  284. &nbsp;
  285. <a
  286. href="http://bbs.allsmart.com/member.php?action=list&amp;srchmem=&amp;order=&amp;admins=&amp;page=100">&gt;<b>|</b>
  287. </a>&nbsp;
  288. </td>
  289. <td style="padding: 0pt;">
  290. <input name="custompage" size="2"
  291. style="border: 1px solid rgb(77, 118, 179);"
  292. onKeyDown="javascript: if(window.event.keyCode == 13) window.location='member.php?action=list&srchmem=&order=&admins=&page='+this.value;"
  293. type="text">
  294. </td>
  295. </tr>
  296. </tbody>
  297. </table>
  298. </td>
  299. </tr>
  300. <tr>
  301. <td height="3"></td>
  302. </tr>
  303. </tbody>
  304. </table>
  305. </td>
  306. </tr>
  307. </tbody>
  308. </table>
  309. <a name="bottom" />
  310. </body>
  311. </html>