📄 login.asp
字号:
<%@ LANGUAGE = "vbscript" %>
<%
JyDownLoginTitle="用户登陆"
if request("JyDownType")="logout" then
JyDownLoginTitle="退出登陆"
JyDownLoginMgs="成功:退出登陆成功!"
if Session("JyDownAdminName")<>"" then
Session("JyDownAdminName") =""
Session("JyDownAdminDj")=""
response.cookies("JyDownUserSoftUrl")=""
end if
if request.cookies("JyDownUserName")<>"" then
response.cookies("JyDownUserName") =""
response.cookies("JyDownUserDj")=""
end if
elseif request("JyDownType")="login" then
server_vv=len(Request.ServerVariables("SERVER_NAME"))
server_v1=left(Cstr(Request.ServerVariables("HTTP_REFERER")),server_vv)
server_v2=left(Cstr("http://"&Request.ServerVariables("SERVER_NAME")),server_vv)
if server_v1<>server_v2 or server_v1="" or server_v1="" then
response.write("<script>alert('错误:禁止从站点外部提交数据!.')</script>")
response.end
end if
if request.form("user")<>"" and request.form("pwd")<>"" then
%>
<!--#include file="mdb_path_user.asp"-->
<!--#include file="config.asp"-->
<%user=replace(request("user")," ","+++ close")
pwd=replace(request("pwd")," ","+++ close")
set rs=server.createobject("adodb.recordset")
rs.open "select * from UserInfo where user='"&user&"' and pwd='"&pwd&"'",conn,1,1
if not rs.eof then
if pwd=rs("pwd") and user=rs("user") then
JyDownDj=rs("dj")
if JyDownDj=0 or JyDownDj=1 or JyDownDj=2 or JyDownDj=3 then
if rs("lock")=1 then
JyDownLoginMgs="错误:帐号 "&user&" 已被锁定,你不能登陆!"
else
JyDownLoginMgs="成功:帐号 "&user&" 登录成功!"
if JyDownDj=0 then SF="普通会员"
if JyDownDj=1 then SF="中级会员"
if JyDownDj=2 then SF="高级会员"
if JyDownDj=3 then SF="站长"
response.cookies("JyDownUserName")=rs("user")
response.cookies("JyDownUserDj")=rs("dj")
if JyDownDj=2 or JyDownDj=3 then
if rs("softurl")<>"" then
response.cookies("JyDownUserSoftUrl")=rs("softurl")
end if
Session("JyDownAdminName")=rs("user")
Session("JyDownAdminDj")=rs("dj")
Session("JyDownAdminAdmin")=rs("admin")
end if
end if
else
JyDownLoginMgs="错误:你的用户等级错误,不能登陆,请与站长联系!"
end if
else
JyDownLoginMgs="错误:用户名或密码错误!"
end if
else
JyDownLoginMgs="错误:用户名或密码错误!"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
else
JyDownLoginMgs="错误:用户名和密码都不能为空!"
end if
end if
%>
<html>
<head>
<title>管理中心--<%=JyDownLoginTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<style type=text/css>
body {background:#EFEFEF; font-size: 12px; margin-top:0px;}
td {font-size:12px;}
INPUT {FONT-SIZE: 12px; font-family: "宋体";}
SPAN {FONT-SIZE: 12px; POSITION: static}
a:link,a:visited {color: #0033FF; text-decoration: none;}
</style>
</head>
<body>
<p> </p>
<p> </p>
<table align=center width=380 style="border: outset 3px;" cellpadding=0 cellspacing=0 ID="Table1">
<tr><td style="padding:3px;background-color:blue;color:white;FONT-SIZE:13px;">管理员登录</td></tr>
<tr valign=top><td><img src="../images/admin_title.gif" width="100%"></td></tr>
<tr><td style="padding:15px;">
<table border="0" height=160>
<form method="post" action="login.asp?JyDownType=login" target="_top">
<%if JyDownLoginMgs<>"" then%>
<tr>
<td width="100%"><br>
<font color="#FF0000">·</font><%=JyDownLoginMgs%>
<%if SF<>"" then%><br><br>-------------------------------------<br>
<font color="#FF0000">·</font>身份:<font color="#008080"><%=SF%></font>
<br><br><font color="#FF0000">·</font><a href="index.asp"><b>进入管理中心</b></a>
<br><br>-------------------------------------
<br><font color="#FF0000">·</font><a href="login.asp?JyDownType=logout">退出登陆</a>
<%else%><%if request("JyDownType")<>"logout" then%><br><br><font color="#FF0000">·</font><%if webreg="1" then%><a href="../reg.asp"><%end if%>注册帐号</a><%end if%>
<br><br><font color="#FF0000">·</font><a href="login.asp">重新登陆</a><%end if%></td>
</tr>
<%else%>
<tr>
<td width="100%">
<table border="0" align="center" width=280>
<tr><td width="100%" align="center">用户名:<input name="user" maxlength="20" size="30"></td></tr>
<tr><td width="100%" align="center">密 码:<input type="password" name="pwd" maxlength="20" size="30"></td></tr>
<tr><td> </td></tr><tr><td align="right"><input type="submit" name="Submit" value="登 陆"></td></tr>
</table>
</td>
</tr>
<%end if%></form>
</table>
</td>
</tr>
<tr>
<td align="right"> <a href="../"><font color=ff0000>返回首页</font></a> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -