%
’虚拟访客 Start
onlinestat = 1 ’1=开 0=关
if onlinestat=1 then
online_user = 50
online_minuser = 20
online_maxuser = 50
online_truenum=Conn.Execute("select count(username) from online where username=’’")(0)
if online_truenum<=online_user then
randomize
online_num=0
do while online_numonline_maxuser
online_num=int(rnd*online_maxuser+1)
loop
for onlinenum=1 to online_num
randomize
online_forumcount=Conn.Execute("select count(id) from [forum]")(0)
online_id=int(rnd*online_forumcount+1)
sql9="Select * From forum where id="&online_id
Set Rs9=Conn.Execute(sql9)
if not rs9.eof then
online_forumid=rs9("forumid")
online_topic=rs9("topic")
online_postip=rs9("postip")
online_acturl="ShowPost.asp?id="&online_id
else
online_forumid=0
online_topic=""
online_postip="218.91.23.84"
online_acturl="ShowForum.asp?forumid="&online_forumid
end if
rs9.close
if online_forumid=0 then
online_forumid=Conn.Execute("select top 1 forumid from [forum] order by id desc")(0)
online_acturl="ShowForum.asp?forumid="&online_forumid
end if
sql="select * from online"
rs.Open sql,Conn,1,3
rs.Addnew
rs("forumid")=online_forumid
rs("username")=""
rs("sessionid")=session.sessionid
rs("ip")=online_postip
rs("act")=online_topic
rs("acturl")=online_acturl
sql8="Select * From bbsconfig where id="&online_forumid
Set Rs8=Conn.Execute(sql8)
if not rs8.eof then
online_bbsname=rs8("bbsname")
end if
rs8.close
rs("bbsname")=online_bbsname
rs.update
rs.close
next
end if
end if
’虚拟访客 End
%>