📄 check.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="Inc/Class_Public.asp"-->
<%
dim user,pass,check,sql,rs,info,Cnwy
set Cnwy=new CnwyAsp_Public
Call ConnOpen()
Cnwy.checkss=request.form("username")
user=Cnwy.checkstr
pass=trim(request.form("password"))
check=CStr(request.form("check"))
if user="" or pass="" or check="" then
info="信息填写不完整,请返回重新输入."
elseif check<>CStr(session("check")) then
info="验证码输入错误,"&check&"vs"&session("check")&"请返回重新输入."
elseif user <> "" and pass <>"" and check=CStr(session("check")) then
sql="select * from CnwyAsp_Admin where user='"&user&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,2,3
if rs.eof or rs.bof then
info="对不起,此管理员的帐号不存在."
elseif rs("user")=user and rs("pass")=pass then
if Cnwy.turn=false and rs("type") <> "superadmin" then
info="系统已经被关闭,管理员正在对系统进行维护或升级,暂时不能登陆.请您稍后再来."
else
With Response
.Cookies("user")=rs("user")
.Cookies("pass")=rs("pass")
.Cookies("name")=rs("name")
.Cookies("master")=rs("master")
.Cookies("type")=rs("type")
rs("login")=rs("login")+1
rs("ip")=request.servervariables("REMOTE_ADDR")
rs("online")=True
rs.update
.redirect("admin.asp")
.end()
end with
rs.close
set rs=nothing
end if
elseif pass<>rs("pass") then
info="对不起,用户密码输入错误."
rs.close
set rs=nothing
else
info="非法操作,您的请求被禁止."
end if
else
info="非法操作,您的请求被禁止."
end if
Call ConnClose()
Cnwy.errinfo(info)
set Cnwy=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -