⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chklogin.asp

📁 完整的网址站
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="md5.asp"-->
<%
dim founderr,errmsg
founderr=false
errmsg=""
dim adminname
dim adminpwd
adminname=replace(trim(request("username")),"'","")
AdminLoginCode=replace(trim(request("AdminLoginCode")),"'","")
adminpwd=md5(replace(trim(request("password")),"'",""))
if adminname="" and adminpwd="" then
   founderr=true
   errmsg=errmsg+"<br>"+"<li>请输入用户名或密码!"
end if
dim GetCode,valicode
if request("Code")="" then
   founderr=true
   errmsg=errmsg+"<br>"+"<li>请输入验证码!"
else
GetCode=int(request("Code"))
valicode=int(Session("GetCode"))
if GetCode<>valicode then
  founderr=true
   errmsg=errmsg+"<br>"+"<li>验证码输入错误,请重输入!"
end if
end if
if AdminLoginCode<>LoginCode then
   founderr=true
   errmsg=errmsg+"<br>"+"<li>管理认证码错误!"
end if
if founderr then
call diserror
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from happywz_admin where username='"&adminname&"' and password='"&adminpwd&"'"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
   rs.close
   set rs=nothing
   founderr=true
   errmsg=errmsg+"<br>"+"<li>您输入的用户名和密码不正确!"
   call diserror
else
   rs("LoginTimes")=rs("LoginTimes")+1
   rs("LastLoginTime")=now()
   rs("LastLoginIP")=Request.ServerVariables("REMOTE_ADDR")
   rs.Update
   session("adminlogin")=sessionvar
   session("id")=rs("id")
   session("flag")=rs("flag")
   session.timeout=50
   rs.close
   set rs=nothing
   Response.Redirect("admin_manage.asp")
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -