<%@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>
|