⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_counter.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
   CurrentPath = CurrentPath &">> 全部年访问统计报表"
End If
rsReport.Close()
If ReportCmd(0) <> 1 Then
   Set rsReport = Nothing
   Set ReportCmd = Nothing
   EL_Common.ShowErrorMsg("没有"& TheYear &"年的数据")
   Exit Sub
End If
rsReport.Open()
TotalNum = 0
For i = 1 To 12
   ArrMonth(i) = rsReport(CStr(i))
   TotalNum = TotalNum + ArrMonth(i)
Next
rsReport.Close()
Set rsReport = Nothing
Set ReportCmd = Nothing
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td width="88%"><%=CurrentPath%></td>
    <td width="12%" align="right" nowrap>
      <select name="yyyy" id="yyyy">
	  <%
		For i = 2005 To Year(Date())
		   Response.Write "<option value='"& i &"' selected>"& i &"年</option>"
		Next
	  %>
      </select>
	  <input type="submit" name="Submit7" value="查询" onClick="location.href='Admin_Counter.asp?Action=Year&yyyy='+getObject('yyyy').value">
	</td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
  <tr>
    <td width="17%" class="top_25"><strong>月份</strong></td>
    <td width="24%" class="top_25"><strong>访问次数</strong></td>
    <td width="19%" class="top_25"><strong>百分比</strong></td>
    <td width="40%" class="top_25"><strong>图示</strong></td>
  </tr>
  <%
    For i = 1 To 12
	   Percent = FormatNumber(ArrMonth(i)/TotalNum*100, 2, -1) &"%"
  %>
  <tr>
    <td class="item_25">
	<%
	  If ReportType = 1 Then
	     Response.Write TheYear &"年"& i &"月"
	  Else
	     Response.Write i &"月"
	  End If
	%>
	</td>
    <td class="item_25"><%=ArrMonth(i)%></td>
    <td class="item_25"><%=Percent%></td>
    <td class="item_25"><div style="width:<%=Percent%>; background:blue; font-size:xx-small; color:blue; height:8px;"><img src="Images/blank.gif"></div></td>
  </tr>
  <%
    Next
  %>
</table>
<%
EL_Common.ShowScriptError()
End Sub

Sub ShowVisitorInfo()
On Error Resume Next
Dim VisitorCmd, rsVisitor
Dim VisitorID, ComeInTime, ClientIp, Address, System, Browser, Color, Screen, Mozilla, Referer
VisitorID = EL_Common.ELRequest("VisitorID", 2)

Call EL_Common.InitCommonCmd(VisitorCmd, rsVisitor, "EL_CounterVisitor", "*", "VisitorID="& VisitorID)
rsVisitor.Close()
If VisitorCmd(0) <> 1 Then
   Set rsVisitor = Nothing
   Set VisitorCmd = Nothing
   EL_Common.ShowErrorMsg("指定记录不存在")
   Exit Sub
End If
rsVisitor.Open()
ComeInTime = rsVisitor("ComeInTime")
ClientIp = rsVisitor("ClientIp")
Address = rsVisitor("Address")
System = rsVisitor("System")
Browser = rsVisitor("Browser")
Color = rsVisitor("Color")
Screen = rsVisitor("Screen")
Mozilla = rsVisitor("Mozilla")
Referer = rsVisitor("Referer")
rsVisitor.Close()
Set rsVisitor = Nothing
Set VisitorCmd = Nothing
CurrentPath = CurrentPath &">> 访问记录详细信息"
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td><%=CurrentPath%></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
  <tr>
    <td colspan="2" class="top_25"><strong>访问记录详细信息</strong></td>
  </tr>
  <tr>
    <td width="16%" class="td_ItemName">来访时间</td>
    <td width="84%" class="item_25"><%=ComeInTime%></td>
  </tr>
  <tr>
    <td class="td_ItemName">客户端IP</td>
    <td class="item_25"><%=ClientIp%></td>
  </tr>
  <tr>
    <td class="td_ItemName">详细地址</td>
    <td class="item_25"><%=Address%></td>
  </tr>
  <tr>
    <td class="td_ItemName">操作系统</td>
    <td class="item_25"><%=System%></td>
  </tr>
  <tr>
    <td class="td_ItemName">浏览器</td>
    <td class="item_25"><%=Browser%></td>
  </tr>
  <tr>
    <td class="td_ItemName">屏幕色彩</td>
    <td class="item_25"><%=Color%></td>
  </tr>
  <tr>
    <td class="td_ItemName">屏幕大小</td>
    <td class="item_25"><%=Screen%></td>
  </tr>
  <tr>
    <td class="td_ItemName">客户端信息</td>
    <td class="item_25"><%=EL_Common.ServerHTMLEncode(Mozilla)%></td>
  </tr>
  <tr>
    <td class="td_ItemName">链接页面</td>
    <td class="item_25"><%=EL_Common.ServerHTMLEncode(Referer)%></td>
  </tr>
  <tr>
    <td class="td_ItemName">&nbsp;</td>
    <td class="td_50"><label>
      <input type="submit" name="Submit6" value=" 返 回 " onClick="history.back()">
    </label></td>
  </tr>
</table>
<%
EL_Common.ShowScriptError()
End Sub

Sub Record()
On Error Resume Next
Dim ManageCmd, rsManage, i, StrFields, StrCondition, TempString
Dim PageCounts, RowCount, TotalRowCount
TempString = ""
StrFields = "VisitorID,ComeInTime,ClientIp,Address,Referer"
StrCondition = "1=1"

Call EL_Common.InitCommand(ManageCmd, "EL_SP_SplitPage")
With ManageCmd
  .Parameters.Append .CreateParameter("RETURN", 3, 4, 4)
  .Parameters.Append .CreateParameter("@Tables", 200, 1, 50, "EL_CounterVisitor")
  .Parameters.Append .CreateParameter("@PrimaryKey", 200, 1, 20, "VisitorID")
  .Parameters.Append .CreateParameter("@Sort", 200, 1, 200, "ComeInTime DESC")
  .Parameters.Append .CreateParameter("@CurrentPage", 3, 1, 4, CurrentPage)
  .Parameters.Append .CreateParameter("@PageSize", 3, 1, 4, PageSizes)
  .Parameters.Append .CreateParameter("@Fields", 200, 1, 1000, StrFields)
  .Parameters.Append .CreateParameter("@Filter", 200, 1, 1000, StrCondition)
  .Parameters.Append .CreateParameter("@Group", 200, 1, 1, "")
  .Parameters.Append .CreateParameter("@TotalRowCount", 3, 2, 4)
  .Parameters.Append .CreateParameter("@PageCount", 3, 2, 4)
  Set rsManage = .Execute()
End With
rsManage.Close()
RowCount = ManageCmd(0)
TotalRowCount = ManageCmd(9)
PageCounts = ManageCmd(10)

CurrentPath = CurrentPath &">> 访问记录"
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td><%=CurrentPath%></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
  <tr>
    <td width="19%" align="center" class="top_item"><strong>访问时间</strong></td>
    <td width="14%" align="center" class="top_item"><strong>客户端IP</strong></td>
    <td width="19%" align="center" class="top_item"><strong>详细地址</strong></td>
    <td width="41%" align="center" class="top_item"><strong>链接页面</strong></td>
    <td width="7%" align="center" class="top_item"><strong>操作</strong></td>
  </tr>
  <%
   If RowCount = 0 Then
      Response.Write "<tr><td class=td_50 colspan=5 align=center>没有任何记录</td></tr>"
   Else
      rsManage.Open()
	  For i = 1 To RowCount
  %>
  <tr class="td_25" onMouseOut="this.className='td_25'" onMouseOver="this.className='MouseOver_25'">
    <td align="center"><%=rsManage("ComeInTime")%></td>
    <td align="center"><%=rsManage("ClientIp")%></td>
    <td align="center"><%=rsManage("Address")%></td>
    <td style="padding-left:5px;" title="<%=rsManage("Referer")%>"><%=Left(rsManage("Referer"), 50)%></td>
    <td align="center"><a href="Admin_Counter.asp?Action=ShowVisitorInfo&VisitorID=<%=rsManage("VisitorID")%>">详情</a></td>
  </tr>
  <%
         If i<RowCount Then rsManage.MoveNext
	  Next
	  rsManage.Close()
   End If
  %>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td align="right"><%Call EL_Common.ShowPage(URLParameters, CurrentPage, PageSizes, PageCounts, TotalRowCount, "数据", "条")%></td>
  </tr>
</table>
<%
Set rsManage = Nothing
Set ManageCmd = Nothing
EL_Common.ShowScriptError()
End Sub

Sub Colligate()
On Error Resume Next
Dim CounterCmd, rsCounter
Dim CommonSystem, CommonSystemNum, CommonBrowser, CommonBrowserNum, CommonAddress, CommonAddressNum, CommonRefer, CommonReferNum, CommonScreen, CommonScreenNum, CommonColor, CommonColorNum, CounterDayNum
Dim StartDate, TotalIp, TotalView, TodayNum, TodayView, MaxMonthNum, MaxMonthName, MaxDayNum, MaxDayName, MaxHourNum, MaxHourName
Dim TheMonthName, TheMonthNum, MaxDayNumOfTheMonth, MaxDayNameOfTheMonth

Call EL_Common.InitCommonCmd(CounterCmd, rsCounter, "EL_CounterConfig", "*", "1=1")
StartDate = rsCounter("StartDate")
TotalIp = rsCounter("TotalIp")
TotalView = rsCounter("TotalView")
TodayNum = rsCounter("TodayNum")
TodayView = rsCounter("TodayView")
MaxMonthNum = rsCounter("MaxMonthNum")
MaxMonthName = rsCounter("MaxMonthName")
MaxDayNum = rsCounter("MaxDayNum")
MaxDayName = rsCounter("MaxDayName")
MaxHourNum = rsCounter("MaxHourNum")
MaxHourName = rsCounter("MaxHourName")
TheMonthName = rsCounter("TheMonthName")
TheMonthNum = rsCounter("TheMonthNum")
MaxDayNumOfTheMonth = rsCounter("MaxDayNumOfTheMonth")
MaxDayNameOfTheMonth = rsCounter("MaxDayNameOfTheMonth")
rsCounter.Close()
Set rsCounter = Nothing
Set CounterCmd = Nothing

Dim rsCommon

CommonSystem = "无"
CommonSystemNum = 0
CommonBrowser = "无"
CommonBrowserNum = 0
CommonAddress = "无"
CommonAddressNum = 0
CommonRefer = "无"
CommonReferNum = 0
CommonScreen = "无"
CommonScreenNum = 0
CommonColor = "无"
CommonColorNum = 0

Set rsCommon = Conn.Execute("SELECT TOP 1 SystemName,Num FROM EL_CounterSystem ORDER BY Num DESC")
If Not rsCommon.EOF And Not rsCommon.BOF Then
   CommonSystem = rsCommon(0)
   CommonSystemNum = rsCommon(1)
End If
rsCommon.Close()


Set rsCommon = Conn.Execute("SELECT TOP 1 BrowserName,Num FROM EL_CounterBrowser ORDER BY Num DESC")
If Not rsCommon.EOF And Not rsCommon.BOF Then
   CommonBrowser = rsCommon(0)
   CommonBrowserNum = rsCommon(1)
End If
rsCommon.Close()

Set rsCommon = Conn.Execute("SELECT TOP 1 Address,Num FROM EL_CounterAddress ORDER BY Num DESC")
If Not rsCommon.EOF And Not rsCommon.BOF Then
   CommonAddress = rsCommon(0)
   CommonAddressNum = rsCommon(1)
End If
rsCommon.Close()

Set rsCommon = Conn.Execute("SELECT TOP 1 ReferURL,Num FROM EL_CounterRefer ORDER BY Num DESC")
If Not rsCommon.EOF And Not rsCommon.BOF Then
   CommonRefer = rsCommon(0)
   CommonReferNum = rsCommon(1)
End If
rsCommon.Close()

Set rsCommon = Conn.Execute("SELECT TOP 1 ScreenName,Num FROM EL_CounterScreen ORDER BY Num DESC")
If Not rsCommon.EOF And Not rsCommon.BOF Then
   CommonScreen = rsCommon(0)
   CommonScreenNum = rsCommon(1)
End If
rsCommon.Close()

Set rsCommon = Conn.Execute("SELECT TOP 1 ColorName,Num FROM EL_CounterColor ORDER BY Num DESC")
If Not rsCommon.EOF And Not rsCommon.BOF Then
   CommonColor = rsCommon(0)
   CommonColorNum = rsCommon(1)
End If
rsCommon.Close()
Set rsCommon = Nothing

CounterDayNum = DateDiff("d", StartDate, Date())
If CounterDayNum = 0 Then CounterDayNum = 1
CurrentPath = CurrentPath &">> 综合统计"
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td width="81%"><%=CurrentPath%></td>
    <td width="19%" align="right" class="BlueText">开始统计日期:<%=StartDate%></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
  <tr>
    <td width="15%" class="top_25"><strong>统计项目</strong></td>
    <td width="35%" class="top_25"><strong>统计数据</strong></td>
    <td width="17%" class="top_25"><strong>统计项目</strong></td>
    <td width="33%" class="top_25"><strong>统计数据</strong></td>
  </tr>
  <tr>
    <td nowrap class="td_ItemName">统计天数</td>
    <td class="item_25"><%=CounterDayNum%></td>
    <td nowrap class="td_ItemName">最高访问月份</td>
    <td class="item_25"><%=MaxMonthName%></td>
  </tr>
  <tr>
    <td nowrap class="td_ItemName">总访问量</td>
    <td class="item_25"><%=TotalIp%></t

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -