📄 loginfo.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->
<!--#include file="md5.asp" -->
<%if request("action")="hidden" then
sql="update online set o_hidden=1 where o_username = '" & cpbusername & "'"
conn.execute(sql)
response.cookies("cpbhidden")=1
response.redirect(Request.ServerVariables("HTTP_REFERER"))
elseif request("action")="online" then
sql="update online set o_hidden=0 where o_username = '" & cpbusername & "'"
conn.execute(sql)
response.cookies("cpbhidden")=0
response.redirect(Request.ServerVariables("HTTP_REFERER"))
end if
cpbtitle="用户登陆"
call toptitle(l_title,cpbtitle)
call head(4,"论坛信息",Request.ServerVariables("HTTP_REFERER"),cpbtitle)
sql="select h_loginmoney,h_loginfen,h_loginbeauty from home"
set rsconn1=conn.execute(sql)
if not rsconn1.eof then
h_loginfen=rsconn1("h_loginfen")
h_loginmoney=rsconn1("h_loginmoney")
h_loginbeauty=rsconn1("h_loginbeauty")
end if
set rsconn1=nothing
username=trim(chktopic(request.form("l_user")))
password=trim(chktopic(request.form("l_password")))
fy_lpassword=trim(chktopic(request.form("fy_lpassword")))
Cookies_Time=chktopic(request.form("Cookies_Time"))
o_hidden=chktopic(request.form("o_hidden"))
cpbcode=chktopic(request.form("cpbcode"))
gourl=chktopic(request("gourl"))
if username="" then
errornum=1
errormsg="<li>请输入您的用户名</li>"
else
username=chktopic(username)
end if
if password="" then
errornum=1
errormsg=errormsg&"<li>请输入您的密码</li>"
else
password=md5(chktopic(password))
end if
if t_viewcheck=0 and trim(session("cpbcode"))<>cpbcode then
errornum=1
errormsg=errormsg&"<li>验证码输入不正确,请重新输入右边系统产生的数字</li>"
end if
if errornum=1 then
call error(errormsg)
call bq()
response.end
end if
sqlchk="select u_id from user where username='" & username & "' and password='" &password & "' and lock<>2"
set rschk=conn.Execute (sqlchk)
if rschk.eof and rschk.bof then
errornum=1
errormsg=errormsg&"<li>你的用户名或者密码错误或者你的id已经被管理员禁止登陆</li>"
end if
if errornum=1 then
call error(errormsg)
call bq()
response.end
end if
if request.querystring("action")="password" then
sqllanmu="select l_password from lanmu where l_id="&chktopic(request.querystring("l_id"))&""
set rslanmu=conn.execute(sqllanmu)
if rslanmu("l_password")=fy_lpassword then
session("fy_lpassword")=fy_lpassword
else
errornum=1
errormsg="<li>很抱歉,您输入的加密论坛的密码错误</li><li>请联系管理员获得进入加密论坛的密码!</li>"
end if
end if
if errornum=1 then
call error(errormsg)
call bq()
response.end
end if
if o_hidden="" then o_hidden=0
Response.Cookies(l_url&"feiyue")("username")= username
Response.Cookies(l_url&"feiyue")("password")= password
Response.Cookies(l_url&"feiyue")("userid")=rschk("u_id")
response.cookies("cpbhidden")=o_hidden
if Cookies_Time<>"0" then
Cookies_Time=date+Cookies_Time
Response.Cookies(l_url&"feiyue").expires=Cookies_Time
'写进登陆次数等
sqlchk1="update user set u_logintimes=u_logintimes+1,fen=fen+"&h_loginfen&",u_beauty=u_beauty+"&h_loginbeauty&",u_money=u_money+"&h_loginmoney&" where username='" & username & "' and password='" & password & "'"
conn.execute(sqlchk1)
end if
if request.querystring("action")="password" then
response.redirect"list.asp?l_id="&request.querystring("l_id")&""
else
if instr(lcase(request("gourl")),"login.asp")>0 or instr(lcase(request("gourl")),"reg.asp")>0 or instr(lcase(request("gourl")),"index.asp")>0 or trim(request("gourl"))="" then
gourlname=""
gourl="index.asp"
else
gourl=request("gourl")
gourlname="<a href="&request("gourl")&">"&request("gourl")&"</a>"
end if
succmsg="<li>你已经成功登陆,欢迎多发言!</li><li>您的用户名及密码将在您的浏览器中保存到公元"&Cookies_Time&"</li><li>"&gourlname&"</li><li><a href=""index.asp"">进入论坛首页</a></li><script language=javascript>setTimeout(""location.replace('"&gourl&"')"",2000)</script>"
call succ(succmsg)
call bq()
response.end
end if
conn.close
set conn=nothing
%><!--#include file="bq.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -