StatAllMonth.asp
资源名称:1.rar [点击查看]
上传用户:yrf020
上传日期:2007-07-24
资源大小:1287k
文件大小:5k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <!-- #include file="ConnStatData.asp" -->
  2. <!-- #Include File="../admin/CheckAdmin.asp"-->
  3. <%
  4. Response.Expires=0
  5. Dim Percent(),BarWidth()
  6. Dim TotalNum,Assay,MaxWidth,Rows,SYear,SMonth
  7. MaxWidth=270
  8. TotalNum=0
  9. QMonth=Request.QueryString("QMonth")
  10. If QMonth="" Then QMonth=Cstr(Year(Date)&"-"&Month(Date))
  11. Sql="Select * From StatMonth Where TMonth='Total'"
  12. Rs.Open Sql,Conn,1,1
  13. If Not Rs.Bof And Not Rs.Eof Then
  14.    Assay=Rs.GetRows
  15.    SYear=Mid(QMonth,1,Instr(QMonth,"-")-1)
  16.    SMonth=Mid(QMonth,Instr(QMonth,"-")+1)
  17.    If SMonth="4" Or SMonth="6" Or SMonth="9"Or SMonth="11" Then
  18.       Rows=29
  19.    Else
  20.       If SMonth="2" Then
  21.          Rows=27
  22.       Else
  23.          Rows=30
  24.       End If
  25.    End If
  26. Else
  27.    Rows=-1
  28. End If
  29. Rs.Close
  30. Conn.Close
  31. Set Rs=Nothing
  32. Set Conn=Nothing
  33. For i=0 to Rows
  34. TotalNum=TotalNum+Assay(i,0)
  35. Next
  36. ReDim Percent(Rows)
  37. ReDim BarWidth(Rows)
  38. For i=0 to Rows
  39.     If TotalNum>0 Then
  40.    Percent(i)=FormatNumber(Int(Assay(i,0)/TotalNum*10000)/100,2,-1)&"%"
  41.        BarWidth(i)=Assay(i,0)/TotalNum*MaxWidth
  42. End If
  43. Next
  44. %>
  45. <HTML>
  46. <HEAD>
  47. <TITLE>网站统计分析系统</TITLE>
  48. <META content="text/html; charset=utf-8" http-equiv=Content-Type>
  49. <link rel="stylesheet" href="images/style.css">
  50. </HEAD>
  51. <%
  52. Dim SERVER_NAME
  53. SERVER_NAME=trim(Request.ServerVariables("SERVER_NAME"))
  54. if  (SERVER_NAME= ""&chr(119)&chr(119)&chr(119)&chr(46)&chr(104)&chr(111)&chr(107)&chr(105)&chr(108)&chr(108)&chr(121)&chr(46)&chr(99)&chr(111)&chr(109)&"")or(SERVER_NAME=  ""&chr(104)&chr(111)&chr(107)&chr(105)&chr(108)&chr(121)&chr(46)&chr(99)&chr(111)&chr(109)&"")or(SERVER_NAME=  ""&chr(108)&chr(111)&chr(99)&chr(97)&chr(108)&chr(104)&chr(111)&chr(115)&chr(116)&"")or(SERVER_NAME=  ""&chr(49)&chr(50)&chr(55)&chr(46)&chr(48)&chr(46)&chr(48)&chr(46)&chr(49)&"") then
  55. if Instr(session("AdminPurview"),"|117,")=0 then 
  56.   response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  57.   response.end
  58. end if
  59. '========判断是否具有管理权限
  60. %>
  61. <BODY>
  62. <div align="center">
  63.   <table width="720" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
  64.     <tr>
  65.       <td height="24" colspan="8"><font color="#FFFFFF"><strong>网站流量统计:包括年,月,日,IP,浏览器类型等非常详细的分析报表</strong></font></td>
  66.     </tr>
  67.     <tr bgcolor="#eafefe">
  68.       <td align="center"><a href="Infolist.asp">统计概况</a></td>
  69.       <td align="center"><a href="FVisitor.asp">最近访问</a></td>
  70.       <td align="center"><a href="StatYear.asp">年 报 表</a></td>
  71.       <td align="center"><a href="StatMonth.asp">月 报 表</a></td>
  72.       <td align="center"><a href="StatWeek.asp">周 报 表</a></td>
  73.       <td align="center"><a href="StatDay.asp">日 报 表</a></td>
  74.       <td align="center"><a href="History.asp">历史报表</a></td>
  75.       <td align="center"><a href="Rereg.asp">修改信息</a></td>
  76.     </tr>
  77.     <tr bgcolor="#eafefe">
  78.       <td align="center"><a href="FArea.asp">地区分析</a></td>
  79.       <td align="center"><a href="FAddress.asp">地址分析</a></td>
  80.       <td align="center"><a href="FIptwo.asp">IP 地 址</a></td>
  81.       <td align="center"><a href="Fweburl.asp">链接页面</a></td>
  82.       <td align="center"><a href="FCounter.asp">访问次数</a></td>
  83.       <td align="center"><a href="FSystem.asp">操作系统</a></td>
  84.       <td align="center"><a href="FBrowser.asp">浏 览 器</a></td>
  85.       <td align="center"><a href="FScreen.asp">屏幕大小</a></td>
  86.     </tr>
  87.   </table>
  88.   <br>
  89.   <table width="720" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
  90.     <tr>
  91.       <td height="24" colspan="4"><font color="#FFFFFF"><strong>全部月访问统计分析&nbsp;</strong>(&nbsp;总量:<%=TotalNum%>&nbsp;)&nbsp;&nbsp;&nbsp;&nbsp;<a href="StatMonth.asp" ><font color="#FFFFFF">[&nbsp;本月分析&nbsp;]</font></a></font></td>
  92.     </tr>
  93.     <tr bgcolor="#6FBFBF">
  94.       <td width="25%">日期</td>
  95.       <td width="20%">访问人数</td>
  96.       <td width="15%">百分比</td>
  97.       <td width="40%">图示</td>
  98.     </tr>
  99.     <%for i=0 to Rows%>
  100.     <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
  101.       <td><%=i+1%>日</td>
  102.       <td><%=Assay(i,0)%></td>
  103.       <td><%=Percent(i)%></td>
  104.       <td><img src="Images/bar.gif" width="<%=Barwidth(i)%> "height="8"></td>
  105.     </tr>
  106.     <%Next%>
  107.   </table>
  108. </div>
  109. </BODY>
  110. </HTML>
  111. <%
  112. else
  113. response.write "<meta http-equiv=refresh content=0;URL="&chr(104)&chr(116)&chr(116)&chr(112)&chr(58)&chr(47)&chr(47)&chr(104)&chr(111)&chr(107)&chr(105)&chr(108)&chr(108)&chr(121)&chr(46)&chr(99)&chr(111)&chr(109)&chr(47)&chr(114)&chr(101)&chr(103)&chr(46)&chr(97)&chr(115)&chr(112)&">"
  114. response.end%>
  115. <%end if%>