📄 login.asp
字号:
<!--#include file="Conn.asp"-->
<%
dim s
randomize timer
s=Int((8999)*Rnd +1000)
%>
<%if Request.QueryString("no")<>"eshop" then%>
<HTML><HEAD><TITLE>网站后台管理登录</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="../images/Admin_Style.css" rel=stylesheet>
<SCRIPT language=javascript>
<!--
function SetFocus()
{
if (document.Login.Name.value=="")
document.Login.Name.focus();
else
document.Login.Name.select();
}
function CheckForm()
{
if(document.Login.Name.value=="")
{
alert("请输入用户名!");
document.Login.Name.focus();
return false;
}
if(document.Login.Pwd.value == "")
{
alert("请输入密码!");
document.Login.Pwd.focus();
return false;
}
if (document.Login.s.value==""){
alert ("请输入您的验证码!");
document.Login.s.focus();
return(false);
}
}
//-->
</SCRIPT>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</HEAD>
<BODY>
<P> </P>
<FORM name=Login onsubmit="return CheckForm();" action="Login.asp?no=eshop"
method=post target=_parent>
<TABLE cellSpacing=0 cellPadding=0 width=600 align=center border=0>
<TBODY>
<TR>
<TD colSpan=2><IMG height=126 src="../images/Admin_Login1.gif"
width=600></TD></TR>
<TR>
<TD vAlign=top width=508 background=../images/Admin_Login2.gif>
<TABLE cellSpacing=0 cellPadding=0 width=508 border=0>
<TBODY>
<TR>
<TD colSpan=7 height=37> </TD></TR>
<TR>
<TD width=75 rowSpan=2> </TD>
<TD width=126><span class="style1"><FONT color=#043bc9>用户名称:</FONT></span></TD>
<TD width=39 rowSpan=2><span class="style1"></span></TD>
<TD width=131><span class="style1"><FONT color=#043bc9>用户密码:</FONT></span></TD>
<TD width=33><span class="style1"></span></TD>
<TD colSpan=2><span class="style1"><FONT color=#043bc9>验证码:</FONT></span></TD>
</TR>
<TR>
<TD><INPUT id=UserName
onmouseover="this.style.background='#ffffff';"
style="BORDER-RIGHT: #f7f7f7 0px solid; BORDER-TOP: #f7f7f7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #f7f7f7 0px solid; WIDTH: 110px; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #f7f7f7"
onfocus="this.select(); "
onmouseout="this.style.background='#F7F7F7'" maxLength=20
name="Name"></TD>
<TD><INPUT onmouseover="this.style.background='#ffffff';"
style="BORDER-RIGHT: #f7f7f7 0px solid; BORDER-TOP: #f7f7f7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #f7f7f7 0px solid; WIDTH: 110px; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #f7f7f7"
onfocus="this.select(); "
onmouseout="this.style.background='#F7F7F7'" type=password
maxLength=20 name="Pwd"></TD>
<TD> </TD>
<TD width=53><INPUT onmouseover="this.style.background='#ffffff';"
style="BORDER-RIGHT: #f7f7f7 0px solid; BORDER-TOP: #f7f7f7 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #f7f7f7 0px solid; WIDTH: 50px; BORDER-BOTTOM: #c0c0c0 1px solid; HEIGHT: 16px; BACKGROUND-COLOR: #f7f7f7"
onfocus="this.select(); "
onmouseout="this.style.background='#F7F7F7'" maxLength=4 size=6
name="s"></TD>
<TD width=51><b> <%=s%></b><input maxlength=20 name="s2" size=12 type=hidden value="<%=s%>"></TD></TR></TBODY></TABLE></TD>
<TD><INPUT type=hidden value=Login name=Action> <INPUT
style="WIDTH: 92px; HEIGHT: 126px" type=image
src="../images/Admin_Login3.gif" name=Submit></TD></TR></TBODY></TABLE>
</form>
</BODY></HTML>
<%
else%>
<%
pwd = replace(request.form("pwd"),"'","")
name = replace(request.form("name"),"'","")
Set rs = Server.CreateObject("ADODB.Connection")
sql = "select * from Manage_User where UserName='"&name&"' And PassWord='"&encrypt(pwd)&"'"
Set rs = conn.Execute(sql)
s=Trim(Request.Form("s"))
s2=Request.Form("s2")
If s2<>s Then
Response.Write("<script language=javascript>alert('请输入正确的认证码!');history.back()</script>")
Response.End
else
If Not rs.EOF = True Then
Session("Name") = rs("UserName")
Session("pwd") = rs("PassWord")
Response.Redirect("Manage.asp")
Else
Response.Redirect "Loginsb.asp?msg=您输入了错误的帐号或口令,请再次输入!"
end if
End If
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -