<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<%
call head()
Call saycarda("在线会员")

%>

<!--#INCLUDE file="sy1.asp"-->
<%
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;saytk="&saytk&"&sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"关注了(url=/bbs/hy.asp?saytk="&saytk&"&sid=[sid])在线会员(/url)')")





function onlineCou()
Dim onlineCounts
onlineCounts = conn.execute("Select count(ID) from [online] where [online]=1")(0)
response.write "当前在线会员[" & onlineCounts & "]人" & Chr(13)
end function
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open"select * from online where online=1 order by times desc",conn,1,1


If Not rs.eof Then
	Dim PageSize,i
	PageSize=5						
	Dim Count,page,pagecount,gopage		
	gopage="hy.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=rs.recordcount	
response.write "当前在线会员 共["&Count&"]人<br/>"
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		

	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount

	rs.move(pagesize*(page-1))		
			
	For i=1 To PageSize     						
	If rs.eof Then Exit For	
response.write "["&i+(page-1)*PageSize&"]."

if rs("online")=1 then
response.write ""&vipshow(rs("userid"))&""
response.write "<a href=""uinfo.asp?id="&rs("userid")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"&ubb(rs("name"))&"(ID:"&rs("userid")&")</a><br/>"

else
response.write "<a href=""uinfo.asp?id="&rs("userid")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"&ubb(rs("name"))&"</a><br/>"
end If
Dim photoview,mycity
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.open"select * from users where id="&rs("userid"),conn,1,1
sex=rs1("sex")
photoview=rs1("photo")
mycity=rs1("city")
rs1.close
set rs1=nothing
if len(photoview)>10 then
Response.write "<img src="""&ubb(photoview)&""" alt="".""/><br/>"
else
if sex=1 then
Response.write "<img src=""/img/boy.gif"" alt="".""/><br/>"
else
if sex=2 then
Response.write "<img src=""/img/girl.gif"" alt="".""/><br/>"
else
Response.write "<img src=""/img/nophoto.gif"" alt="".""/><br/>"
end if
end if
end If
If mycity<>"" then
response.write "城市:"&mycity&"<br/>"
Else
response.write "城市:保密<br/>"
End If
response.write "性别:"
if sex=1 then 
response.write "帅哥"
elseif sex=2 then 
response.write "靓女"
else
response.write "保密"
end if
response.write "<br/>最后活动时间:["
response.write date_dongtai(rs("times"))
			   response.write"前]<br/>"

if keys=1 or keys=2 then
response.write "IP:"&rs("onlineip")&"<br/>"
end If

If saytk>1 Then response.write "<div class=""ad""></div>"
	rs.moveNext
 	Next
response.write "第"&page&"页/共有"&pagecount&"页<br/>"
	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/>页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"

Else
response.write "暂无在线用户！<br/>"
end if
rs.close
set rs=nothing
If saytk>1 Then
response.write "<div class=""path"">"
else
response.write "-------------<br/>"
End if
Call onlineCoun11()

If saytk>1 Then response.write "</div>-------------"
conn.close
set conn=nothing
%>
<!--#include file="fanhui.asp"-->
<%
call headsay()
%>