<%
'==============会员资料如下==============
dim myid,myni,cwsm,cwrq,cwxq,cwzs,cwzt,cwjkk,cwsmk,cwqg,pz,mytl,mych,myml,ye,cwhh,myjb,myjy,listnum,viewnum,review,relistnum,tjj,endleibie,keys,skey,strbbs,gulitime,hmd,vipdj,huashu,jidan,zhongzi,huazhang,huatime
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id,name,myjb,myjy,mytl,cwzt,cwxq,cwzs,spsl,dzt,cw,cwjkk,cwsmk,cwhh,cwsm,cwrq,cwqg,mych,myml,ye,hmd,vipdj,listnum,viewnum,review,relistnum,tjj,endleibie,keys,skey,strbbs,gulitime,adminzone,huashu,jidan,zhongzi,huazhang,huatime from Users where sid='"&RequestStr(sid)&"'",conn,1,1
if rs.eof then
'--------游客初始化设置--------------
myid=0
myni="登录/注册"
listnum=8
viewnum=500
relistnum=8
review=3
myjb=0
myjy=0
keys = 0
skey = 0
'--------会员初始化设置--------------
ELSE
if rs("hmd")=1 then 
  Call Error("<card title=""出错""><p>你已被全区加黑！")
  end if
myid=rs("id")             'ID
myni=rs("name")           '昵称
myjb=rs("myjb")           ' 币数
myjy=rs("myjy")           ' 经验
mytl=rs("mytl")
myml=rs("myml")
mych=rs("mych")
vipdj=rs("vipdj")           ' VIP等级
cwsm=rs("cwsm")
cwrq=rs("cwrq")
cwqg=rs("cwqg")
cwzt=rs("cwzt")
cwxq=rs("cwxq")
cwzs=rs("cwzs")
cwsmk=rs("cwsmk")
cwjkk=rs("cwjkk")
huatime=rs("huatime")
pz=rs("cw")
ye=rs("ye")
gbkq=rs("gbkq")
cwhh=rs("cwhh")
huashu=rs("huashu")
jidan=rs("jidan")
huazhang=rs("huazhang")
zhongzi=rs("zhongzi")
listnum=rs("listnum")
tjj=rs("tjj")              '在线时间
viewnum=rs("viewnum")      '帖子字数
review=rs("review")            '主帖下回复显示个数
relistnum=rs("relistnum")            '回复显示个数
endleibie=rs("endleibie")  '记录最后类别
keys=rs("keys")            '社区管理员权限
skey=rs("skey")            '版块版主权限
spsl=rs("spsl") 
dzt=rs("dzt") 
strbbs=rs("strbbs")         '犯人通辑中
gulitime=rs("gulitime")     '犯人释放时间
adminzone=rs("adminzone")
if adminzone=0 then adminzone=999999999
END IF
rs.close
set rs=nothing
'=============更新在线时间============
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 


conn.Execute("delete from online where times <= '"&DateAdd("n", lonline, Now())&"'")

END IF
'================宠物每天扣属性=====================
dim chaDays
chaDays = DateDiff("d", tjj, now())
if chaDays >= 1 then
'宠物每天扣点
conn.execute("update Users Set cwsm =cwsm-cwsm*0.01*"&cwkblx&" where ID="&myid)
conn.execute("update Users Set cwxq =cwxq-cwxq*0.01*"&cwkblx1&" where ID="&myid)
conn.execute("update Users Set cwqg =cwqg-cwqg*0.01*"&cwkblx2&" where ID="&myid)
conn.execute("update Users Set cwzs =cwzs-cwzs*0.01*"&cwkblx3&" where ID="&myid)
conn.execute("update Users Set cwrq =cwrq-cwrq*0.01*"&cwkblx4&" where ID="&myid)
end if


'============用户解锁============
  if strbbs <> 0 and gulitime <= now() then
    set rs=server.CreateObject("ADODB.RecordSet")
    rs.Open "select ID from hmd where guliid = "&myid,conn,1,2
    if not rs.eof then
      rs.delete
      rs.update
    end if
    rs.close
    set rs=nothing
  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



function hydtmsg()

set fs=server.createobject("scripting.filesystemobject")
file=server.mappath("/index.inc")
set txt=fs.opentextfile(file,1,true)
if not txt.atendofstream then
line=txt.readline
response.write line & "<br/>"
end if
end function

function grdtmsg()
set fs=server.createobject("scripting.filesystemobject")
file=server.mappath("/msg/"&MYID&".txt")
set txt=fs.opentextfile(file,1,true)
if not txt.atendofstream then
line=txt.readline
response.write line & "<br/>"
end if
end Function
function qqcd()
'检查有几条新留言
dim newguest
newguest = 0
if saytk<>1 then
%>
       <div style="background-color:#<%=them11%>">
<%
end If

if myid<>0 then
  newguest = fornewguest(myid)
End If

if myid<>0 then
set rs1=server.createobject("adodb.recordset")
 rs1.open "select id from users where '"&datediff("n",tjj , now())&" >= "&lonline&"' and id="&ids,conn,1,1
if not rs1.eof then
response.write "<img src='/bbs/images/on1.gif' alt='在线'/>"
else
response.write "<img src='/bbs/images/off1.gif' alt='离线'/>"
end if
rs1.close
set rs1=nothing
response.write "<a href='/bbs/myfriend.asp?sid=" & sid & "&amp;saytk="&saytk&"'>"&myid&"</a>"
end if
if myid<>0 then
if newguest > 0 then
response.write "<a href='/bbs/msgview.asp?url="&replace(replace(r_url(),"sid=","sidoo="),"sid=","sidoo=")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>("&newguest&")</a>"
end if
dim myfr
myfr= conn.execute("select count(id) from [myfriend] where cid="&myid)(0)
response.write "<a href='/bbs/show.asp?sid="&sid&"&amp;saytk="&saytk&"'> <img src='/bbs/home.gif' alt='.'/>家园 </a>"
response.write "<a href='/bbs/blog/index.asp?sid="&sid&"&amp;saytk="&saytk&"'><img src='/bbs/images/zone.gif' alt='.'/>"
Dim M_zonedt_my
M_zonedt_my=conn.execute("Select count(ID) from [zonedt_my] where yid=0 and gid="&myid)(0)

if M_zonedt_my<>0 then
Response.write "("&M_zonedt_my&")"
else
Response.write "(0)"
end if
response.write"</a><br/>"&chr(13)



else
response.write "<a href='../bbs/login.asp?saytk="&saytk&"&amp;url=/index.asp'>登陆</a>|<a href='/bbs/login.asp?saytk="&saytk&"&amp;url=/index.asp'>注册</a><br/>"
end if
if saytk<>1 then
%>
</span>
</div>
<%
end If
End function

%><!--#INCLUDE file="online.asp"-->