📄 domodifypwd.asp
字号:
<!--#include file="..\inc\conn.asp"-->
<!--#include file="..\inc\SessionCheck.asp"-->
<link rel="stylesheet" href="..\inc\style.css" type="text/css">
<%
Call DBConnBegin()
dim id,oldpwd,newpwd1,newpwd2
id=Request.Form("uid")
oldpwd=Request.Form("oldpwd")
newpwd1=Request.Form("newpwd1")
newpwd2=Request.Form("newpwd2")
if id="" then
Response.write "没有密码需要修改!<a href='modifypwd.asp?id="&CStr(id)&"' class='link'>返回密码修改</a> <a href='usermanage.asp' class='link'>返回用户列表</a>"
Response.end
end if
if oldpwd="" or newpwd1="" or newpwd2="" then
Response.write "密码不能为空!<a href='modifypwd.asp?id="&CStr(id)&"' class='link'>返回密码修改</a> <a href='usermanage.asp' class='link'>返回用户列表</a>"
Response.end
end if
if newpwd1<>newpwd2 then
Response.write "新密码输入不一致!<a href='modifypwd.asp?id="&CStr(id)&"' class='link'>返回密码修改</a> <a href='usermanage.asp' class='link'>返回用户列表</a>"
Response.end
end if
'验证密码
sSql="select * from UserInfo where UserPwd='"&trim(oldpwd)&"' and [id]="&CStr(id)
oRs.open sSql,oConn,3,2
if oRs.bof and oRs.eof then
Response.write "旧密码输入错误!<a href='modifypwd.asp?id="&CStr(id)&"' class='link'>返回密码修改</a> <a href='usermanage.asp' class='link'>返回用户列表</a>"
Call DBConnEnd()
Response.end
end if
oRs.close
sSql="update UserInfo set UserPwd='"&trim(newpwd1)&"' where [id]="&CStr(id)
oRs.open sSql,oConn,1,1
Call DBConnEnd()
Response.write "修改成功! <a href='usermanage.asp' class='link'>返回用户列表</a>"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -