📄 admin_chklogin.asp
字号:
<!--#include file="HMconnection.asp"-->
<!--#include file="function.asp"-->
<!--#include file="../MD5/md5.asp"-->
<link rel="stylesheet" type="text/css" href="../style/style.css">
<%dim loginname,password,requestIP,objRS3
loginname=Checkin(trim(Request.form("username")))
password=Checkin(trim(Request.form("password")))
requestIP=Request.ServerVariables("REMOTE_ADDR")
password=md5(password)
set objRS3=server.CreateObject("adodb.recordset")
objRS3.Open "select * from errLogin where errLoginIP='"&requestIP&"'",conn,1,3
if not (objRS3.bof and objRS3.eof) then
if objRS3("errLoginCount")>19 then
objRS3("errLoginCount")=objRS3("errLoginCount")+1
objRS3.update
response.write "<script LANGUAGE='javascript'>alert('您登陆失败次数过多,服务器暂时不允许您登入!');document.URL='../index.asp';</script>"
objRS3.Close
set objRS3=nothing
response.end
end if
end if
objRS3.close
set objRS3=nothing
if loginname="" or password="" then
response.Write "<center><a href=login_admin.asp><font color=red size=2>对不起,登陆失败,请检查您的登陆名和密码</font></a></center>"
response.end
end if
dim adlonRS,adlonSQL
set adlonRS=server.createobject("adodb.recordset")
adlonSQL="select * from Admin where username='"&loginname&"'and password='"&password&"'"
adlonRS.open adlonSQL,conn,1,3
if not adlonRS.EOF then
if password=objRS("AdminKey") then
adlonRS("LoginTimes")=adlonRS("LoginTimes")+1
adlonRS.Update
Session("AdminID")=adlonRS("id")
session("loginname")=loginname
Session("IsAdmin")=true
Session("KEY")=adlonRS("oskey")
response.cookies("admin")=loginname
response.cookies("qx")=2
response.cookies("loginTimes")=adlonRS("logintimes")
dim objRS7
set objRS7=server.CreateObject("adodb.recordset")
objRS7.Open "select * from errLogin where errLoginIP='"&requestIP&"'",conn,1,3
if not (objRS7.eof and objRS7.bof) then
objRS7.delete
objRS7.update
end if
objRS7.Close
set objRS7=nothing
adlonRS.close
set adlonRS=nothing
response.Write("<script language='JavaScript' type='text/JavaScript'>document.location='index.asp'</script>")
else
dim objRS4
set objRS4=server.CreateObject("adodb.recordset")
objRS4.Open "select * from errLogin where errLoginIP='"&requestIP&"'",conn,1,3
if not (objRS4.bof and objRS4.eof) then
objRS4("errLoginCount")=objRS4("errLoginCount")+1
objRS4.update
else
objRS4.addnew
objRS4("errLoginIP")=requestIP
objRS4("errLoginCount")=1
objRS4.update
end if
response.write "<script LANGUAGE='javascript'>alert('对不起,登陆失败,请仔细检查!');history.go(-1);</script>"
objRS4.Close
set objRS4=nothing
adlonRS.close
set adlonRS=nothing
response.end
end if
else
dim objRS5
set objRS5=server.CreateObject("adodb.recordset")
objRS5.Open "select * from errLogin where errLoginIP='"&requestIP&"'",conn,1,3
if not (objRS5.bof and objRS5.eof) then
objRS5("errLoginCount")=objRS5("errLoginCount")+1
objRS5.update
else
objRS5.addnew
objRS5("errLoginIP")=requestIP
objRS5("errLoginCount")=1
objRS5.update
end if
response.write "<script LANGUAGE='javascript'>alert('对不起,登陆失败,请仔细检查!!');history.go(-1);</script>"
objRS5.Close
set objRS5=nothing
adlonRS.close
set adlonRS=nothing
response.end
end if
%><title>顶级影视 设计维护:QQ:1243619 Email:yakai@163.net</title>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -