<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->

<%call head()
Call saycardd("在线会员")
bbsid=request.querystring("bbsid")
	Dim Soduser11
set rs1=server.CreateObject("ADODB.RecordSet")
 rs1.Open "select topuser,toduser from ydbbs where ID="&bbsid,conn,1,1
 Soduser11=rs1("toduser")
 
 rs1.close
 set rs1=nothing

act=request.querystring("act")
dim topuser
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select topuser from ydbbs where ID="&bbsid,conn,1,1
topuser=rs("topuser")
rs.close
set rs=Nothing
If datesql=0 then
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from Users where tjj >= '"&DateAdd("n", lonline, Now())&"' and endleibie="&bbsid,conn,1,1
Else
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select * from Users where endleibie="&bbsid,conn,1,1
End if
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="bbsonline.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;bbsid="&bbsid&"&amp;tid="&tid&"&amp;act="&act&"&amp;"
	Count=rs.recordcount


response.write("本版在线" &Soduser11& "人,最高" &topuser& "人<br/>")
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
response.write("----------<br/>")
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))					
	For i=1 To PageSize     						
	If rs.eof Then Exit For				
    Response.write "<a href='uinfo.asp?id=" & rs("id") & "&amp;sid="&sid&"&amp;saytk="&saytk&"'>"&i+(page-1)*PageSize&"." & ubb(rs("name")) & "(ID:" & ubb(rs("id")) & ")</a>"
    response.write vipshow(rs("id"))
   Response.write "<br/>"
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页"
if saytk=1 then
response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"
end if
Else
    Response.write "暂时没有在线会员！<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
if tid<>"" then%>
-----------<br/>
<a href='topic.asp?sid=<%=sid%>&saytk=<%=saytk%>&amp;bbsid=<%=bbsid%>&amp;tid=<%=tid%>'>查看主帖</a> <br/>
<%end if%>
<a href='board.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;bbsid=<%=bbsid%>'>返回上级</a>
<!--#include file="fanhui.asp"-->
<%call headsay()%>