📄 cf_manage_2.asp
字号:
While Not Rs.Eof And MyPageSize>0
%>
<tr
<%If MyPageSize Mod 2=0 Then
Response.Write " bgcolor='#ffffff'"
Else
Response.Write " bgcolor='#e8e8e8'"
End If
%>>
<td class="td_1"><div align="center"><%=Rs.RecordCount-Rs.Pagesize*(page)+mypagesize%></div></td>
<td class="td_1"><div align="center">
<%
Response.Write "<a href="&Rs("WebUrl")&" target='_blank'>"&Left(BreakUrl(Rs("WebUrl"),2),30)&"</a> [<a href="&Rs("WebUrl")&" target='_blank'>详细</a>]"
%>
</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("LastTime")))&":"&GetTurnTime(Minute(Rs("LastTime")))&":"&GetTurnTime(Second(Rs("LastTime")))%></div></td>
</tr>
<%rs.movenext
mypagesize=mypagesize-1
wend%>
<tr
<%If MyPageSize Mod 2=0 Then
Response.Write " bgcolor='#ffffff'"
Else
Response.Write " bgcolor='#eeeeee'"
End If
%>>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td valign="top"><div align="right"><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=<%=Px%>&Page=1">第一页</a>
<%
if page>1 then%>
<a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=<%=Px%>&Page=<%=Page-1%>'>上一页</a>
<%
end if
%>
<%
if page<rs.pagecount then%>
<a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=<%=Px%>&Page=<%=Page+1%>'>下一页</a>
<%
end if
%>
<a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=<%=Px%>&Page=<%=totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=page%></font>/<%=totalpage%>页 共<%=totalrs%>条记录 每页显示<%=rs.pagesize%>条</div></td>
<form name="form1" method="post" action="jczx.asp">
<td>
<Select name="page" size="1" id="page" onChange="window.location=form.page.options[form.page.selectedIndex].value">
<%for i=1 to totalpage
response.write "<option value="&filename&"?Action="&Action&"&AddDate="&AddDate&"&Px="&Px&"&Page="&i
if page=i then
response.write " selected"
end if
response.write ">转到第"&i&"页</option>"
next
%>
</select>
</td>
</form>
</tr>
</table>
<%End If%>
<%If Action="daytj" Then%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<tr>
<td bgcolor="#FFFFFF">
<%
Sql="Select Sum(MyCounter),Sum(IpCounter),Count(ID) From CFCount_Count_Day Where UserName='"&UserName&"'"
Set Rs=Conn.ExeCute(Sql)
If TotalRs=0 Then
AvgVisit=0
AvgIp=0
Else
AvgVisit=Int(Rs(0)/TotalRs)
AvgIp=Int(Rs(1)/TotalRs)
End If
ShowTotal=Rs(0)
IpTotal=Rs(1)
If ShowTotal=0 Then ShowTotal=1
If IpTotal=0 Then IpTotal=1
%>
共有<%=Rs(2)%>天记录,共<%=Rs(0)%>次浏览,<%=Rs(1)%>个IP,平均每天<%=AvgVisit%>次访问,平均每天IP<%=AvgIp%>个</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> <%
Sql="Select Top 1 IpCounter,AddDate From CFCount_Count_Day Where UserName='"&UserName&"' Order By IpCounter Desc"
Set Rs1=Conn.ExeCute(Sql)
If Not Rs1.Eof Then
BestHightIp=Rs1("IpCounter")
BestHightIpDate=Rs1("AddDate")
Else
BestHightIp=0
BestHightIpDate=""
End If
Rs1.Close
Sql="Select Top 1 IpCounter,AddDate From CFCount_Count_Day Where UserName='"&UserName&"' Order By IpCounter"
Set Rs1=Conn.ExeCute(Sql)
If Not Rs1.Eof Then
BestLowIp=Rs1("IpCounter")
BestLowIpDate=Rs1("AddDate")
Else
BestLowIp=0
BestLowIpDate=""
End If
Rs1.Close
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)
If Not Rs1.Eof Then
BestHightVisit=Rs1("MyCounter")
BestHightVisitDate=Rs1("AddDate")
Else
BestHightVisit=0
BestHightVisitDate=""
End If
Rs1.Close
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)
If Not Rs1.Eof Then
BestLowVisit=Rs1("MyCounter")
BestLowVisitDate=Rs1("AddDate")
Else
BestLowVisit=0
BestLowVisitDate=""
End If
Rs1.Close
%> </td>
</tr>
</table>
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
<td colspan="4"><div align="center"><strong>日访问统计[可点击标题排序]</strong>
<%
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
%>
<br>
</div></td>
</tr>
<tr>
<td><div align="center"><a href="?Action=<%=Action%>&Px=AddDate"><strong>日期</strong></a></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&Px=MyCounter">显示数量</a></strong></div></td>
<td><div align="center"><a href="?Action=<%=Action%>&Px=IpCounter"><strong>IP数量</strong></a></div></td>
<td><div align="center"><a href="?Action=<%=Action%>&Px=MyCounter"><strong>在十天内的比率</strong></a></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">
</td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td valign="top"><div align="right"><a href="?Action=<%=Action%>&Px=<%=Px%>&Page=1">第一页</a>
<%
if page>1 then%>
<a href='?Action=<%=Action%>&Px=<%=Px%>&Page=<%=Page-1%>'>上一页</a>
<%
end if
%>
<%
if page<rs.pagecount then%>
<a href='?Action=<%=Action%>&Px=<%=Px%>&Page=<%=Page+1%>'>下一页</a>
<%
end if
%>
<a href="?Action=<%=Action%>&Px=<%=Px%>&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&"?action="&action&"&px="&px&"&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%>
<%If Action="monthtj" Then%>
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
<td colspan="4"><div align="center"><strong>最近12个月访问统计</strong> <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><strong>在12个月内的比率及数量</strong></td>
</tr>
<%
ShowTotal=0
IpTotal=0
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Count_Day Where UserName='"&UserName&"' And DateDiff('m',AddDate,Date())<12"
Set Rs=Conn.Execute(Sql)
ShowTotal=Rs(0)
IpTotal=Rs(1)
If ShowTotal=0 Then ShowTotal=1
If IpTotal=0 Then IpTotal=1
For I=0 To 11
CurrMonth=Dateadd("m",-I,Date())
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Count_Day Where UserName='"&UserName&"' And DateDiff('m',AddDate,'"&CurrMonth&"')=0"
Set Rs=Conn.ExeCute(Sql)
%>
<tr>
<td><div align="center"><%=year(CurrMonth)&"-"&month(CurrMonth)%></div></td>
<td><div align="center"><%=Rs(0)%></div></td>
<td><div align="center"><%=Rs(1)%></div></td>
<td><img src=images/BlueBar.gif width=<%=Rs(0)/ShowTotal*300%> height=10><%=MyRate(Rs(0),ShowTotal)%>%<br><img src=images/GreenBar.gif width=<%=Rs(1)/IpTotal*300%> height=10><%=MyRate(Rs(1),IpTotal)%>%</td>
</tr>
<%Next%>
<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"> 共<%=ShowTotal%>次浏览,<%=IpTotal%>个IP,平均每月<%=Int(ShowTotal/12)%>次访问,平均每月IP<%=Int(IpTotal/12)%>个</div></td>
</tr>
</table>
<%end if%>
<%if Action="hourtj" then%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<form name="form1" method="post" action="jczx.asp">
<td>选择查询日期
<Select name="a" size="1" onChange="window.location=form.a.options[form.a.selectedIndex].value">
<%Sql="Select AddDate From CFCount_Count_Hour Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
Response.Write "<option value='"&filename&"?Action="&Action&"&AddDate="&Rs("AddDate")&"'"
If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
</select> </td>
</form>
</tr>
</table>
<%
AddDate=ChkStr(Request("AddDate"),3)
If AddDate="" Then 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 bgcolor="#FFFFFF"><div align="center"><strong>小时</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>显示数量</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>IP数量</strong></div></td>
<td bgcolor="#FFFFFF"><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)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -