admin2.jsp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <title>后台</title>
  9. <script type="text/javascript" src="js/jquery.js"></script>
  10. <link rel="stylesheet" href="css/add.css" type="text/css" media="screen" />
  11. <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" media="screen" />
  12. </head>
  13. <body>
  14. <div class="table-responsive">
  15. <table class="table table-bordered">
  16. <caption>账号管理</caption>
  17. <thead>
  18. <tr>
  19. <th>编号</th>
  20. <th>账号</th>
  21. <th>密码</th>
  22. <th>邮箱</th>
  23. <th>权限</th>
  24. <th>操作</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <c:forEach items="${listuser}" var="a" varStatus="status">
  29. <tr class="
  30. <c:if test="${status.index%1==0}">active</c:if>
  31. <c:if test="${status.index%2==0}">success</c:if>
  32. <c:if test="${status.index%3==0}">warning</c:if>
  33. <c:if test="${status.index%4==0}">danger</c:if>
  34. ">
  35. <td>${a.id}</td>
  36. <td>${a.name}</td>
  37. <td>${a.pwd}</td>
  38. <td>${a.email}</td>
  39. <td>
  40. <c:if test="${a.state==0}">管理员</c:if>
  41. <c:if test="${a.state==1}">普通用户</c:if>
  42. </td>
  43. <td>
  44. <form action="user?type=5" method="post" id="delform">
  45. <input type="hidden" value="${a.id}" name="id" >
  46. <c:if test="${user.state==0}">
  47. <a href="javascript:$('#delform').submit();">删除</a>
  48. <a href="javascript:location.href='user?type=7&id=${a.id}';">修改</a>
  49. </c:if>
  50. <c:if test="${user.state==1 && user.id==a.id}">
  51. <a href="javascript:location.href='user?type=7&id=${a.id}';">修改</a>
  52. </c:if>
  53. </form>
  54. </td>
  55. </tr>
  56. </c:forEach>
  57. </tbody>
  58. </table>
  59. </div>
  60. </body>
  61. </html>