<%  

	dim Founderr,Errmsg
	dim Founduser
	Founduser=false
	Founderr=false
	dim membername,memberword,memberclass
	dim skin
	membername=request.cookies("aspsky")("username")
	memberword=request.cookies("aspsky")("password")
	memberclass=request.cookies("aspsky")("userclass")
	skin=request.cookies("aspsky")("skin")
	 if membername="" then
   response.redirect "../login.asp"
	else
		sql="select userclass from [user] where username='"&membername&"' and userpassword='"&memberword&"'"
		set rs=server.createobject("adodb.recordset")
		rs.open sql,conn,1,1
	 
dim money,smoney,saveday,time1,time2,daikuang,dkdu,daiday,userep,usercp,article,lockuser
    set rs=server.createobject("adodb.recordset")
    sql="select * from [user] where username='"&membername&"' "
    rs.open sql,conn,1,3
    money=rs("userwealth")
	userep=rs("userEP")
	usercp=rs("userCP")
	article=rs("article")

    rs.close
    set rs=server.createobject("adodb.recordset")
    sql="select * from [bank] where username='"&membername&"' "
    rs.open sql,conn1,1,3
    if rs.eof then
    rs.addnew
    rs("username")=membername
    rs.update
    end if
    daikuang=rs("daikuang")
    if rs("daikuang")>0 or article<100 then
    dkdu=0
    else
    dkdu=int(money*0.3+usercp*0.6+userep*0.6)
    end if
    saveday=datediff("d",rs("date"),date())
    daiday=datediff("d",rs("dkdate"),date())
    if rs.eof then
    smoney=0
    else
    smoney=rs("savemoney")
	lockuser=rs("lock")
    end if
    rs.close
	end if
%>
 