editpwd.asp
来自「网佳网络办公系统(以下简称OA)是一套基于B/S模式的无纸化办公系统。[显著特点」· ASP 代码 · 共 42 行
ASP
42 行
<%
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 + =
减小字号Ctrl + -
显示快捷键?