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

📄 admin_counter.asp

📁 QQ呱唧网
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="../conn.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="../count/conn_counter.asp"-->
<!--#include file="../inc/function.asp"-->
<%
const MaxPerPage=20
dim rs,sql
dim strFileName,totalPut,CurrentPage,TotalPages
dim Search,strGuide,TitleRight
dim QDay,QYear,QMonth,QWeek,SYear,SMonth
dim TotalNum,StatItem,Item,ItemNum,Percent,Barwidth,MaxWidth,Assay,Rows,i,DispRow
Set Rs=Server.CreateObject("ADODB.RECORDSET")

Action=Trim(request("Action"))
QDay=Request("QYear")&"-"&Request("QMonth")&"-"&Request("QDay")
QMonth=Request("QYear")&"-"&Request("QMonth")
QYear=Request("QYear")
Select Case Request("Type")
Case 1:
	Action="StatDay"
Case 2:
	Action="StatMonth"
Case 3:
	Action="StatYear"
end Select

strFileName="Admin_Counter.asp?Action=" & Action
if request("page")<>"" then
    currentPage=cint(request("page"))
else
	currentPage=1
end if

Maxwidth=220		'放置统计条的表格的宽度
TotalNum=0

strHTML=strHTML & "<html>" & vbcrlf
strHTML=strHTML & "<head>" & vbcrlf
strHTML=strHTML & "<title>网站统计管理</title>" & vbcrlf
strHTML=strHTML & "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
strHTML=strHTML & "<link href='Admin_Style.css' rel='stylesheet' type='text/css'>" & vbcrlf
strHTML=strHTML & "<script>" & vbcrlf
strHTML=strHTML & "function change_type()" & vbcrlf
strHTML=strHTML & "{ " & vbcrlf
strHTML=strHTML & "	select_type=form1.type.options[form1.type.selectedIndex].text;" & vbcrlf
strHTML=strHTML & "	switch(select_type)" & vbcrlf
strHTML=strHTML & "	{ " & vbcrlf
strHTML=strHTML & "		case '日报表' :form1.qmonth.disabled=0;form1.qday.disabled=0;break;" & vbcrlf
strHTML=strHTML & "		case '月报表' :form1.qmonth.disabled=0;form1.qday.disabled=1;break;" & vbcrlf
strHTML=strHTML & "		case '年报表' :form1.qmonth.disabled=1;form1.qday.disabled=1;break;" & vbcrlf
strHTML=strHTML & "	} " & vbcrlf
strHTML=strHTML & "} " & vbcrlf
strHTML=strHTML & "function change_it()" & vbcrlf
strHTML=strHTML & "{ " & vbcrlf
strHTML=strHTML & "	select_type=form1.type.options[form1.type.selectedIndex].text;" & vbcrlf
strHTML=strHTML & "	if (select_type=='日报表')" & vbcrlf
strHTML=strHTML & "	{" & vbcrlf
strHTML=strHTML & "		select_item_y=form1.qyear.options[form1.qyear.selectedIndex].text;" & vbcrlf
strHTML=strHTML & "		month29=select_item_y%4;" & vbcrlf
strHTML=strHTML & "		select_item_m=form1.qmonth.options[form1.qmonth.selectedIndex].text;" & vbcrlf
strHTML=strHTML & "		switch(select_item_m)" & vbcrlf
strHTML=strHTML & "		{ " & vbcrlf
strHTML=strHTML & "			case '2' :if (month29==0) {MD(29)}  else {MD(28)};break;" & vbcrlf
strHTML=strHTML & "			case '4' : " & vbcrlf
strHTML=strHTML & "			case '6' : " & vbcrlf
strHTML=strHTML & "			case '9' : " & vbcrlf
strHTML=strHTML & "			case '11' : MD(30);break; " & vbcrlf
strHTML=strHTML & "			default : MD(31);break; " & vbcrlf
strHTML=strHTML & "		}" & vbcrlf
strHTML=strHTML & "	}" & vbcrlf
strHTML=strHTML & "} " & vbcrlf
strHTML=strHTML & "function MD(days)" & vbcrlf
strHTML=strHTML & "{ " & vbcrlf
strHTML=strHTML & "	j=form1.qday.options.length; " & vbcrlf
strHTML=strHTML & "	for(k=0;k<j;k++) form1.qday.options.remove(0); " & vbcrlf
strHTML=strHTML & "	for(i=0;i<days;i++)" & vbcrlf
strHTML=strHTML & "	{ " & vbcrlf
strHTML=strHTML & "		var day=document.createElement('OPTION'); " & vbcrlf
strHTML=strHTML & "		form1.qday.options.add(day); " & vbcrlf
strHTML=strHTML & "		day.innerText=i+1; " & vbcrlf
strHTML=strHTML & "		form1.qday.selectedIndex=0" & vbcrlf
strHTML=strHTML & "	} " & vbcrlf
strHTML=strHTML & "} " & vbcrlf
strHTML=strHTML & "</script>" & vbcrlf
strHTML=strHTML & "</head>" & vbcrlf
strHTML=strHTML & "<body leftmargin='2' topmargin='0' marginwidth='0' marginheight='0'>"
strHTML=strHTML & "<table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' Class='border'>"
strHTML=strHTML & "  <tr class='topbg'>"
strHTML=strHTML & "    <td height='22' colspan=2 align=center><strong>网 站 统 计 管 理</strong></td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "  <tr class='tdbg'> "
strHTML=strHTML & "    <td width='70' height='30'><strong>管理导航:</strong></td>"
strHTML=strHTML & "    <td height='30'>"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=Infolist'>综合统计</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FVisitor'>访问记录</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FCounter'>访问次数</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatYear'>年 报 表</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatAllYear'>全 部 年</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatMonth'>月 报 表</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatAllMonth'>全 部 月</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatWeek'>周 报 表</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatAllWeek'>全 部 周</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatDay'>日 报 表</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=StatAllDay'>全 部 日</a>&nbsp;|<br>"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FIp'>IP 地 址</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FArea'>地区分析</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FAddress'>地址分析</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FTimezone'>时区分析</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FWeburl'>来访网站</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FReferer'>链接页面</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FSystem'>操作系统</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FBrowser'>浏 览 器</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FMozilla'>字串分析</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FScreen'>屏幕大小</a>&nbsp;|"
strHTML=strHTML & "	<a href='Admin_Counter.asp?Action=FColor'>屏幕色深</a>&nbsp;|"
strHTML=strHTML & "	</td>"
strHTML=strHTML & "  </tr>"
strHTML=strHTML & "</table>"
strHTML=strHTML & "<br>"
response.write strHTML

