?? main.asp
字號:
<%@ CODEPAGE = "936" %>
<!--#include file="inc_config.asp"-->
<%
'權限分配
if whatcan<1 then Response.Redirect "help.asp?id=004&error=本統計系統管理員不允許訪客查看任何信息。"
Response.Expires =0
set conn=server.createobject("adodb.connection")
conn.Open constr
'所有總訪問數、開始訪問日期(從主數據庫讀取)
tmprs=conn.execute("Select vtop,starttime from vjian where mem_id ="&uid)
vtotal=tmprs("vtop")
vfirst=tmprs("starttime")
set tmprs=nothing
if isnull(vtotal) then vtotal=0
if vtotal=0 then
conn.Close
set conn=nothing
Response.Redirect "help.asp?id=007&error=統計系統還沒有啟用,尚不能查看統計報告。"
end if
ttt0 = Hour(time)
ttt1=Minute(time)
if ttt1 > 15 Then
ttt3 = date&" " & ttt0 &":"& ttt1-15 &":00 "
else
ttt3 = date &" "& ttt0 -1 &" "& ttt1 +45 &":00 "
end if
ttt3 = cdate(ttt3)
'在線人數 其實是15分鐘內的訪問量
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select vip from views where mem_id ="&uid &" and vtime >= '"& ttt3 &"' group by vip"
rs.Open sql,conn,1,1
vonline=rs.RecordCount
rs.Close
set rs=nothing
'今日訪問量、昨日訪問量(從簡數據朝讀取)
tmprs=conn.execute("Select today,yesterday from vjian WHERE mem_id = " & uid )
vtoday=tmprs("today")
vyesterday=tmprs("yesterday")
if isnull(vtoday) then vtoday=0
if isnull(vyesterday) then vyesterday=0
'今年訪問量
tmprs=conn.execute("Select count(id) as vthisyear from views where mem_id ="&uid &" and vyear=" & year(now))
vthisyear=tmprs("vthisyear")
if isnull(vthisyear) then vthisyear=0
'本月訪問量
tmprssql = "Select count(id) as vthismonth from views where mem_id ="&uid &" and vmonth=" & month(now) & " and vyear=" & year(now)
tmprs=conn.execute (tmprssql)
vthismonth=tmprs("vthismonth")
if isnull(vthismonth) then vthismonth=0
'訪問天數、平均每天訪問量
vdays=now()-vfirst
vdayavg=vtotal/vdays
vdays=int((vdays*10^mPrecision)+0.5)/(10^mPrecision)
if vdays<1 then vdays="0" & vdays
vdayavg=int((vdayavg*10^mPrecision)+0.5)/(10^mPrecision)
'預計今日訪問量
vdaylong=now()-date()
vguess=int(((vtoday/vdaylong)+vyesterday)/2+0.5)
if vguess< vtoday then vguess=int((vtoday/vdaylong)+0.5)
'當前用戶訪問量
vuser=clng(Request.Cookies(mNameEn)("AjiangCountSys"))
conn.Close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="refresh" content="60">
<title><%=countname%></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body topmargin=5 rightmargin=0 leftmargin=0 vlink=#000000>
<!--#include file="inc_top.asp"-->
<br>
<table width="500" cellspacing="0" align="center" cellpadding="0" border="0">
<tr><td colspan="4"><img src="images/photoup.gif"></td></tr>
<tr height="30">
<td width="1" class="backs"></td>
<td colspan="2" width="489"class="backq">
<img src="images/tb_title.gif" align=absmiddle> ∷∷∷ 總 體 數 據 ∷∷∷</td>
<td width="1" class="backs"></td>
</tr>
<tr height="50">
<td width="1" class="backs"></td>
<td width="220"class="backq" valign=top>
<p style="line-height: 140%; margin-left: 25; margin-right: 0; margin-top: 10; margin-bottom: 5" align=left>
總訪問量: <%=vtotal+old_count%><br>
用本系統前: <%=old_count%><br>
用本系統后: <%=vtotal%><br>
在線人數: <%=vonline%><br>
您的訪問量: <%=vuser%><br>
開始統計于: <%=vfirst%><br>
今日訪問量: <%=vtoday%><br>
昨日訪問量: <%=vyesterday%><br>
今年訪問量: <%=vthisyear%><br>
本月訪問量: <%=vthismonth%><br>
統計天數: <%=vdays%><br>
平均日訪量: <%=vdayavg%><br>
預計今日: <%=vguess%><br>
</td>
<td width="278"class="backq" valign=top>
<p style="line-height: 140%; margin-left: 10; margin-right: 0; margin-top: 10; margin-bottom: 0" align=left>
網站: <%=mName%><br>
連接: <a href="<%=mURL%>" class="a1" target="_blank"><%=mURL%></a><br>
站長: <%=masterName%><br>
信箱: <a href="mailto:<%=masterEmail%>" class="a1"><%=masterEmail%></a><br>
<p style="text-indent: -35; line-height: 140%; margin-left: 45; margin-right: 25; margin-top: 0; margin-bottom: 5" align=left>簡介: <%=SiteBrief%><br>
</td>
<td width="1" class="backs"></td>
</tr>
<tr><td colspan="4"><img src="images/photodown.gif"></td></tr>
</table>
<br>
<table width="500" cellspacing="0" align="center" cellpadding="0" border="0">
<tr><td colspan="3"><img src="images/photoup.gif"></td></tr>
<form action="login.asp" method=post target="_top" id=form1 name=form1>
<tr height="50">
<td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
<td width=498 class="backq">
<img src="images/tb_login.gif" align=absmiddle> 管理員登錄
管理員已登錄!
<a href='logout.asp' target="_top">退出 <img src="images/arbutton.gif" align="absmiddle" border="0"></a> </td>
<td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
</tr>
</form>
<tr><td colspan="3"><img src="images/photodown.gif"></td></tr>
</table>
<%if yestop=0 and yesleft=0 then%>
<br>
<!--#include file="inc_index.asp"-->
<%end if%>
<!--#include file="inc_bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -