StatYear.asp
上传用户:mtjhgs
上传日期:2021-12-08
资源大小:3755k
文件大小:4k
源码类别:

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

开发平台:

HTML/CSS

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