if Action="Infolist" then
	call Infolist()
elseif Action="FVisitor" then
	call FVisitor()
elseif Action="FCounter" then
	call FCounter()
elseif Action="StatYear" then
	call StatYear()
elseif Action="StatAllYear" then
	call StatAllYear()
elseif Action="StatMonth" then
	call StatMonth()
elseif Action="StatAllMonth" then
	call StatAllMonth()
elseif Action="StatWeek" then
	call StatWeek()
elseif Action="StatAllWeek" then
	call StatAllWeek()
elseif Action="StatDay" then
	call StatDay()
elseif Action="StatAllDay" then
	call StatAllDay()
elseif Action="FIp" then
	call FIp()
elseif Action="FArea" then
	call FArea()
elseif Action="FAddress" then
	call FAddress()
elseif Action="FTimezone" then
	call FTimezone()
elseif Action="FWeburl" then
	call FWeburl()
elseif Action="FReferer" then
	call FReferer()
elseif Action="FSystem" then
	call FSystem()
elseif Action="FBrowser" then
	call FBrowser()
elseif Action="FMozilla" then
	call FMozilla()
elseif Action="FScreen" then
	call FScreen()
elseif Action="FColor" then
	call FColor()
elseif Action="Init" then
	call Init()
elseif Action="DoInit" then
	call DoInit()
else
	call Infolist()
end if

if not (Action="Init" or Action="DoInit") then
	call historylist()
end if
Set Rs=Nothing
call CloseConn_counter()

sub Infolist()
	dim StartDate,StatDayNum,AllNum,CountNum,AveDayNum,DayNum
	dim MonthMaxNum,MonthMaxDate,DayMaxNum,DayMaxDate,HourMaxNum,HourMaxTime,ZoneNum,ChinaNum,OtherNum
	dim MaxBrw,MaxBrwNum,MaxSys,MaxSysNum,MaxScr,MaxScrNum,MaxAre,MaxAreNum,MaxWeb,MaxWebNum,MaxColor,MaxColorNum
	strGuide="网站综合统计信息"
	Sql="Select * From InfoList"
	Rs.Open Sql,conn_counter,1,1
	if not Rs.bof and not rs.eof then
		DayNum=Rs("DayNum")
		AllNum=Rs("TotalNum")
		MonthMaxNum=rs("MonthMaxNum")
		MonthMaxDate=Rs("MonthMaxDate")
		DayMaxNum=Rs("DayMaxNum")
		DayMaxDate=Rs("DayMaxDate")
		HourMaxNum=Rs("HourMaxNum")
		HourMaxTime=Rs("HourMaxTime")
		ChinaNum=Rs("ChinaNum")
		OtherNum=Rs("OtherNum")
		StartDate=Rs("StartDate")
		StatDayNum=DateDiff("D",StartDate,Date)+1
		if StatDayNum<=0 or isnumeric(StatDayNum)=0 then
		   AveDayNum=StatDayNum
		Else
		   AveDayNum=Cint(AllNum/StatDayNum)
		end if
	end if
	Rs.Close
	Sql="Select * From FVisit"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		for i=1 to 10
			CountNum=CountNum+Rs(""&i&"")
		Next
	Else
	  CountNum=0
	end if
	Rs.Close
	Sql="Select Top 1 * From FBrowser Order By TBrwNum DESC"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		MaxBrw=Rs("TBrowser")
		MaxBrwNum=Rs("TBrwNum")
	end if
	Rs.Close
	Sql="Select Top 1 * From FSystem Order By TSysNum DESC"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		MaxSys=Rs("TSystem")
		MaxSysNum=Rs("TSysNum")
	end if
	Rs.Close
	Sql="Select Top 1 * From FScreen Order By TScrNum DESC"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		MaxScr=Rs("TScreen")
		MaxScrNum=Rs("TScrNum")
	end if
	Rs.Close
	Sql="Select Top 1 * From FColor Order By TColNum DESC"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		MaxColor=Rs("TColor")
		MaxColorNum=Rs("TColNum")
	end if
	Rs.Close
	Sql="Select Top 1 * From FArea Order By TAreNum DESC"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		MaxAre=Rs("TArea")
		MaxAreNum=Rs("TAreNum")
	end if
	Rs.Close
	Sql="Select Top 1 * From FWeburl Order By TWebNum DESC"
	Rs.Open Sql,conn_counter,1,1
	if Not Rs.Bof and Not Rs.Eof then
		MaxWeb=Rs("TWeburl")
		MaxWebNum=Rs("TWebNum")
	end if
	Rs.Close
	TitleRight="开始统计日期:<font color=blue>"&StartDate&"</font>"

	strHTML="<table width='100%'><tr><td align='left'>您现在的位置:网站统计管理&nbsp;&gt;&gt;&nbsp;" & Search & strGuide & "</td><td align='right'>" & TitleRight & "</td></tr></table>"
	strHTML=strHTML & "<table border=0 cellpadding=2 cellspacing=1 width='100%' bgcolor='#FFFFFF' class='border'>"
	strHTML=strHTML & "  <tr class='title' align='center'>"
	strHTML=strHTML & "    <td align=center width='20%' height='22'>统计项</td>"
	strHTML=strHTML & "    <td align=center width='30%'>统计数据</td>"
	strHTML=strHTML & "    <td width='20%'>统计项</td>"
	strHTML=strHTML & "    <td align='center' width='30%'>统计数据</td>"
	strHTML=strHTML & "  </tr>"
	strHTML=strHTML & "  <tbody>"
	strHTML=strHTML & "  <tr class='tdbg'>"
	strHTML=strHTML & "    <td align=center width='20%'>总统计天数</td>"
	strHTML=strHTML & "    <td align=center width='30%'>" & StatDayNum & "</td>"
	strHTML=strHTML & "    <td align=center width='20%'>最高月访量</td>"
	strHTML=strHTML & "    <td align=center width='30%'>" & MonthMaxNum & "</td>"
	strHTML=strHTML & "  </tr>"
	strHTML=strHTML & "  <tr class=tdbg>"
	strHTML=strHTML & "    <td align=center width='20%'>总访问量</td>"
	strHTML=strHTML & "    <td align=center width='30%'>" & AllNum & "</td>"
	strHTML=strHTML & "    <td align=center width='20%'>最高月访量月份</td>"
	strHTML=strHTML & "    <td align=center width='30%'>" & MonthMaxDate & "</td>"
	strHTML=strHTML & "  </tr>"
	strHTML=strHTML & "  <tr class='tdbg'>"
	strHTML=strHTML & "    <td align=center width='20%'>总访问人数</td>"
	strHTML=strHTML & "    <td align=center width='30%'>" & CountNum & "</td>"
	strHTML=strHTML & "    <td align=center width='20%'>最高日访量</td>"

⌨️ 快捷键说明

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