adminManage.jsp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <%@ page language="java" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%
  4. String path = request.getContextPath();
  5. %>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="pragma" content="no-cache" />
  10. <meta http-equiv="cache-control" content="no-cache" />
  11. <meta http-equiv="expires" content="0" />
  12. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
  13. <meta http-equiv="description" content="This is my page" />
  14. <link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
  15. <script language="javascript">
  16. function adminDel(userId)
  17. {
  18. if(confirm('您确定删除吗?'))
  19. {
  20. window.location.href="<%=path %>/adminDel.action?userId="+userId;
  21. }
  22. }
  23. function adminAdd()
  24. {
  25. var url="<%=path %>/admin/index/adminAdd.jsp";
  26. //var n="";
  27. //var w="480px";
  28. //var h="500px";
  29. //var s="resizable:no;help:no;status:no;scroll:yes";
  30. //openWin(url,n,w,h,s);
  31. window.location.href=url;
  32. }
  33. </script>
  34. </head>
  35. <body leftmargin="2" topmargin="2" background='<%=path %>/images/allbg.gif'>
  36. <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
  37. <tr bgcolor="#E7E7E7">
  38. <td height="14" colspan="4" background="<%=path %>/images/tbg.gif">&nbsp;管理员维护&nbsp;</td>
  39. </tr>
  40. <tr align="center" bgcolor="#FAFAF1" height="22">
  41. <td width="80px">ID</td>
  42. <td >用户名</td>
  43. <td >密码</td>
  44. <td width="200px">操作</td>
  45. </tr>
  46. <c:forEach items="${adminList}" var="admin1">
  47. <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
  48. <td bgcolor="#FFFFFF" align="center">
  49. ${admin1.userid}
  50. </td>
  51. <td bgcolor="#FFFFFF" align="center">
  52. ${admin1.username}
  53. </td>
  54. <td bgcolor="#FFFFFF" align="center">
  55. ${admin1.userpw}
  56. </td>
  57. <td bgcolor="#FFFFFF" align="center">
  58. <c:if test="${admin1.username!='admin'}">
  59. <a href="#" onclick="adminDel(${admin1.userid})" class="red">删除</a>
  60. </c:if>
  61. </td>
  62. </tr>
  63. </c:forEach>
  64. </table>
  65. <table width='98%' border='0'style="margin-top:8px;margin-left: 5px;">
  66. <tr>
  67. <td>
  68. <input type="button" value="添加" style="width: 80px;" onclick="adminAdd()" />
  69. </td>
  70. </tr>
  71. </table>
  72. </body>
  73. </html>