📄 index.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/CONNECT.asp" -->
<%dim IDname,IDmima
session("IDname")=Request.Form("ID")
session("IDmima")=Request.Form("PSW")%>
<%
' *** 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("ID"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="loginOK.asp"
MM_redirectLoginFailed="loginfail.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_CONNECT_STRING
MM_rsUser.Source = "SELECT id, pwd"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM dbo.admin WHERE id='" & Replace(MM_valUsername,"'","''") &"' AND pwd='" & Replace(Request.Form("PSW"),"'","''") & "'"
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
%>
<%
IF Request.Form("ID") = "" OR Request.Form("PSW") = "" then
response.Write "<script language =javascript> alter('帐号或密码未输入,请返回!');history.back(-1)</script> "
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>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
font-family: "华文行楷";
color: #FF0000;
}
body {
margin-left: 100px;
margin-right: 30px;
}
.STYLE2 {color: #0099FF}
.STYLE3 {color: #00FF00}
-->
</style>
</head>
<body>
<table width="810" height="540" border="1" bordercolor="#CCCCCC">
<tr>
<td width="804" height="71" bordercolor="#D4D0C8" background="photo/8.jpg" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
<p class="STYLE2">欢迎使用光碟管理系统 </p>
</div></td>
</tr>
<tr>
<td height="461" bordercolor="#333333" background="photo/EW.jpg" bgcolor="#999999"><form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center" class="STYLE3">请输入帐号和密码</p>
<p>
<label>
<div align="center">
<span class="STYLE3">用户帐号</span>
<input type="text" name="ID" />
</div>
</label>
</p>
<p>
<label>
<div align="center">
<span class="STYLE3">用户密码</span>
<input type="password" name="PSW" />
</div>
</label>
</p>
<p>
<label>
<div align="center">
<input type="submit" name="Submit" value="登录" />
<input type="reset" name="Submit2" value="重新" />
</div>
</label>
<label> </label>
</p>
<p>
<label></label>
<label></label>
</p>
</form>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center">注意:本网页受版权保护,任何个人或集体未经允许私自拷贝都属于违法行为,我们将采取措施。</p>
<p align="center">@2007年12月28日</p></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -