<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%
call head()
Call saycarda("在线用户")
%>



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

response.write"==在线用户管理==<br/>"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open"select * from online  order by times desc",conn,1,1 
If Not rs.eof Then
	Dim PageSize,i,IpArrayubbs,IpArraysys
	PageSize=10						
	Dim Count,page,pagecount,gopage		
	
	gopage="online.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=rs.recordcount	

	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	
IpArrayubbs=rs("onlineip")
IpArraysys=split(IpArrayubbs,".")
syip1s=ubb(IpArraysys(0))
syip2s=ubb(IpArraysys(1)) 
syip3s=ubb(IpArraysys(2))
syip4s=ubb(IpArraysys(3))
response.write""&i+(page-1)*PageSize&"."

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

If saytk<>1 Then
response.write "<br/>IP："&ubb(IpArrayubbs)&"<br/>"

Response.write "<form name=""form"" method=""post"" action=""srcip.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;ipaddr="&ubb(IpArrayubbs)&""">"
response.write "<input type=""submit"" name=""Submit"" value=""查询""></form>"

Response.write "<form name=""form"" method=""post"" action=""../tools/IpLock.Asp?operate=save&amp;saytk="&saytk&"&amp;sid="&sid&""">"
response.write "<input type=""hidden"" name=""ip1"" value="""&syip1s&""">"
response.write "<input type=""hidden"" name=""ip2"" value="""&syip2s&""">"
response.write "<input type=""hidden"" name=""ip3"" value="""&syip3s&""">"
response.write "<input type=""hidden"" name=""ip4"" value="""&syip4s&""">"
response.write "<input type=""hidden"" name=""ipsame"" value=""4"">"
response.write "<input type=""hidden"" name=""reason"" value=""&#x624B;&#x52A8;&#x52A0;&#x9ED1;"">"
response.write "<input type=""submit"" name=""Submit"" value=""封锁""></form><br/>"

else

response.write "<br/>IP："&ubb(IpArrayubbs)&"<br/><anchor><go href=""srcip.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;ipaddr="&ubb(IpArrayubbs)&""" method=""get""></go>查询</anchor>"&chr(13)

response.write "<anchor><go href=""../tools/IpLock.Asp?operate=save&amp;saytk="&saytk&"&amp;sid="&sid&""" method=""post""><postfield name=""ip1"" value="""&syip1s&""" /><postfield name=""ip2"" value="""&syip2s&""" /><postfield name=""ip3"" value="""&syip3s&""" />	<postfield name=""ip4"" value="""&syip4s&""" /><postfield name=""ipsame"" value=""4"" />	<postfield name=""reason"" value=""&#x624B;&#x52A8;&#x52A0;&#x9ED1;"" /></go>封锁</anchor><br/>"
End if
	rs.moveNext



 	Next
response.write"共"&Count&"人,"&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
conn.close
set conn=nothing
response.write"----------------"
%><!--#include file="fanhui.asp"-->
<%Call headsay()%>