<!--#include file="down_conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/md5.asp"-->
<%
Dvbbs.LoadTemplates("index")
Dvbbs.Stats="<a href=down_default.asp>下载中心</a>-付费用户登陆"
Dvbbs.Nav()'输出头
Dvbbs.Head_var 2,0,Dvbbs.Stats,""
if not DVBBS.founduser then
FoundErrs  "<font color=red>非会员谢绝进入！</font>请<a href=login.asp>登陆</a>或者同管理员联系。"
ShowErrs(Dvbbs.Stats)
end if

if request("password")="" then
	response.write"<SCRIPT language=JavaScript>alert('请输入密码！');"
	response.write"this.location.href='javascript:history.go(-1)';</SCRIPT>"
else
	dim UserIP,rss,sqlp,rsp
	dim username
	dim userclass
	dim password
	dim article
	dim cookies_path_s,cookies_path_d,cookies_path,usercookies
	UserIP=Request.ServerVariables("REMOTE_ADDR")
	
     password=md5(request("password"),16)

	set rss=conn.execute("select * from [DV_user] where username='"&Dvbbs.membername&"'")
	sqlp="select * from [user] where username='"&Dvbbs.membername&"' and apply=1"
	set rsp=conndown.execute(sqlp)
	if rsp.eof and rsp.bof then
		FoundErrs  "您不是付费会员或是您的账号还没有得到批准"
		ShowErrs(Dvbbs.Stats)
	elseif rss("userpassword")<>password then 
			FoundErrs  "您的密码错误，或者您的帐号已被管理员锁定。"
			ShowErrs(Dvbbs.Stats)
		else
			session("payuser")=Dvbbs.membername
			response.redirect "down_default.asp"
		end if
	end if
%>

