严智鑫
2025-03-14 c41e1c8b82b8f4c7b149e0576c9a37bc5b2dbb85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<%@page import="javax.swing.text.html.HTML"%>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
</head>
 
<style type="text/css">
      #modal-overlay {
      
        position: absolute;
        /* 使用绝对定位或固定定位  */
        left: 0px;
        top: 0px;
        width: 100%;
        height: 100%;
        text-align: center;
        z-index: 1000;
        
        opacity: 0.9;
        /* 背景半透明 */
      }
      /* 模态框样式 */
      
      .modal-data {
        margin: 3rem auto;
        background-color: white;
        /* border: 1px solid #000; */
        padding: 0.3rem;
        text-align: center;
        /* border-radius: 0.5rem; */
       
        width: 36rem;
        height: 18rem;
      position: absolute;
left:450px;
  top: 140px; 
      }
      
      .modal-data .sapnctyle0 {
        text-align: left;
        font-size: 0.4rem;
        display: inline-block;
        width: 90%;
        color: white;
      }
      
      .modal-data .sapnctyle1 {
        text-align: left;
        font-size: 0.4rem;
        display: inline-block;
        width: 9%;
      }
      
      .modal-data .classstyle0 {
        color: red;
        font-size: 0.3rem;
        text-align: left;
        margin-left: 0.24rem;
      }
      
      .modal-data .bottom {
        margin-top: 0.1rem;
      }
      
      .modal-data .trClass {
        width: 100%;
        padding: 0.2rem 0.5rem;
      }
      
      .modal-data .trClass .tdLabel {
        width: 9%;
        display: inline-block;
        text-align: right;
        font-size: 0.4rem;
        
  
      }
      
      .modal-data .trClass .tdInput {
        width: 70%;
        display: inline;
      }
      
      .modal-data .trClass .tdInput .divStyle {
        margin-left: 3.3rem;
      }
      
      .modal-data .trClass .tdInput .inputbox {
        width: 27rem;
              height: 1.7rem;
        font-size: 0.25rem;
        color: #000
      }
      
      .inputbox.change::-webkit-input-placeholder {
        color: red;
      }
      
      .modal-data .trClass .tdCancel {
        width: 20%;
        display: inline;
      }
      
      .modal-data .trClass .tdChoose {
        width: 20%;
        display: inline-block;
        margin-left: 1rem;
      }
      
      .bottomstyle {
        height: 1.95rem;
       width: 4.2rem;
        color: #3b4555;
        font-size: 0.4rem;
        
        
        bottom: 450px;
      }
      
      .lableStyle {
        display: inline-block;
        width: 9rem;
        background-color: #adb9cb;
        margin-top: 0.1rem;
      
        color: #f9f9f8;
      }
      
      .lableCountNumStyle {
        display: inline-block;
        width: 1.65rem;
        background-color: #adb9cb;
        border-radius: 1rem;
        text-align: center;
        color: #f9f9f8;
      }
      </style>
<body style='background-color:#D5EAFF;'>
<%@include file="./xiugaimima1.jsp"%>
 
 
 <div align="center" >
     <img src='../../img/2.ico'; style='top:38px;align:center;position:absolute;left:700px;width:150px; height:100px;' />
     </div>
 
<form   action=""   method="post" >
<div>
        
<!-- <span onclick="overlay()">显示修改密码浮窗</sapn></div> -->
    <div style="width: 100%; height: 100%;">
    <input name="zdygh" value="" style="display:none;">
 
    <input  type="text"  id="ymm" style="display:none;" value="<% out.println(zdygh); %>" >
 
      <div id="modal-overlay">
        <div class="modal-data">
        <span class="sapnctyle1">   </span>
          <span class="sapnctyle1"></span>
          <p style="margin-top:20px;"  align="center" class="classstyle0">
          </p>
          <div  class="bottom">
            <div class="trClass">
              <div class="tdLabel">原密码</div>
              <div class="tdInput">
                <input class="inputbox"  maxlength=15 id="initpw" type="password" οnpaste="return false;" οndragenter="return false;" οncοntextmen="return false"></input>
              </div>
            </div>
            <div class="trClass" style="padding-right: 0rem;">
              <div class="tdLabel" style="width: 13.5%;">新密码</div>
              <div class="tdInput">
                <input id="pw"  maxlength=15 class="inputbox" type="password" placeholder="" ></input><label class="lableCountNumStyle"></label>
               
              </div> 
            </div>
  
            <div class="trClass">
              <div class="tdLabel">确认密码</div>
              <div class="tdInput"><input  maxlength=15 id="repw"  name='mima' class="inputbox" type="password" placeholder="" onKeyUp=""></input>
              </div>
            </div>
             <p  style="margin-left:160px;" class="classstyle0">新密码长度必须是6位或6位以上,不能与原密码相同
          </p>
<p/>
            <div class="trClass">
              <div class="tdChoose">
                <input  style="margin-left:-170px;outline: 0;border: 0; background-color:#5CADFE;" type="submit" class="bottomstyle" name='tj' id='bot'  value='确定' >
                   
                
              </div>
              <div class="tdCancel">
             
                <button   style="margin-right:-40px;outline: 0;border: 0; background-color:#5CADFE;" class="bottomstyle" >取消</button>
              </div>
              
              
            </div>
          </div>
        </div>
        
        
     
      </div>
      
      
      
       </form>
      
<%      
String    id =request.getParameter("adminid");    
String    mid2 =request.getParameter("mima");
      
if(request.getParameter("tj")!=null){
//装载一个类并且对其进行实例化的操作
 
                            Class.forName(driverClass);{
                                Connection con=DriverManager.getConnection( urlglass,user,password);
                                
                                
                                    CallableStatement cs = con.prepareCall("{call mm(?,?,?,?)}");
                                    cs.setString(1, id);
                                    cs.setString(2, mid2);
                                    cs.setString(3, request.getRemoteAddr());
                                    
                                    
                                    cs.registerOutParameter(4 , java.sql.Types.INTEGER);
                                    cs.execute();
                                    int fanhui=cs.getInt(4);
                                    if(fanhui==5000){    
                                        out.print("<script type='text/javascript'>alert('修改成功'); </script>");
                                        
                                    }else{
                                        out.print("<script type='text/javascript'>alert('修改失败');window.history.back(-1); </script>");
                                    }con.close();
                            }                      
}
 
                            
                            %>  
                            
                    
      
      
</body>
 
<script src="../../js/jquery-3.4.1.js"></script>
<script type="text/javascript">
    //html +css 模态框展示关闭事件
    
    
    
    $("#bot").click(function(){
         var password = $("#pw").val();
            var repassword = $("#repw").val();
            var passwordy = $("#ymm").val();
            var passwordr = $("#initpw").val();
            var passwordt = $("#initpw").val();
             
        
         if(password != repassword) {
             alert("确认密码与新密码不一致")
             return false;
              
         }
         if(passwordy == repassword) {
             alert("新密码不能和原来密码一致")
             return false;
             
                
              }
         if(passwordr == '') {
             alert("原密码不能为空")
             return false;
             
                
              }
              
         
 
         if(password == '') {
             alert("新密码不能为空")
             return false;
             
                
              }
         
         if(password.length < 6) {
             alert("新密码不能小于6位")
             return false;
             
                
              }
         
         if(passwordt != passwordy) {
             alert("原密码错误")
             return false;
             
                
              }
    });
    
    
    
    
    
    
    function overlay() {
      var e1 = document.getElementById('modal-overlay');
      e1.style.visibility = (e1.style.visibility == "visible") ? "hidden" : "visible";
      $(".inputbox").val("").removeClass('change').attr("placeholder", ""); //清空输入框//清除自定义placeholde样式//清空placeholde文本
      /*$("#repw").attr("placeholder", "");*/
      $(".lableCountNumStyle").html('0');
      $('#jysz,#jyxyzm,#jydyzm,.lableCountNumStyle').removeAttr("style");
    }
 
    
    window.onload=function()
    {
        $('[name="kehubianma"]').focus();
        var url=window.parent.location.search.substr(1);
        
        var array=url.split("&");
        for(var i=0;i<array.length;i++)
        {
            
            if(array[i].indexOf('adminid')>-1)
            {
                
                const index1=array[i].indexOf('=');
                
                const name=decodeURI(array[i].substring(index1+1));
                
                $('[name="zdygh"]').val(name);
            }
            
        } 
        var index=url.indexOf('yuyan');
        var yuyan=url.substring(index+6);
            
        
          
          
          
         
      
         
            
        
    }
    
    
   
  </script>
</html>