%
'=========================================================
' File: login.asp
' Version:5.0
' Date: 2002-9-10
' Script Written by satan
'=========================================================
' Copyright (C) 2001,2002 AspSky.Net. All rights reserved.
' Web: http://www.aspsky.net,http://www.dvbbs.net
' Email: info@aspsky.net,eway@aspsky.net
'=========================================================
stats="填写登陆信息"
dim url,comeurl
call nav()
call head_var(2,0,"","")
if request("action")="chk" then
call chklogin()
if founderr then call dvbbs_error()
else
url=Request.ServerVariables("HTTP_REFERER")
%>
<%
end if
call footer()
sub chklogin()
dim UserIP
dim username
dim userclass
dim password
dim article
dim cookies_path_s,cookies_path_d,cookies_path,usercookies
UserIP=replace(Request.ServerVariables("REMOTE_ADDR"),"'","")
if request("username")="" then
errmsg=errmsg+"
"+"请输入您的用户名。"
founderr=true
else
username=trim(checkStr(request("username")))
end if
if request("password")="" then
errmsg=errmsg+"
"+"请输入您的密码。"
founderr=true
else
password=md5(trim(checkStr(request("password"))))
end if
'判断更新cookies目录
cookies_path_s=split(Request.ServerVariables("PATH_INFO"),"/")
cookies_path_d=ubound(cookies_path_s)
cookies_path="/"
for i=1 to cookies_path_d-1
if not (cookies_path_s(i)="upload" or cookies_path_s(i)="admin") then cookies_path=cookies_path&cookies_path_s(i)&"/"
next
if cookiepath<>cookies_path then
cookiepath=replace(cookies_path,"'","")
conn.execute("update config set cookiepath='"&cookiepath&"'")
end if
if founderr then exit sub
usercookies=request("CookieDate")
if chkuserlogin(username,password,usercookies,1)=false then
errmsg=errmsg+"
"+"您的用户名并不存在,或者您的密码错误,或者您的帐号已被管理员锁定。"
founderr=true
exit sub
end if
dim comeurlname
if instr(lcase(request("comeurl")),"reg.asp")>0 or instr(lcase(request("comeurl")),"login.asp")>0 or trim(request("comeurl"))="" then
comeurlname=""
comeurl="index.asp"
else
comeurl=request("comeurl")
comeurlname=""&request("comeurl")&""
end if
%>
| 登陆成功:<%=Forum_info(0)%>欢迎您的到来 |
|
<%
end sub
%>