<%
'==============会员资料如下==============
dim myid,myni,myjb,myjy,listnum,viewnum,review,relistnum,tjj,endleibie,keys,skey,ChatID,vipdj,vipdate,bank,bankjie,centmm
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from Users where sid='"&RequestStr(sid)&"'",conn,1,1
if rs.eof then
response.redirect "http://"&Request.ServerVariables("SERVER_NAME")&"/bbs/login.asp?saytk="&saytk&"&amp;login=err&url="&Replace(Replace(R_url(),"saytk","sayou"),"sid=","sidoo=")&""
end if
if rs("hmd")=1 then 
  Call Error("<card title=""出错""><p>你已被全区加黑！")
  end if
myid=rs("id")             'ID
myni=rs("name")           '昵称
myjb=rs("myjb")           ' 币数
rmbcent=rs("rmbcent")           ' 钱数
myjy=rs("myjy")           ' 经验
vipdj=rs("vipdj")           ' VIP等级
vipdate=rs("vipdate")           ' VIP等级
ydzq=rs("ydzq")           
bank=rs("bank")     
bankjie=rs("bankjie")     
centmm=rs("centmm")     
listnum=rs("listnum")
tjj=rs("tjj")              '在线时间
ChatID=rs("ChatID")        '最后聊天ID
viewnum=rs("viewnum")      '帖子字数
review=rs("review")            '主帖下回复显示个数
relistnum=rs("relistnum")            '回复显示个数
endleibie=rs("endleibie")  '记录最后类别
newmyjy=rs("myjy")            '会员经验
keys=rs("keys")            '社区管理员权限
skey=rs("skey")            '版块版主权限
vss=rs("vss")            '是否显示会员动态0是1否
adminzone=rs("adminzone")
if adminzone=0 then adminzone=999999999
rs.close
set rs=nothing

'=======================================
if vipdj=0 then
if clng(getvip(myjb+bank,myjy))<=0 then
conn.Execute("update Users set vipface=0 Where id=" & myid)
elseif clng(getvip(myjb+bank,myjy))>0 and clng(getvip(myjb+bank,myjy))<=5 then
conn.Execute("update Users set vipface=1 Where id=" & myid)
END IF
else
if vipdate="" then vipdate="2050-1-1 11:11:11"
if now()>vipdate or vipdate="" then
conn.Execute("update Users set vipface=0,vipdj=0 Where id=" & myid)
end if
END IF

'=============更新在线时间============
dim DiffEnd
DiffEnd = 100
if tjj <> "" then
  DiffEnd = DateDiff("s", tjj, NOW())
else
  tjj = (Now() - 1)
end if

IF DiffEnd >= 50 THEN
if dateSQL="1" then
conn.Execute("update Users set loginIP='"&User_Ip&"',tjj=now() Where id=" & myid)
else
conn.Execute("update Users set loginIP='"&User_Ip&"',tjj=getdate() Where id=" & myid)
end if
END IF
dim chaDays
chaDays = DateDiff("d", tjj, now())
if chaDays >= 1 then

'银行利息加币,减币
if bank<=10000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx&" where ID="&myid)
end if
if bank>10000 and bank<=50000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx1&" where ID="&myid)
end if
if bank>50000 and bank<=300000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx2&" where ID="&myid)
end if
if bank>300000 and bank<=500000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx3&" where ID="&myid)
end if
if bank>500000 and bank<=1000000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx4&" where ID="&myid)
end if
if bank>1000000 and bank<=3000000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx5&" where ID="&myid)
end if
if bank>3000000 then
conn.execute("update Users Set bank = bank + bank*0.01*"&centlx6&" where ID="&myid)
end if

conn.execute("update Users Set bankjie = bankjie + bankjie*0.01*"&centlxdk&" where ID="&myid)
end if

if bbsopera<>"http://" And keys <> 1 And keys<>2 Then'社区管理员不禁止
browsers=Lcase(Left(Request.ServerVariables("HTTP_USER_AGENT"),4))
browsers2=Lcase(Request.ServerVariables("HTTP_USER_AGENT"))

if browsers="oper"  or  browsers="winw"  or  browsers="wapi" or browsers="mc21" or browsers="up.b" or browsers="upg1" or browsers="upsi" or browsers="qwap" or browsers="jigs" or browsers="java" or browsers="alca" or browsers="wapj" or browsers="cdr/" or browsers="nec-" or browsers="fetc" or browsers="r380" or browsers="winw" or browsers="mozi" or browsers="mozi" or browsers="m3ga" OR instr(browsers2,"msie")>0 or instr(browsers2,"openwave")>0 or instr(browsers2,"oper")>0 or instr(browsers2,"winw")>0 then
response.redirect bbsopera
end if
end if
%>
<!--#include file="sever.asp"-->
<!--#INCLUDE file="online.asp"-->