?? login.asp
字號:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/guestbook.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("textfield"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="index.asp"
MM_redirectLoginFailed="sorry.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_guestbook_STRING
MM_rsUser.Source = "SELECT f_name, f_password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE f_name='" & Replace(MM_valUsername,"'","''") &"' AND f_password='" & Replace(Request.Form("textfield2"),"'","''") & "'"
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
%>
<link href="css.css" rel="stylesheet" type="text/css"> <title>站長登錄</title>
<body background="images/forum_bgcolor.gif">
<table width="220" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<form name="form1" method="POST" action="<%=MM_LoginAction%>">
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">
<tr align="center">
<td colspan="2" height="24" background="images/2_22.gif">[站長登錄]</td>
</tr>
<tr>
<td width="60" align="center" bgcolor="#F1F2F3">用戶名:</td>
<td bgcolor="#F1F2F3" align="center">
<input type="text" name="textfield" style="background-color: #c1d8f1; BORDER-RIGHT: #42a5f7 1px dotted; BORDER-TOP: #42a5f7 1px dotted; BORDER-LEFT: #42a5f7 1px dotted; BORDER-BOTTOM: #42a5f7 1px dotted"></td>
</tr>
<tr>
<td align="center" bgcolor="#F9FAFB">密碼:</td>
<td bgcolor="#F9FAFB" align="center">
<input type="text" name="textfield2" style="background-color: #c1d8f1; BORDER-RIGHT: #42a5f7 1px dotted; BORDER-TOP: #42a5f7 1px dotted; BORDER-LEFT: #42a5f7 1px dotted; BORDER-BOTTOM: #42a5f7 1px dotted"></td>
</tr>
<tr align="center">
<td colspan="2" height="30" background="images/catbg.gif">
<input type="submit" name="Submit" value="登錄" style="border:1 solid #000000;background:#ffffff" class="button">
<input type="submit" name="Submit2" value="取消" style="border:1 solid #000000;background:#ffffff" class="button">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -