⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 多种统计功能可以统计到每页的访问量。 并可以生成各种报表比如 日报表 月报表 周报表 年报表等 并可以对来访者在地域进行分析
💻 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 + -