📄 chk_login.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/char.inc"-->
<%
if not instr(1,request.servervariables("http_referer"),request.servervariables ("server_name"),1)=8 then
response.redirect("error.asp?err=http")
response.end
end if
code=replace(trim(Request.form("code")),"'","")
if code<>CStr(session("CheckCode")) then
response.redirect("error.asp?error=code")
response.end
end if
loginip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if loginip= "" then loginip=Request.ServerVariables("REMOTE_ADDR")
username=htmlencode2(replace(request.form("username"),"'",""))
password=md5(htmlencode2(request.form("password")))
sql="select * from [user] where username='"&username&"' and password='"&password&"'"
rs.open sql,conn,1,3
if rs.bof then
response.redirect("error.asp?error=epass")
response.end
end if
if rs("stopdate")<>"" then
if rs("stopdate") < Date() then
response.Redirect("error.asp?error=enddate")
response.end
end if
end if
if rs("state")=2 then
response.Redirect("error.asp?error=lock")
response.end
end if
if rs("state")=0 then
response.Redirect("error.asp?error=nokt")
response.end
end if
rs("logins")=rs("logins")+1
rs("loginip")=loginip
rs("logindate")=Now()
rs.update
Response.Cookies("username")=rs("username")
Response.Cookies("password")=rs("password")
response.redirect "member.asp"
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -