adminresetpwd.asp

来自「一个比较好的」· ASP 代码 · 共 29 行

ASP
29
字号
<!--#include File="../conndb.asp"-->
<!--#include file="isAdmin.asp"-->
<html>
<head>
<title>系统管理员</title>
</head>
<body>
<%
	aid = Request.QueryString("aid")
	orgpwd = Request.Form("orgpwd")
	'判断是否存在此用户
	sql = "Select * From Admin Where AdminId='"&aid&"' And PassWd='"&orgpwd&"'"
	Set rs = Conn.Execute(sql)
	If rs.Eof Then
		%>
		<script language="javascript">
			alert("不存在此用户名或密码错误!");
			history.go(-1);
		</script>
		<%
	 Else
	    Conn.Execute("Update Admin Set PassWd='"&Request.Form("pwd")&"' where AdminId='"&aid&"'")
	    Session("admin_id") = aid
	    Session("admin_pwd") = Request.form("pwd")
	 end if	   
	 Response.Write "<h2>更改密码成功!</h2>"
%>	
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?