📄 admin.asp
字号:
<!--#include file="include/buyok_shop_30_conn.asp"-->
<!--#include file="chopchar.asp"-->
<HTML>
<HEAD>
<TITLE>管理员登陆</TITLE>
<script language='javascript'>
if (top != self)top.location.href = "admin.asp";
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="buyok_shop.css" type="text/css">
</head>
<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/admin/loginbg.gif">
<table width=100% height=100% align=center valign=middle background="images/admin/loginbg.gif" >
<tr><td align=center>
<%
if request("login")<>"check" then
%>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="323" height="202" background="IMAGES/admin/login1.gif"> </td>
<td width="323" height="202" background="IMAGES/admin/login2.gif" valign="bottom" align=center>
<table border=0 width=92% cellspacing="1" cellpadding="2" >
<form method="post" action="admin.asp" name="adminlogin">
<tr><td>
<INPUT maxLength=16 size=16 type=text name=username style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; HEIGHT: 16px" title="请填写用户名">
</td></tr>
<tr><td>
<INPUT maxLength=16 size=16 type=password name=password style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; HEIGHT: 16px" title="请填写密码">
</td></tr>
<tr><td>
<INPUT maxLength=50 size=16 type=text name=path style="BORDER-RIGHT: #ffffff 0px solid; BORDER-TOP: #ffffff 0px solid; FONT-SIZE: 9pt; BORDER-LEFT: #ffffff 0px solid; BORDER-BOTTOM: #ffffff 0px solid; HEIGHT: 16px" title="请填写后台目录">
</td></tr>
<tr><td height="32">
<input type="image" src="images/admin/login.gif" title="登录后台"><input type="hidden" name=login value="check"> <img border=0 src="images/admin/quit.gif" title="返回首页" style='cursor: hand' onClick="location.href='main.asp';">
</td></tr>
</form>
</table>
</td>
</tr>
<tr>
<td width="323" height="202" background="IMAGES/admin/login3.gif"></td>
<td width="323" height="202" background="IMAGES/admin/login4.gif"></td>
</tr>
</table>
<%
else
if session("buyok_admin_login")>=5 then
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from shopsetup"
rs.open sql,conn,1,3
userip=Request.serverVariables("REMOTE_ADDR")
if instr(rs("ip"),userip)<0 then rs("ip")=rs("ip")&"@"&userip
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
response.write "alert('您涉嫌非法登陆网站后台,已被系统锁定。请与技术人员联系。');"
response.write "location.href='index.asp';"
response.write "</script>"
response.end
end if
path=trim(request("path"))
username=trim(request("username"))
password=trim(request("password"))
if checktext(request("username"))<>request("username") or checktext(request("password"))<>request("password") then
response.write "<script language='javascript'>"
response.write "alert('您填写的内容中含有非法字符,请检查后重新输入!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
if path = "" or username="" or password="" then
response.write "<script language='javascript'>"
response.write "alert('填写不完整,请检查后重新提交!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(server.MapPath("./"&path))=false then
session("buyok_admin_login")=session("buyok_admin_login")+1
response.write "<script language='javascript'>"
response.write "alert('您填写的目录不存在,请检查后重新提交。\n\n提示:出错"&session("buyok_admin_login")&"次');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
set fso=nothing
set rs=conn.execute("select * from manage where password='"&md5(password)&"' and username='"&username&"'")
if not(rs.bof and rs.eof) then
session("buyok_admin_login")=0
Response.cookies("buyok")("admin")=username '设置cookies
Response.Redirect (path&"/index.asp") '登入真实后台
else
response.write "<script language='javascript'>"
session("buyok_admin_login")=session("buyok_admin_login")+1
response.write "alert('您填写的用户名或者密码有误,请检查后重新输入。\n\n提示:出错"&session("buyok_admin_login")&"次');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if
set rs=nothing
conn.close
set conn=nothing
end if
%>
</td></tr>
</table>
<%
if request("action")="" then
response.cookies("buyok")("temp")="login"
response.write "<meta HTTP-EQUIV=REFRESH CONTENT='0;URL="&request.ServerVariables("script_name")&"?action=login'>"
else
if request.cookies("buyok")("temp")<>"login" then
response.write "<script language='javascript'>"
response.write "alert('用户您好,您的电脑没有开启COOKIES,您将不能正常登陆后台,请启用COOKIES后再访问本页。');"
response.write "</script>"
response.end
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -