📄 login.asp
字号:
<!--#include file="../conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="BtBBS_Fun.asp"-->
<!--#include file="md5.asp"-->
<%
StarTime = Timer():AccessNum=0
username=Trim(Request.Form("username"))
password=md5(Trim(Request.Form("password")))
EndTime = Timer()
Response.Write "<script src=online.asp?userwz=登入页面&dis=NO></script>"
if username<>"" and password<>"" then
AccessNum=AccessNum+1
Set rs=conn.execute("select top 1 id,用户名,密码,权限,帐号状态 from 用户资料 where 用户名='"&username&"' and 密码='"&password&"' ")
if rs.bof and rs.eof then
Response.Cookies("login")="N"
Call JCC_Board_Top%>
<center><table width=743><tr><td><a href=index.asp><font class=NavColor>首页</a> >> 登陆结果 >> </font><a href=# onclick=history.go(-1)><font class=NavColor>返回</font></a></td></tr></table>
<br><br><br>
<meta HTTP-EQUIV=refresh Content='3;url=index.asp'>
<table>
<tr><td><li>登陆失败 用户名或密码错误</li></td></tr>
<tr><td><li><a href=index.asp>返回首页</a></li></td></tr>
<tr><td><li>返回到前一页 <a href=<%=Request.ServerVariables("HTTP_REFERER")%>><%=Request.ServerVariables("HTTP_REFERER")%></a></li></td></tr>
</table>
<br><br><br><br></center>
<!--#include file="../inc/tom1.inc"-->
<%
else
if rs("帐号状态")="lock" then
Call JCC_Board_Top%>
<center><table width=743><tr><td><a href=index.asp><font class=NavColor>首页</a> >> 登陆结果 >> </font><a href=# onclick=history.go(-1)><font class=NavColor>返回</font></a></td></tr></table>
<br><br><br>
<meta HTTP-EQUIV=refresh Content='3;url=index.asp'>
<table>
<tr><td><li>登陆失败 这个帐号已被加入到黑名单中</li></td></tr>
<tr><td><li><a href=index.asp>返回首页</a></li></td></tr>
<tr><td><li>返回到前一页 <a href=<%=Request.ServerVariables("HTTP_REFERER")%>><%=Request.ServerVariables("HTTP_REFERER")%></a></li></td></tr>
</table>
<br><br><br><br></center>
<!--#include file="../inc/tom1.inc"--><%
else
CkiExp=Request.Form("CkiExp")
if CkiExp<>"-1" then
Response.Cookies("username").Expires=date+CkiExp
Response.Cookies("password").Expires=date+CkiExp
Response.Cookies("bbsgl").Expires=date+CkiExp
Response.Cookies("login").Expires=date+CkiExp
end if
Response.Cookies("username")=username
Response.Cookies("password")=password
Response.Cookies("bbsgl")=rs("权限")
Response.Cookies("login")="Y"
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")="" then ipdress=Request.ServerVariables("REMOTE_ADDR") else ipdress=Request.ServerVariables("HTTP_X_FORWARDED_FOR") end if
AccessNum=AccessNum+1
rs=conn.execute("update 用户资料 set 上次登陆时间='"&now&"',最后活动时间='"&now&"',登陆次数=登陆次数+1,访问IP='"&ipdress&"' where 用户名='"&UserName&"' ")'登陆后要处理的帐号数据
EndTime = Timer()
Call JCC_Board_Top%>
<center><table width=743><tr><td><a href=index.asp><font class=NavColor>论坛首页</a> >> 登陆结果 >> </font><a href=# onclick=history.go(-1)><font class=NavColor>返回</font></a></td></tr></table>
<br><br><br>
<meta HTTP-EQUIV=refresh Content='3;url=index.asp'>
<table>
<tr><td><li>登陆成功</li></td></tr>
<tr><td><li><a href=index.asp>返回首页</a></li></td></tr>
<tr><td><li>返回到前一页 <a href=<%=Request.ServerVariables("HTTP_REFERER")%>><%=Request.ServerVariables("HTTP_REFERER")%></a></li></td></tr>
</table>
<br><br><br><br></center>
<!--#include file="../inc/tom1.inc"--><%
end if
end if
else
Response.Cookies("login")="N"
Call JCC_Board_Top%>
<center><table width=743><tr><td><a href=index.asp><font class=NavColor>论坛首页</a> >> 登陆结果 >> </font><a href=# onclick=history.go(-1)><font class=NavColor>返回</font></a></td></tr></table>
<br><br><br>
<meta HTTP-EQUIV=refresh Content='3;url=index.asp'>
用户名或密码都不能为空 <a href=index.asp>返回首页</a>
<br><br><br><br></center>
<!--#include file="../inc/tom1.inc"--><%
end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -