userinfo.jsp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page isELIgnored="false" %>
  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 type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script>
  16. <script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
  17. <script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
  18. <script language="javascript">
  19. function check()
  20. {
  21. var userPwReal="${sessionScope.admin.userpw}";
  22. if(document.formPw.userPw.value !=userPwReal)
  23. {
  24. alert("原密码不正确");
  25. return false;
  26. }
  27. if(document.formPw.userPw1.value =="")
  28. {
  29. alert("新密码不能空");
  30. return ;
  31. }
  32. if(document.formPw.userPw1.value != document.formPw.userPw2.value)
  33. {
  34. alert("两次输入的密码不一致");
  35. return ;
  36. }
  37. document.getElementById("indicator").style.display="block";
  38. loginService.adminPwEdit(document.formPw.userPw1.value,callback);
  39. }
  40. function callback(data)
  41. {
  42. document.getElementById("indicator").style.display="none";
  43. alert("修改成功");
  44. }
  45. </script>
  46. </head>
  47. <body leftmargin="2" topmargin="9" background='<%=path %>/images/allbg.gif'>
  48. <form method="post" action="<%=path %>/userPwEdit.action" name="formPw">
  49. <table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px">
  50. <tr bgcolor="#EEF4EA">
  51. <td colspan="2" background="<%=path %>/images/wbg.gif" class='title'><span>密码修改</span></td>
  52. </tr>
  53. <tr bgcolor="#FFFFFF">
  54. <td width="25%" bgcolor="#FFFFFF" align="right">
  55. 登录名:
  56. </td>
  57. <td width="75%" bgcolor="#FFFFFF">
  58. <input type="text" value="${sessionScope.admin.username }" name="userName" style="width:340px"disabled="disabled"/>
  59. </td>
  60. </tr>
  61. <tr bgcolor="#FFFFFF">
  62. <td width="25%" bgcolor="#FFFFFF" align="right">
  63. 原密码:
  64. </td>
  65. <td width="75%" bgcolor="#FFFFFF">
  66. <input type="password" name="userPw" id="userPw" style="width:340px"/>
  67. </td>
  68. </tr>
  69. <tr bgcolor="#FFFFFF">
  70. <td width="25%" bgcolor="#FFFFFF" align="right">
  71. 新密码:
  72. </td>
  73. <td width="75%" bgcolor="#FFFFFF">
  74. <input type="password" id="userPw1" name="userPw1" style="width:340px"/>
  75. </td>
  76. </tr>
  77. <tr bgcolor="#FFFFFF">
  78. <td width="25%" bgcolor="#FFFFFF" align="right">
  79. 确认密码:
  80. </td>
  81. <td width="75%" bgcolor="#FFFFFF">
  82. <input type="password" name="userPw2" id="userPw2" style="width:340px"/>
  83. </td>
  84. </tr>
  85. <tr bgcolor="#FFFFFF">
  86. <td width="25%" bgcolor="#FFFFFF" align="right">
  87. &nbsp;
  88. </td>
  89. <td width="75%" bgcolor="#FFFFFF">
  90. <input type="button" value="修改" onclick="check()"/>
  91. &nbsp;&nbsp;&nbsp;
  92. <input type="reset" value="重置"/>
  93. <img id="indicator" src="<%=path %>/images/loading32.gif" alt="Loading..." style="display:none"/>
  94. </td>
  95. </tr>
  96. </table>
  97. </form>
  98. </body>
  99. </html>