📄 password_xg_save.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="top1.asp"-->
<!--#include file="md5.asp"-->
<%
userid=request.form("userid")
if userid="" then
errmsg="您没有成功登录"
str="系统没有此用户,或者你没有权限修改此账号!谢谢合作"
MsgShow str,"2",url
'str:提示消息内容;flag:0:返回,标志1:跳转到URL,标志2:关闭窗口 标志3:用于显示 标志4: 刷新页面 标志5: 刷新父窗口
response.end
end if
' if cint(userid) <> session("XZWID") THEN
' errmsg="请勿越权操作"
' url="login.asp"
' MsgShow errmsg,1,url
' Call CloseDatabase() '关闭数据库对象
' response.end
' end if
UserType=request.form("UserType")
set rs=server.createobject("adodb.recordset")
if UserType="student" then
sql="select * from 学生表_student where ID="&cint(userid)
elseif UserType="teacher" then
sql="select * from Tinfor where ID="&cint(userid)
end if
rs.open sql,conn,1,3
if rs.eof and rs.bof then
str="系统没有此用户,或者你没有权限修改此账号!谢谢合作"
MsgShow str,"2",url
'str:提示消息内容;flag:0:返回,标志1:跳转到URL,标志2:关闭窗口 标志3:用于显示 标志4: 刷新页面 标志5: 刷新父窗口
response.end
else
orgpasswd=trim(request.form("orgpasswd"))
newpasswd=trim(request.form("newpasswd"))
renewpasswd=trim(request.form("renewpasswd"))
if newpasswd="" or newpasswd<>renewpasswd then
str="密码不能为空,而且两次输入的新密码必须一致。"
MsgShow str,"2",url
'str:提示消息内容;flag:0:返回,标志1:跳转到URL,标志2:关闭窗口 标志3:用于显示 标志4: 刷新页面 标志5: 刷新父窗口
Call CloseDatabase() '关闭数据库对象
response.end
end if
rs("pwd")=MD5(newpasswd)
RS("wuyongde")=newpasswd'记录真实密码
rs.update
rs.close
set rs=nothing
str="恭喜,您的密码修改成功。"
url="XS_AdminList.asp"
MsgShow str,"5",url
'str:提示消息内容;flag:0:返回,标志1:跳转到URL,标志2:关闭窗口 标志3:用于显示 标志4: 刷新页面 标志5: 刷新父窗口
response.end
Call CloseDatabase() '关闭数据库对象
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -