<%
'乘风多用户计数器
'作者QQ：178575
'作者EMail：yliangcf@163.com
'作者网站：http://www.qqcf.com
'详细简介：http://www.qqcf.com/cfcount.htm
'上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
'因为这些内容可能时常更新，没有放在程序里，请自己上网站上查看
%>
<%If SysCode="" Then Response.End%>

<%
PageUrl = "?Action="&Action

Set Rs= Server.CreateObject("Adodb.RecordSet")
Sql="Select * From CFCount_User Where UserName='"&UserName&"'"
Rs.Open Sql,Conn,1,1
%>
<%If Rs("Online")=0 Then Response.write "你的设置已经禁用此功能<br>"%>
<%If RsSet("OnlineKeep")=0 Then Response.write "系统已经禁用此功能"%>
<%
Myarray=Split(Application("CFCountOnline_"&UserName),"|")
TotalRs=Ubound(Myarray)

If TotalRs>1 Then
 MyArray_2=Split(Myarray(TotalRs-1),"\")
 Time_1=MyArray_2(2)
 MyArray_2=Split(Myarray(0),"\")
 Time_2=MyArray_2(2)
 TotalTime=DateDiff("n",Cdate(Time_2),Cdate(Time_1))
ElseIf TotalRs=1 Then
 MyArray_2=Split(Myarray(0),"\")
 Time_2=MyArray_2(2)
 TotalTime=DateDiff("n",Cdate(Time_2),now())
End If

Page=CLng(ChkStr(Request("Page"),2))
If Page<=0 Then Page=1
 

MyPageSize=10
MyPageSize2=10
MyPageSize3=MyPageSize

If TotalRs Mod MyPageSize=0 Then
 TotalPage=TotalRs/MyPageSize
Else
 TotalPage=Int(TotalRs/MyPageSize)+1
 MyPageSize2=TotalRs Mod MyPageSize
 If Page=TotalPage Then
  MyPageSize3=MyPageSize2
 End If
End If
I=0

If Page>TotalPage Then Page=TotalPage
%>
<table class="tb_1">
<tr class="tr_1">
<td colspan="8" >在线人数统计<%If TotalRs>1 Then Response.write "&nbsp;["&TotalTime&"分钟内有"&TotalRs&"个人访问]"%></td>
</tr>
<tr class="tr_2"> 
<td class="td_nowrap">IP</td>
<td class="td_nowrap">PV数量</td>
<td class="td_nowrap">屏幕分辨率</td>
<td class="td_nowrap">屏幕色彩</td>
<td class="td_nowrap">操作系统</td>
<td class="td_nowrap">浏览器</td>
<td class="td_nowrap">开始访问时间</td>
<td class="td_nowrap">最后访问时间</td>
</tr>
<%While I<MyPageSize3%>
<%J=(TotalPage-Page)*MyPageSize+MyPageSize2-I%>
<%
If J>0 Then
MyArray_2=Split(MyArray(J-1),"\")
If Ubound(MyArray_2)=13 Then
%>
<tr class="tr_2"> 
<td><%If Ip=MyArray_2(0) Then Response.Write "<font color=ff0000>"%><%=MyArray_2(0)%><%If Ip=MyArray_2(0) Then Response.Write "</font>"%><%If RsSet("IpArea")=-1 And J<=20 Then
		  Response.write "<br>"&GetIpArea(MyArray_2(0))
		 End If%></td>
<td><%=MyArray_2(7)%></td>
<td><%=MyArray_2(8)&"×"&MyArray_2(9)%></td>
<td><%=MyArray_2(10)%></td>
<td><%=MyArray_2(11)%></td>
<td><%=MyArray_2(12)%></td>
<td><%=GetTurnTime(Hour(Cdate(MyArray_2(2))))&":"&GetTurnTime(Minute(Cdate(MyArray_2(2))))&":"&GetTurnTime(Second(Cdate(MyArray_2(2))))%></td>
<td><%=GetTurnTime(Hour(Cdate(MyArray_2(4))))&":"&GetTurnTime(Minute(Cdate(MyArray_2(4))))&":"&GetTurnTime(Second(Cdate(MyArray_2(4))))%></td>
</tr>
<tr>
<td colspan="8">
来源：<%If MyArray_2(3)="" Then%>
直接从浏览器输入 
<%Else%><a href="?Action=urlgo&Url=<%=Server.URLEncode(MyArray_2(3))%>" target='_blank'><%=MyArray_2(3)%></a><%End If%></td>
</tr>
<tr>
<td colspan="8" style="border-bottom: 1px dotted #FF0000;padding-left:6px;empty-cells:show;">
受访页：<%If MyArray_2(5)="" Then%>
直接从浏览器输入 
<%Else%><a href="?Action=urlgo&Url=<%=Server.URLEncode(MyArray_2(5))%>" target='_blank'><%=URLDecode(MyArray_2(13))%>&nbsp;&nbsp;<%=MyArray_2(5)%></a><%End If%></td>
</tr>
<tr>
<td colspan="8" style="border-bottom: 1px dotted #FF0000;padding-left:6px;empty-cells:show;">
参数：<%=MyArray_2(6)%></td>
</tr>
<%
End If
End If

I=I+1
Wend%>
<tr> 
<td colspan="9" >(注：红色IP为你自己的IP) </td>
</tr>
</table>
        
<%
Response.write GetPageList(TotalRs,TotalPage,Page,PageUrl,Px)
%>
