📄 pwupdate.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="top.asp"-->
<div align=center>
<%
If Session("usernum")="" Then
Response.Write("您没有权限查看此页,请")
%>
<a href="zhuce.asp"><%Response.Write("登录")%></a>
<%
Response.Write("后查看!")
%>
<p>
<!--#include file="down.asp"-->
<%
Response.End
End If
%>
</div>
<%psw=Request.form("oldpsw")%>
<%usernum=Session("usernum")%>
<%
fs="Select * from login where usernum='"+usernum+"'"
Set rs=Server.CreateObject("Adodb.Recordset")
rs.open fs,conn,1,1
%>
<div align=center>
<%
if not (rs.eof or rs.bof) then
if md5(psw,16)<>rs("userpassword") or md5(psw,16)="" then
Response.Write("对不起,您输入的旧密码有误!")
%>
<a href="pwchg.asp">请返回</a>
<%
Response.End
end if
end if
%>
</div>
<div align=center>
<%
if Request.form("newpsw")="" or Request.form("firpsw")="" then
Response.Write("对不起,您输入的密码不能为空!")
%>
<a href="pwchg.asp">请返回</a>
<%
Response.End
end if
%>
</div>
<div align=center>
<%
if Request.form("newpsw")<>Request.form("firpsw") then
Response.Write("对不起,您两次输入的新密码不符,请检查!")
%>
<a href="pwchg.asp">请返回</a>
<%
Response.End
end if
%>
</div>
<%if not (rs.eof or rs.bof) then%>
<%
rs.close
cs="Select * from login where usernum='"+usernum+"'"
rs.open cs,conn,1,3
rs("userpassword")=md5(Request.form("newpsw"),16)
rs.update
rs.close
set rs=nothing
%>
<%end if%>
<div align=center>
<%Response.Write("您的密码修改成功!")%>
</div>
<p>
<div align=center>请点<a href="view.asp">这里</a>返回</div>
<p>
<!--#include file="down.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -