📄 login.asp
字号:
<!--#include file="../Conn.asp"-->
<!--#include file="../Include/Md6.asp"-->
<%
Response.Expires = -9999
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-ctrol", "no-cache"
If Session("AdminUserName") <> "" Then
Response.Redirect "Index.asp"
Response.End
End If
Dim action,UserName,PassWord,GetCode
Dim Rs,Sql
action = Request.Form("action")
UserName = SafeStr(Request.Form("UserName"))
PassWord = Trim(Request.Form("PassWord"))
GetCode = Trim(Request.Form("Code"))
If action = "login" Then
If UserName = "" Or PassWord = "" Then
Response.Write "<script>alert('帐户或密码输入有误,请查证!');location.href='login.asp';</script>"
Response.End
End If
If GetCode <> Session("GetCode") Then
Response.Write "<script>alert('验证码输入有误,请查证!');location.href='login.asp';</script>"
Response.End
End If
Set Rs = Server.CreateObject("Adodb.Recordset")
Sql = "Select * From Admin Where UserName='" & UserName & "' And PassWord='" & Md6(PassWord) & "'"
Rs.Open Sql,Conn,1,3
If Not (Rs.Eof Or Rs.Bof) Then
Session("AdminUserName") = Rs("UserName")
Rs("LoginIp") = Request.ServerVariables("REMOTE_HOST")
Rs("LoginTime") = Now()
Rs.Update
Rs.Close
Set Rs = Nothing
Call ConnClose()
Response.Redirect "index.asp"
Else
Rs.Close
Set Rs = Nothing
Call ConnClose()
Response.Write "<script>alert('帐户或密码输入有误,请查证!');location.href='login.asp';</script>"
Response.End
End If
End If
%>
<HTML><HEAD><TITLE><%=Name%>—后台管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; SCROLLBAR-FACE-COLOR: #2b73f1; FONT-SIZE: 9pt; BACKGROUND: #ffffff; PADDING-BOTTOM: 0px; MARGIN: 0px; SCROLLBAR-HIGHLIGHT-COLOR: #0650d2; SCROLLBAR-SHADOW-COLOR: #449ae8; SCROLLBAR-3DLIGHT-COLOR: #449ae8; LINE-HEIGHT: 150%; SCROLLBAR-ARROW-COLOR: #02338a; PADDING-TOP: 0px; SCROLLBAR-TRACK-COLOR: #0650d2; FONT-FAMILY: "宋体"; SCROLLBAR-DARKSHADOW-COLOR: #0650d2; TEXT-DECORATION: none
}
TD {
FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体
}
INPUT {
FONT-SIZE: 12px; HEIGHT: 20px
}
BUTTON {
FONT-SIZE: 9pt; HEIGHT: 20px
}
</STYLE>
<META content="MSHTML 6.00.2900.5512" name=GENERATOR>
<script type="text/javascript">
function check()
{
if(document.form1.username.value=="")
{
alert("请填写管理员名!");
document.form1.username.focus();
return false;
}
if(document.form1.password.value=="")
{
alert("请填写管理密码!");
document.form1.password.focus();
return false;
}
if(document.form1.code.value=="")
{
alert("请填写验证码!");
document.form1.code.focus();
return false;
}
}
</script>
</HEAD>
<BODY>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=right>
<form name=form1 method=post action="?action=login" onSubmit="return check()">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=219 background=images/Admin_Login1_0_02.gif
height=164></TD>
<TD width=64 background=images/Admin_Login1_0_04.gif
height=164></TD>
<TD vAlign=top background=images/Admin_Login1_0_09.gif>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=270 background=images/Admin_Login1_0_05.gif
height=79></TD>
<TD width=150 background=images/Admin_Login1_0_06.gif
height=79></TD>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD height=21></TD>
<TD></TD></TR>
<TR>
<TD><INPUT type=hidden value=login
name=action><INPUT
style="WIDTH: 50px; HEIGHT: 50px" type=image
src="images/Admin_Login1_0_10.gif"
name=Submit></TD>
<TD width=58
background=images/Admin_Login1_0_11.gif
height=50></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD height=85>
<TABLE width="427" border=0 cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD vAlign=bottom width=26 rowSpan=2><IMG alt=""
src="images/Admin_Login1_0_15.gif"></TD>
<TD width=102><FONT color=#ffffff>用户名称:</FONT></TD>
<TD vAlign=bottom width=27 rowSpan=2><IMG alt=""
src="images/Admin_Login1_0_19.gif"></TD>
<TD width=101><FONT color=#ffffff>用户密码:</FONT></TD>
<TD vAlign=bottom width=36 rowSpan=2><IMG alt=""
src="images/Admin_Login1_0_23.gif"></TD>
<TD colSpan=2><FONT color=#ffffff>验证码:</FONT></TD></TR>
<TR>
<TD><INPUT id=UserName onMouseOver=""
style="BORDER-RIGHT: #f7f7f7 0px solid; BORDER-TOP: #f7f7f7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #f7f7f7 0px solid; WIDTH: 70px; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #f7f7f7"
onfocus=this.select(); onMouseOut="" maxLength=20
name=UserName ?? this.style.background="#ffffff" ;??></TD>
<TD><INPUT onMouseOver=""
style="BORDER-RIGHT: #f7f7f7 0px solid; BORDER-TOP: #f7f7f7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #f7f7f7 0px solid; WIDTH: 70px; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #f7f7f7"
onfocus=this.select(); onMouseOut="" type=password
maxLength=20 name=password ??
this.style.background="#ffffff" ;??></TD>
<TD width=67><INPUT
name=code id="code"
style="BORDER-RIGHT: #f7f7f7 0px solid; BORDER-TOP: #f7f7f7 0px solid; FONT-SIZE: 9pt; IME-MODE: disabled; BORDER-LEFT: #f7f7f7 0px solid; WIDTH: 50px; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #f7f7f7"
onfocus=this.select(); onMouseOver="" onMouseOut="" size=6 maxLength=4 ?? this.style.background="#ffffff"
;??></TD>
<TD width=68><img src="../Include/getcode.asp?a=24&b=144&c=204&d=255&e=0&f=65" border=0></TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM></TD></TR>
<TR>
<TD></TD></TR></TBODY></TABLE>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -