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

📄 chklogin.asp

📁 全站生成htm静态页面
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<%response.buffer=true%>
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="functionuser.asp"-->
<script language="jscript.encode" src=../js/top.txt></script>
<%
dim cookiepath
cookiepath="/"
founderr=false
UserIP=Request.ServerVariables("REMOTE_ADDR")
if request("username")="" then
	errmsg=errmsg+""+"请输入您的用户名。"
	founderr=true
else
	username=Checkin(trim(request("username")))
end if
if request("password")="" then
	errmsg=errmsg+""+"请输入您的密码。"
	founderr=true
else
	password=md5(Checkin(trim(request("password"))))
end if
set rs=server.createobject("adodb.recordset")
sql="select username,password,loginIP,vipdate,Adddate,loginDate,lockuser,id from [user] where username='"&username&"' and lockuser=false"
rs.open sql,conn,1,3
	
if rs.bof and rs.eof then
	errmsg=errmsg+""+"您输入的用户名并不存在或你的VIP资格尚未审核通过。<br><br><a href='reg.asp'>请先注册或续费</a>"
	founderr=true
	
else
	if rs("password")<>password then
		errmsg=errmsg+""+"您输入的密码不正确。"
		founderr=true
else
dim isvip,usercookies
	isvip=cint(rs("vipdate")-datediff("d",rs("Adddate"),now()))
	if isvip<=0 then
	errmsg=errmsg+""+"你的VIP资格已经到期,请续费之后联系我们,我们马上帮你开通帐号!<br><br>"
	rs("vipdate")=0
	rs("lockuser")=1
	rs("loginDate")=NOW()
        rs("loginIP")=Request.ServerVariables("REMOTE_ADDR")
	rs.update
	founderr=true
else
                rs("loginDate")=NOW()
                rs("loginIP")=Request.ServerVariables("REMOTE_ADDR")
		rs.update
		 userid=rs("id")
usercookies=request("CookieDate")
if isnull(usercookies) or usercookies="" then usercookies="0"
select case usercookies
case "0"
	Response.Cookies("wwwy98cnmtv")("usercookies") = usercookies
case 1
   	Response.Cookies("wwwy98cnmtv").Expires=Date+1
	Response.Cookies("wwwy98cnmtv")("usercookies") = usercookies
case 2
	Response.Cookies("wwwy98cnmtv").Expires=Date+31
	Response.Cookies("wwwy98cnmtv")("usercookies") = usercookies
case 3
	Response.Cookies("wwwy98cnmtv").Expires=Date+365
	Response.Cookies("wwwy98cnmtv")("usercookies") = usercookies
end select
	end if
Response.Cookies("wwwy98cnmtv")("username") = username
Response.Cookies("wwwy98cnmtv")("userid") = UserID
Response.Cookies("wwwy98cnmtv")("password") = PassWord

end if
end if

if founderr=true then
        Response.Cookies("wwwy98cnmtv").path=cookiepath
	Response.Cookies("wwwy98cnmtv")("username")=""
	Response.Cookies("wwwy98cnmtv")("password")=""
	Response.Cookies("wwwy98cnmtv")("userid")=""
	Response.Cookies("wwwy98cnmtv")("usercookies")=""
	call error()
else
	response.redirect("index.asp")
end if
%>
<script language="jscript.encode" src=../js/end.txt></script>

⌨️ 快捷键说明

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