📄 admuserlogin.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conn.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("uname"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization="uaccesslevel"
MM_redirectLoginSuccess="adminuser.asp"
MM_redirectLoginFailed="adminloginfail.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_conn_STRING
MM_rsUser.Source = "SELECT uname, upassword"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM yonghu WHERE uname='" & MM_valUsername &"' AND upassword='" & CStr(Request.Form("upassword")) & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And true Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<html>
<head>
<title>管理员登录口</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../files/cssresult.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../files/bg.jpg" leftmargin="0" topmargin="0">
<div align="center"><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult"><img src="top.gif" width="777" height="106" usemap="#Map" border="0" align="middle"></span></font></b></font></b></font></b></font></b></font><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult">
<map name="Map">
<area shape="rect" coords="7,79,59,104" href="../index1.asp" target="_self">
<area shape="rect" coords="62,79,113,106" href="../search.asp" target="_self">
<area shape="rect" coords="116,78,208,103" href="../add.asp" target="_self">
<area shape="rect" coords="307,77,359,103" href="admuserlogin.asp" target="_self">
<area shape="rect" coords="697,75,749,103" href="loginout.asp" target="_self">
<area shape="rect" coords="640,75,693,103" href="../index.asp" target="_self">
<area shape="rect" coords="212,78,303,103" href="../view.asp" target="_self">
<area shape="rect" coords="685,9,762,38" href="../help.htm" target="_blank">
</map>
</span></font></b></font></b></font></b></font></b></font><font color="#0000FF"></font></b></font></b></font><font color="#FF0000"><b><font color="#FF0000"><b><font color="#0000FF"><span class="cssresult">
</span></font></b></font></b></font> </div>
<p align="center"> </p>
<p align="center"><b><font color="#FF0000" class="cssindexda">系统管理员登录页</font></b></p>
<p> </p>
<form name="form1" method="post" action="<%=MM_LoginAction%>">
<table width="46%" border="0" cellspacing="10" cellpadding="0" align="center">
<tr>
<td class="cssresult"><font color="#FF0000"><b>用户名:</b></font></td>
<td>
<input type="text" name="uname">
</td>
</tr>
<tr>
<td class="cssresult"><font color="#FF0000"><b>密 码:</b></font></td>
<td>
<input type="password" name="upassword">
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="Submit" value="管理员管理用户登录">
</div>
</td>
</tr>
</table>
</form>
<div align="right"><a href="../index.asp" target="_self" class="cssresult">返回首页</a>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -