📄 editpwd.asp
字号:
<!--#include file=conn.asp-->
<%
UserName=request.form("UserName")
passwd1=trim(request.form("oldpwd"))
passwd2=trim(request.form("newpwd"))
passwd3=trim(request.form("retype"))
if username="" then
response.Write("<script>alert('请输入用户名');history.go(-1);</script>")
end if
if passwd1="" then
response.Write("<script>alert('请输入旧密码');history.go(-1);</script>")
end if
if passwd2="" then
response.Write("<script>alert('请输入新密码');history.go(-1);</script>")
end if
if passwd3="" then
response.Write("<script>alert('请重输入一次新密码');history.go(-1);</script>")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from rzuser where username='"&username&"'"
rs.open sql,conn,1,3
if rs.eof then
response.Write("<script>alert('用户名不存在,请重新输入');history.go(-1);</script>")
else if passwd1<>rs("passwd") then
response.write ("<script>alert('密码错误!');history.go(-1);</script>")
else if passwd2<>passwd3 then
response.write ("<script>alert('两次输入的新密码不同,请重新输入');history.go(-1);</script>")
else
rs("passwd")=passwd2
rs.update
response.write ("<script>alert('密码修改成功,请登录');window.location.href='index.asp';</script>")
end if
end if
end if
rs.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -