📄 mm_sg.asp
字号:
<!-- #include file="../manager/function/conn.asp" -->
<!--#include file="../../config.asp"-->
<%if request("action")="save" then
user=session("mem_name")
if user = "" then
response.write "<script>alert('您还没有登陆');history.go(-1);</Script>"
end if
passa=request("OldPwd")
pass=request("Pwd")
pass1=request("Pwd2")
if pass<>pass1 then
response.write "<script>alert('新密码与确认密码不正确,请重新输入');history.go(-1);</Script>"
Response.End
end if
set rs=server.createobject("adodb.recordset")
sql="select * from tmember where Mem_LoginName='"&user&"'"
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
if passa<>rs("Mem_LoginPasd") then
response.write "<script>alert('原始密码有误,请重新输入');history.go(-1);</Script>"
Response.End
else
rs("Mem_LoginPasd")=pass
rs.update
rs.close
set rs=nothing
response.write "<script>alert('密码修改成功');history.go(-1);</Script>"
Response.End
end if
else
response.write "<script>alert('用户不存在,请重新输入');history.go(-1);</Script>"
Response.End
end if
end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=ZXLCompanyStr%></title>
<link rel="stylesheet" type="text/css" href="../../system_manage/style/comm.css" />
<link rel="stylesheet" type="text/css" href="../../system_manage/style/skin0.css" />
<style type="text/css">
<!--
.addr_line {font:bold 14px Verdana;padding:10px 0 3px 5px;margin-top:22px}
.addr_line_top {margin-top:10px}
.addr_line1 {font:bold 14px Verdana;padding:10px 0 3px 5px;margin-top:22px}
-->
</style>
<SCRIPT language=JavaScript>
<!--//
function pwdform_onsubmit() {
var r1
r1 = new RegExp("[^A-Za-z0-9]", "");
if (document.pwdform.OldPwd.value.length == 0) {
window.alert("修改密码不能为空!!");
document.pwdform.OldPwd.focus();
}
else if (document.pwdform.Pwd.value.length < 4) {
window.alert("密码不得少于4个字符!!");
document.pwdform.Pwd.select();
document.pwdform.Pwd.focus();
}
else if (document.pwdform.Pwd.value.search(r1)>=0) {
window.alert("密码中有非法字符!!");
document.pwdform.Pwd.select();
document.pwdform.Pwd.focus();
}
else if (document.pwdform.Pwd2.value != document.pwdform.Pwd.value) {
window.alert("两次输入的密码不一致!!");
document.pwdform.Pwd2.select();
document.pwdform.Pwd2.focus();
}
else {
return true;
}
return false;
}
//-->
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<FORM action="mm_sg.asp?action=save" method="post" name="pwdform"
onsubmit="return pwdform_onsubmit();">
<table width="98%" border="0" cellspacing="0" cellpadding="12" align="center">
<tr>
<td colspan="2" style="padding:0;"><div class="addr_line addr_line_top">更改登陆密码</div></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="0" class="settingtable">
<tr class="normal black" >
<td width="211" style="text-align:right;">原密码:</td>
<td width="748"><input name="OldPwd" type="password" class="txt" id="OldPwd" size="28" maxlength="20" /></td>
</tr>
<tr class="normal black" >
<td style="text-align:right;"><font color="#FF0000"> </font>新密码:</td>
<td><input name="Pwd" type="password" class="txt" id="Pwd" size="28" maxlength="20" /></td>
</tr>
<tr class="normal black" >
<td style="text-align:right;"><font color="#FF0000"> </font>再次输入密码:</td>
<td><input name="Pwd2" type="password" class="txt" id="Pwd2" size="28" maxlength="20" /></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="0" class="toolbg">
<tr>
<td nowrap class="barspace toolbgline"><input name=btnSubmit class=btn type=submit value=" 确认修改 ">
</td>
</tr>
</table>
</FORM>
</body>
</html>
<%call conn_close()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -