📄 editpwd.asp
字号:
<%
if Session("ljl_liujinlu")="" or Session("ljl_grad")="" then%>
<script language=vbscript>
MsgBox "错误:非法用户!"
location.href = "login.asp"
</script>
<%end if%>
<!--#include file="bkconn.asp"-->
<%
'获取数据
stel=request.form("old")
scost=request.form("new")
sname = Session("ljl_liujinlu")
'检验数据合法性
if stel="" or scost="" then%>
<script language=vbscript>
MsgBox "错误:输入不能有空,请重新提交!"
location.href = "userinfo.asp"
</script>
<%else
'校验源密码
set tablelist=conn.execute("select * from user where guestname='" &sname &"' and ljl_pwd='" &stel &"'")
if tablelist.eof and tablelist.bof then
%>
<script language=vbscript>
MsgBox "错误:旧密码错误,禁止修改!"
location.href = "userinfo.asp"
</script>
<%else
'写入记录
conn.execute("update user set ljl_pwd='"&scost&"' where guestname='"&sname&"'")
%>
<script language=vbscript>
MsgBox "密码修改成功,单击此处返回!"
location.href = "userinfo.asp"
</script>
<%end if
conn.close
set conn=nothing
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -