📄 userchklogin.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="session.asp"-->
<%
founderr=false
UserIP=Request.ServerVariables("REMOTE_ADDR")
if request("username")="" then
errmsg=errmsg+"<li>请输入您的用户名。"
founderr=true
else
username=checkin(trim(request("username")))
end if
if request("password")="" then
errmsg=errmsg+"<li>请输入您的密码。"
founderr=true
else
password=checkin(trim(request("password")))
end if
sql="select username,password,logins,lastlogin,loginIP,UserPoint,UserLevel,ischecked from Users where username='"&username&"' and lockuser=0"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
errmsg=errmsg+"<li>您输入的用户名并不存在,<a href='UserReg.asp'>请先注册</a><li>或者管理员已经将用户账号锁定,请和管理员联系。"
founderr=true
elseif rs("ischecked")<>true then
errmsg=errmsg+"<li>对不起,您的帐号尚未通过管理员的验证,请耐心等待!"
founderr=true
else
if rs("password")<>password then
errmsg=errmsg+"<li>您输入的密码不正确。"
founderr=true
else
rs("logins")=rs("logins")+1
rs("UserPoint")=rs("UserPoint")+1
if rs("UserLevel")<7 and rs("UserPoint")=Point(rs("UserLevel")+1) then rs("UserLevel")=rs("UserLevel")+1
rs("lastlogin")=Now()
rs("loginIP")=UserIP
rs.update
session("xpUser")=UserName
session("xpPwd")=PassWord
session.timeout=200
end if
end if
if founderr=true then
call error()
else
response.redirect("default.asp")
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -