?? chklogin.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 + -