📄 cf_view_pre.asp
字号:
<td class="td_1"><div align="center">
<%If Rs("LyHead")="-" Then
Response.Write "直接从浏览器输入"
Else
Response.Write "<a href=http://"&Rs("LyHead")&" target='_blank'>"&Rs("LyHead")&"</a> [<a href="&Rs("Ly")&" target='_blank'>详细</a>]"
End If%>
</div></td>
<td class="td_1"><div align="center"><%=Rs("MyCounter")%></div></td>
<td class="td_1"><img src=images/BlueBar.gif width=<%=Rs("MyCounter")/ThisDayTotal*150%> height=10><%=MyRate(Rs("MyCounter"),ThisDayTotal)%>%</td>
<td class="td_1"><div align="center"><%=GetTurnTime(Hour(Rs("AddTime")))&":"&GetTurnTime(Minute(Rs("AddTime")))&":"&GetTurnTime(Second(Rs("AddTime")))%></div></td>
<td class="td_1"><div align="center">
<%If Ip=Rs("Ip") Then Response.Write "<font color=ff0000>"%>
<%=Rs("Ip")%>
<%If Ip=Rs("Ip") Then Response.Write "</font>"%>
</div></td>
<td class="td_1"><div align="center"><%=GetTurnTime(Hour(Rs("LastTime")))&":"&GetTurnTime(Minute(Rs("LastTime")))&":"&GetTurnTime(Second(Rs("LastTime")))%></div></td>
</tr>
<%rs.movenext
wend%></form>
</table>
<%End If%>
<%If RsUser("OnlineOpen")=-1 Then%><br>
<%
Myarray=Split(Application("CFCountOnline_"&UserName),"|")
%>
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
<td colspan="8" align="center"><strong>最新在线</strong></td>
</tr>
<tr>
<td align="center"> <p align="center"><strong>序号</strong></td>
<td align="center"><strong>IP</strong></td>
<td align="center"><strong>访问次数</strong></td>
<td align="center"><strong>访问时间</strong></td>
<td align="center"><strong>来源页面</strong></td>
<td align="center"><strong>最后访问时间</strong></td>
<td align="center"><strong>最后浏览页面</strong></td>
<td align="center"><strong>共浏览几页</strong></td>
</tr>
<%
If Ubound(Myarray)>10 Then
K=Ubound(Myarray)-10
Else
K=0
End if
For I=Ubound(Myarray)-1 TO K Step -1
J=J+1%>
<%
If MyArray(I)="" Then MyArray(I)="\"
MyArray_2=Split(MyArray(I),"\")%>
<tr>
<td align="center"><%=J%></td>
<td align="center"> <%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 Then
Response.write "<br>"&GetIpArea(MyArray_2(0))
End If%>
</td>
<td align="center"><%=MyArray_2(1)%></td>
<td align="center"><%=GetTurnTime(Hour(Cdate(MyArray_2(2))))&":"&GetTurnTime(Minute(Cdate(MyArray_2(2))))&":"&GetTurnTime(Second(Cdate(MyArray_2(2))))%></td>
<td align="center"> <%If MyArray_2(3)="-" Then%>
直接从浏览器输入
<%Else%> <a href="http://<%=BreakUrl(MyArray_2(3),1)%>" target='_blank'><%=BreakUrl(MyArray_2(3),1)%></a>[<a href="<%=MyArray_2(3)%>" target='_blank'>详细</a>]
<%End If%></td>
<td align="center"><%=GetTurnTime(Hour(Cdate(MyArray_2(4))))&":"&GetTurnTime(Minute(Cdate(MyArray_2(4))))&":"&GetTurnTime(Second(Cdate(MyArray_2(4))))%></td>
<td align="center"> <%If MyArray_2(5)="-" Then%>
直接从浏览器输入
<%Else%> <a href="<%=MyArray_2(5)%>" target='_blank'><%=BreakUrl(MyArray_2(5),2)%></a>[<a href="<%=MyArray_2(5)%>" target='_blank'>详细</a>]
<%End If%></td>
<td align="center"><%=MyArray_2(6)%></td>
</tr>
<%
Next%></table>
<%End If%>
<%If RsUser("TodayHourOpen")=-1 Then%><br>
<%
AddDate=Date()
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Count_Hour where UserName='"&UserName&"' And AddDate=#"&AddDate&"#"
Set Rs=Conn.Execute(Sql)
ShowTotal=Rs(0)
IpTotal=Rs(1)
If ShowTotal=0 Then ShowTotal=1
If IpTotal=0 Then IpTotal=1
Sql="Select AddHour,AddDate From CFCount_Count_Hour Where UserName='"&UserName&"' And AddDate=#"&AddDate&"# Group By AddHour,AddDate Order By AddHour Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1
%>
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
<td colspan="4"><div align="center"><strong><%=AddDate%> 每小时报表</strong></div></td>
</tr>
<tr>
<td><div align="center"><strong>小时</strong></div></td>
<td width="134"><div align="center"><strong>显示数量</strong></div></td>
<td width="135"><div align="center"><strong>IP数量</strong></div></td>
<td><div align="center"><strong>比率</strong></div></td>
</tr>
<%
do while not rs.eof
I=I+1
Sql="Select MyCounter,IpCounter From CFCount_Count_Hour where UserName='"&UserName&"' And AddDate=#"&AddDate&"# And AddHour="&Rs("AddHour")
Set Rs1=Conn.Execute(Sql)
%>
<tr
<%if I mod 2=0 then
response.write " bgcolor='#ffffff'"
else
response.write " bgcolor='#e8e8e8'"
end if
%>>
<td><div align="center"><%=Rs("AddHour")%>-<%=Rs("AddHour")+1%></div></td>
<td><div align="center"><%=Rs1(0)%><br>
</div></td>
<td><div align="center"><%=Rs1(1)%></div></td>
<td><img src=images/BlueBar.gif width=<%=Rs1(0)/ShowTotal*350%> height=10><%=MyRate(Rs1(0),ShowTotal)%>%<br><img src=images/GreenBar.gif width=<%=Rs1(1)/IpTotal*350%> height=10><%=MyRate(Rs1(1),IpTotal)%>%</td>
</tr>
<%
rs.movenext
loop%>
<tr>
<td colspan="6" bgcolor="#FFFFFF"><div align="center">图例: <img src=images/BlueBar.gif width=30 height=10>显示数,<img src=images/GreenBar.gif width=30 height=10>IP数</div></td>
</tr>
<tr>
<td colspan="4"><div align="center"><strong><%=AddDate%>此日期</strong>:总计浏览<%=ShowTotal%>次
IP<%=IpTotal%>个</div></td>
</tr>
</table>
<%End If%>
<%If RsUser("TodayHourOpen")=-1 Then%>
<br>
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
<td colspan="4"><div align="center"><strong>日访问统计</strong>
<%
Action=Request("Action")
Px=ChkStr(request("Px"),1)
If Px="" Then Px="ID"
Call PxFilter(Px,"id,MyCounter,ipcounter,adddate")
Sql="Select * From CFCount_Count_Day Where UserName='"&UserName&"' Order By "&Px&" Desc"
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,1
If Not Rs.Eof Then
If not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
page=1
Else
Page=Int(Abs(Request("page")))
End if
rs.pagesize=10
totalrs=rs.RecordCount
totalpage=rs.pageCount
mypagesize=rs.pagesize
rs.absolutepage=page
End If
%>
<%
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Count_Day Where UserName='"&UserName&"'"
Set Rs1=Conn.Execute(Sql)
ShowTotal=Rs1(0)
IpTotal=Rs1(1)
If ShowTotal=0 Then ShowTotal=1
If IpTotal=0 Then IpTotal=1
%>
<br>
</div></td>
</tr>
<tr>
<td><div align="center"><strong>日期</strong></div></td>
<td><div align="center"><strong>显示数量</strong></div></td>
<td><div align="center"><strong>IP数量</strong></div></td>
<td><div align="center"><strong>比率</strong></div></td>
</tr>
<%While Not Rs.Eof And MyPageSize>0%>
<tr>
<td><div align="center"><%=Rs("AddDate")%></div></td>
<td><div align="center"><%=Rs("MyCounter")%><br>
</div></td>
<td><div align="center"><%=Rs("IpCounter")%></div></td>
<td><img src=images/BlueBar.gif width=<%=Rs("MyCounter")/ShowTotal*300%> height=10><%=MyRate(Rs("MyCounter"),ShowTotal)%>%<br>
<img src=images/GreenBar.gif width=<%=Rs("IpCounter")/IpTotal*300%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
</tr>
<%Rs.MoveNext
MyPageSize=MyPageSize-1
Wend%>
<tr>
<td colspan="4" bgcolor="#FFFFFF"><div align="center">图例: <img src=images/BlueBar.gif width=30 height=10>显示数,<img src=images/GreenBar.gif width=30 height=10>IP数</div></td>
</tr>
<tr>
<td colspan="4"> <%
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Count_Day Where UserName='"&UserName&"'"
Set Rs1=Conn.ExeCute(Sql)
If TotalRs=0 Then
AvgVisit=0
AvgIp=0
Else
AvgVisit=Int(Rs1(0)/TotalRs)
AvgIp=Int(Rs1(1)/TotalRs)
End If
%>
共有<%=TotalRs%>天记录,共<%=Rs1(0)%>次浏览,<%=Rs1(1)%>个IP,平均每天<%=AvgVisit%>次访问,平均每天IP<%=AvgIp%>个</td>
</tr>
<tr>
<td colspan="4">
<%
Sql="Select Top 1 IpCounter,AddDate From CFCount_Count_Day Where UserName='"&UserName&"' Order By IpCounter Desc"
Set Rs1=Conn.ExeCute(Sql)
BestHightIp=Rs1("IpCounter")
BestHightIpDate=Rs1("AddDate")
Sql="Select Top 1 IpCounter,AddDate From CFCount_Count_Day Where UserName='"&UserName&"' Order By IpCounter"
Set Rs1=Conn.ExeCute(Sql)
BestLowIp=Rs1("IpCounter")
BestLowIpDate=Rs1("AddDate")
Sql="Select Top 1 MyCounter,AddDate From CFCount_Count_Day Where UserName='"&UserName&"' And DateDiff('d',AddDate,Date())>0 Order By MyCounter Desc"
Set Rs1=Conn.ExeCute(Sql)
BestHightVisit=Rs1("MyCounter")
BestHightVisitDate=Rs1("AddDate")
Sql="Select Top 1 MyCounter,AddDate From CFCount_Count_Day Where UserName='"&UserName&"' And DateDiff('d',AddDate,Date())>0 Order By MyCounter"
Set Rs1=Conn.ExeCute(Sql)
BestLowVisit=Rs1("MyCounter")
BestLowVisitDate=Rs1("AddDate")
%></td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td valign="top"><div align="right"><a href="?UserName=<%=UserName%>&Page=1">第一页</a>
<%
if page>1 then%>
<a href='?UserName=<%=UserName%>&Page=<%=Page-1%>'>上一页</a>
<%
end if
%>
<%
if page<rs.pagecount then%>
<a href='?UserName=<%=UserName%>&Page=<%=Page+1%>'>下一页</a>
<%
end if
%>
<a href="?UserName=<%=UserName%>&Page=<%=TotalPage%>">最后一页</a>
页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页</div></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form name="form1" method="post" action="jczx.asp">
<div align="left">
<Select name="page" size="1" class=smallselsect id="select3" style='BACKGROUND-COLOR:#ffffff;font-family: 宋体; font-size: 9pt;' onChange="window.location=form.page.options[form.page.selectedIndex].value">
<%for i=1 to totalpage
response.write "<option value="&filename&"?UserName="&UserName&"&page="&i
if page=i then
response.write " selected"
end if
response.write ">转到第"& i &"页</option>"
next
%>
</select>
</div>
</form></td>
</tr>
</table></td>
</tr>
</table>
<%End If%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -