📄 index.asp
字号:
<%@ CODEPAGE = "936" %>
<!--#include file="config.asp"-->
<%
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath(connpath)
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'所有总访问数、开始访问日期(从主数据库读取)
tmprs=conn.execute("Select vtop,starttime from vjian")
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
'在线人数
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select vip from view where vtime >= dateadd('n',-20,now()) 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")
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 view where vyear=" & year(now))
vthisyear=tmprs("vthisyear")
if isnull(vthisyear) then vthisyear=0
'本月访问量
tmprs=conn.execute("Select count(id) as vthismonth from view where vmonth=" & month(now) & " and vyear=" & year(now))
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=cint(Request.Cookies(mNameEn)("lao"))
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">
<title><%=countname%></title>
<STYLE TYPE="text/css">
<!--
BODY {
FONT-SIZE: 9pt;
scrollbar-face-color: #FFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color: #D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color: #EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
TD
{
FONT-SIZE: 9pt;
COLOR: #0033FF;
font-family: "宋体";
}
A:link {
COLOR: #0000FF;
TEXT-DECORATION: none;
font-family: "宋体";
font-size: 9pt
}
A:visited {
COLOR: #0000FF;
TEXT-DECORATION: none;
font-family: "宋体";
font-size: 9pt
}
A:active {
COLOR: #0000FF;
TEXT-DECORATION: blink;
font-family: "宋体";
font-size: 9pt
}
A:hover {
COLOR: #FF0000;
TEXT-DECORATION: none;
font-family: "宋体";
font-size: 9pt
}
.linee {
border-right-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-right-color: #7ec3f8;
border-left-color: #7ec3f8;
}
-->
</STYLE>
<SCRIPT language=JavaScript>
var msg = "欢迎光临本站!! 愿您在这里玩的快乐!!让我们一起幻想飘雪的美丽,让烦恼一去不复返…………………………" ;
var interval = 100
var spacelen = 120;
var space10=" ";
var seq=0;
function Scroll() {
len = msg.length;
window.status = msg.substring(0, seq+1);
seq++;
if ( seq >= len ) {
seq = 0;
window.status = '';
window.setTimeout("Scroll();", interval );
}
else
window.setTimeout("Scroll();", interval );
}
Scroll();
</SCRIPT>
</head>
<body background="../images/background/bg.gif" topmargin=5 rightmargin=0 leftmargin=0>
<br>
<table width="770" height="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#eaf4ff">
<tr>
<td height="27" align="center" class="linee" background="../images/background/titletopbg.gif"><B>∷∷∷ 总 体 数 据 ∷∷∷</B></td>
</tr>
<tr>
<td class="linee">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>总访问量:<font color="#FF0000"><%=vtotal+old_count%></font><br>
用本系统前:<font color="#FF0000"><%=old_count%></font><br>
用本系统后:<font color="#FF0000"><%=vtotal%></font><br>
在线人数:<font color="#FF0000"><%=vonline%></font><br>
您的访问量:<font color="#FF0000"><%=vuser%></font><br>
开始统计于:<font color="#FF0000"><%=vfirst%></font><br>
今日访问量:<font color="#FF0000"><%=vtoday%></font><br>
昨日访问量:<font color="#FF0000"><%=vyesterday%></font><br>
今年访问量:<font color="#FF0000"><%=vthisyear%></font><br>
本月访问量:<font color="#FF0000"><%=vthismonth%></font><br>
统计天数:<font color="#FF0000"><%=vdays%></font><br>
平均日访量:<font color="#FF0000"><%=vdayavg%></font><br>
预计今日:<font color="#FF0000"><%=vguess%></font><br></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="27" class="linee" align="center" background="../images/background/titlebottombg.gif">网站名称: <a href="<%=mURL%>"><%=mName%></a> 站长:
<%=masterName%> 信箱: <a href="mailto:<%=masterEmail%>" class="a1"><%=masterEmail%></a></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -