📄 login.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 + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("user"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="admin.asp"
MM_redirectLoginFailed="fail.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_conn_STRING
MM_rsUser.Source = "SELECT pass, user"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE pass='" & Replace(MM_valUsername,"'","''") &"' AND user='" & Replace(Request.Form("password"),"'","''") & "'"
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 false 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">
<style type="text/css">
<!--
.style2 {font-weight: bold; font-size: 24px;}
table {
font-family: "宋体";
font-size: 12px;
}
-->
</style>
</head>
<body >
<table width="640" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/td.gif"><div align="center" class="style2">留言管理登录</div></td>
</tr>
<tr>
<td><div align="right"><a href="index.asp" target="_blank"><img src="images/view.jpg" width="50" height="49" border="0"></a>
<a href="add.asp"><img src="images/add.jpg" width="50" height="49" border="0"></a> </div></td>
</tr>
<tr>
<td><div align="center">
<form ACTION="<%=MM_LoginAction%>" METHOD="POST" name="form1">
<table width="239" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="50"> 账号</td>
<td width="168"><input name="user" type="text" id="user" size="20"></td>
</tr>
<tr>
<td> 密码</td>
<td><input name="password" type="password" id="password" size="21"></td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form>
<p> </p>
</div></td>
</tr>
<tr>
<td background="images/td.gif"><div align="center">版权所在©零距离工作室</div></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -