main.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  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. <link href="<%=basePath %>/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
  9. <jsp:include page="../common/include.jsp" />
  10. <title>淮安市住房保障管理系统</title>
  11. <script type="text/javascript">
  12. $(
  13. function(){
  14. var unlock = function()
  15. {
  16. if ($('#unlockForm').form('validate')) {
  17. var url = whzl.basePath+"/userAction_login";
  18. var params = $('#unlockForm').serialize();
  19. $.post(
  20. url,
  21. params,
  22. function(result){
  23. if(result.success){
  24. location.replace(whzl.basePath + '/mainAction_main');
  25. }
  26. else{
  27. $.messager.alert("提示",result.message);
  28. $('form :input:eq(0)').focus();
  29. }
  30. }
  31. ,
  32. 'json'
  33. );
  34. }
  35. };
  36. var editPwd = function(){
  37. if ($('#editPwdForm').form('validate')) {
  38. var url = whzl.basePath+"/userAction_updatePwd";
  39. var params = $('#editPwdForm').serialize();
  40. $.post(
  41. url
  42. ,
  43. params
  44. ,
  45. function(result){
  46. if(result.success){
  47. $.messager.confirm('提示', result.message, function(r){
  48. if(r){
  49. $('#passwordDialog').dialog('close');
  50. location.replace(whzl.basePath);
  51. }else{
  52. $('#passwordDialog').dialog('close');
  53. }
  54. });
  55. }
  56. else{
  57. $.messager.alert('提示',result.message);
  58. $('form :input:eq(0)').focus();
  59. }
  60. }
  61. ,
  62. 'json'
  63. );
  64. }
  65. };
  66. $('#loginDialog').show().dialog({
  67. modal : true,
  68. closable : false,
  69. iconCls : 'icon-unlock',
  70. buttons : [ {
  71. id : 'loginBtn',
  72. text : '登录',
  73. handler : function() {
  74. unlock();
  75. }
  76. } ],
  77. onOpen : function() {
  78. $('#loginDialog form :input[name="data.password"]').val('');
  79. $('form :input').keyup(function(event) {
  80. if (event.keyCode == 13) {
  81. unlock();
  82. }
  83. });
  84. }
  85. }).dialog('close');
  86. $('#passwordDialog').show().dialog({
  87. modal : true,
  88. closable : true,
  89. iconCls : 'icon-useredit',
  90. buttons : [ {
  91. text : '修改',
  92. handler : function() {
  93. editPwd();
  94. }
  95. } ],
  96. onOpen : function() {
  97. $('#passwordDialog form :input').val('');
  98. $('form :input').keyup(function(event) {
  99. if (event.keyCode == 13) {
  100. editPwd();
  101. }
  102. });
  103. }
  104. }).dialog('close');
  105. }
  106. );
  107. function closePro(){
  108. parent.$.messager.progress('close');
  109. }
  110. </script>
  111. </head>
  112. <body class="easyui-layout">
  113. <div id="layout_north" data-options="region:'north',border:false,href:'mainAction_north'" style="height:60px;padding:10px;background-color: #1369d8;"></div>
  114. <div data-options="region:'west',title:'功能导航',href:'mainAction_west'" style="width: 200px;overflow: hidden;">
  115. </div>
  116. <div data-options="region:'center',href:'mainAction_center'">
  117. </div>
  118. <div data-options="region:'south',border:true,split:true" style="height:30px;padding:5px; text-align: center;overflow:hidden; ">
  119. 版权所有:淮安市保障性住房建设管理中心&nbsp;&nbsp;&nbsp;&nbsp;技术支持:江苏物合智联科技有限公司
  120. </div>
  121. <div id="loginDialog" style="display: none;" title="&nbsp;解除锁定">
  122. <form id="unlockForm" method="post" class="myform" onsubmit="return false;">
  123. <table class="mytable">
  124. <tr>
  125. <th width="50">用户</th>
  126. <td>${user.name}<input name="user.name" readonly="readonly" type="hidden" value="${user.name}" /></td>
  127. </tr>
  128. <tr>
  129. <th>密码</th>
  130. <td><input name="user.password" type="password" class="easyui-validatebox" data-options="required:true,missingMessage:'请输入您的密码!'" /></td>
  131. </tr>
  132. </table>
  133. </form>
  134. </div>
  135. <div id="passwordDialog" title="&nbsp;修改密码" style="display: none;">
  136. <form id="editPwdForm" method="post" class="myform" onsubmit="return false;">
  137. <table class="mytable">
  138. <tr>
  139. <th width="60">当前密码</th>
  140. <td>
  141. <input id="currentPwd" name="currentPwd" type="password" class="easyui-validatebox" data-options="required:true,missingMessage:'请输入当前密码!'" />
  142. </td>
  143. </tr>
  144. <tr>
  145. <th>新密码</th>
  146. <td><input id="pwd" name="password" type="password" class="easyui-validatebox" data-options="required:true,missingMessage:'请输入新密码!'" /></td>
  147. </tr>
  148. <tr>
  149. <th>确认密码</th>
  150. <td><input type="password" class="easyui-validatebox" data-options="required:true,missingMessage:'请输入确认密码!',validType:'equals[\'#pwd\']'" /></td>
  151. </tr>
  152. </table>
  153. </form>
  154. </div>
  155. </body>
  156. </html>