📄 index.asp
字号:
vPageCount = oRs.PageCount
oRs.AbsolutePage = vI
For vJ = 1 to oRs.PageSize
aWhere(vJ-1,0) = oRs("cWhere")
aWhere(vJ-1,1) = oRs("cCWC")
MaxValue = oRs("MaxCount")
oRs.MoveNext
if oRs.eof then exit for
next
page = PageSplit(vI,vPageCount,"where")
oRs.close
else
page = "暂无数据"
exit sub
end if
if MaxValue = 0 then MaxValue = 1
vPoint = 150/MaxValue
sWhereImage = "<table width=100% border=0 cellpadding=2><tr><td align=center>访问者统计图表</td></tr><tr><td align=center><table align=center>"
for vL = 0 to 19
sHeight = aWhere(vL,1)*vPoint
if sHeight=0 then exit for
sWhereImage = sWhereImage & "<tr valign=bottom ><td nowap>"&aWhere(vL,0)&"</td><td align=left background=images/tu_back_2.gif valign=middle width=150><img src=images/bar2.gif width="&sheight&" height=15 title=访问量:"&aWhere(vL,1)&"></td><td nowap>"&aWhere(vL,1)&"</td></tr>"
next
sWhereImage = sWhereImage & "</table><br>"
sWhereImage = sWhereImage & page & "</td></tr></table>"
call DrawTable("访问者地区统计",sWhereImage)
%>
</p>
<p>
<%
end Sub
Dim sReImage
Sub Sb_Referer()
MaxValue = 0
oSql = "select cR.cReferer,cR.cCRC,MaxNum.MaxCount from cR,(select Max(cCRC) as MaxCount from cR) as MaxNum order by cR.cCRC desc"
vI = cLng(request("AbsolutePage"))
if vI <= 0 then vI=1
Set oRs = GetRs(oSql)
if not oRs.eof then
oRs.Pagesize = 20
Dim aWhere(19,1)
vPageCount = oRs.PageCount
oRs.AbsolutePage = vI
For vJ = 1 to oRs.PageSize
aWhere(vJ-1,0) = oRs("cReferer")
aWhere(vJ-1,1) = oRs("cCRC")
MaxValue = oRs("MaxCount")
oRs.MoveNext
if oRs.eof then exit for
next
page = PageSplit(vI,vPageCount,"referer")
oRs.close
else
page = "暂无数据"
exit sub
end if
if MaxValue = 0 then MaxValue = 1
vPoint = 150/MaxValue
sReImage = "<table width=100% border=0 cellpadding=2><tr><td align=center>访问者来源统计图表</td></tr><tr><td align=center><table align=center>"
for vL = 0 to 19
sHeight = aWhere(vL,1)*vPoint
if sHeight=0 then exit for
sReImage = sReImage & "<tr valign=bottom ><td nowap><a href='"&aWhere(vL,0)&"' target=_blank title='"&aWhere(vL,0)&"'>"&Mid(aWhere(vL,0),1,27)&"...</a></td><td align=left background=images/tu_back_2.gif valign=middle width=150><img src=images/bar2.gif width="&sheight&" height=15 title=访问量:"&aWhere(vL,1)&"></td><td nowap>"&aWhere(vL,1)&"</td></tr>"
next
sReImage = sReImage & "</table><br>"
sReImage = sReImage & page & "</td></tr></table>"
call DrawTable("访问者来源统计",sReImage)
%>
</p>
<p>
<%
end Sub
Dim ShowMess
Sub Sb_Last20()
vSql = "select * from Last20Vister order by cCT desc,id asc"
Set vRs = GetRs(vSql)
if not vRs.eof then
ShowImage(vRs)
else
ShowMess = "暂无数据"
end if
vRs.close
Call DrawTable("最后二十位来访者信息",ShowMess)
End Sub
Sub ShowImage(Rs)
ShowMess = ShowMess & "<table width=100% border=0 cellpadding=2 cellspacing=1><tr align=center bgcolor=#CDDDF1><td width=12% >时间</td><td width=13% >操作系统</td><td width=21% >浏览器</td><td width=13% >地区</td><td width=14% >IP地址</td><td width=27% >来源</td></tr>"
for i = 1 to 20
if IsNull(Rs("cCT")) then exit for
ShowMess = ShowMess & "<tr align=center><td width=""12%"">"&month(Rs("cCT"))&"-"&day(Rs("cCT"))&" "&formatdatetime(Rs("cCT"),4)&"</td><td width=""13%"">"&Rs("cCOS")&"</td><td width=""21%"">"&Rs("cCEXP")&"</td><td width=""13%"">"&Rs("cCW")&"</td><td width=""14%"">"&Rs("cCIP")&"</td><td width=""27%"" align=left><a href="""&Rs("cCR")&""" title="""&Rs("cCR")&""">"&Mid(Rs("cCR"),1,27)&"...</a></td></tr>"
Rs.Movenext
next
ShowMess = ShowMess & "</table>"
end sub
%>
</p>
<%
Function Fn_MaxDay(Mon)
Mon = cstr(Mon)
Select Case Mon
Case "1","3","5","7","8","10","12"
Fn_MaxDay = 31
Case "4","6","9","11"
Fn_Maxday = 30
Case "2"
if year(Now()) mod 4 = 0 then
Fn_Maxday = 29
else
Fn_Maxday = 28
end if
end Select
End Function
Sub DrawTable(title,str)
%>
<TABLE width="747" height=28 border=0 align="center" cellPadding=0 cellSpacing=0 style="TABLE-LAYOUT: fixed">
<TBODY>
<TR height=3 width="100%">
<TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=1>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD bgColor=#6699CC></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD bgColor=#6699CC></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#6699CC></TD>
<TD bgColor=#6699CC colSpan=3></TD>
<TD bgColor=#6699CC></TD>
<TD></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD> <TABLE style="TABLE-LAYOUT: fixed" height="100%" cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD width=1 bgColor=#6699CC></TD>
<TD id=oINNER bgColor=#6699CC>
<table width="747" border="0" cellspacing="0" cellpadding="2">
<tr>
<td bgcolor="#A5C2E0"> <strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle">
<%=title%></strong></td>
</tr>
<tr>
<td bgcolor="#6699CC" style="height:1px"></td>
</tr>
<tr>
<td align="center" bgcolor="#E3ECF4"><%=str%></td>
</tr>
</table> </TD>
<TD width=1 bgColor=#6699CC></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR height=3 width="100%">
<TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=1>
<TD width=1></TD>
<TD width=1 bgColor=#6699CC></TD>
<TD width=1 bgColor=#E3ECF4></TD>
<TD bgColor=#E3ECF4></TD>
<TD width=1 bgColor=#E3ECF4></TD>
<TD width=1 bgColor=#6699CC></TD>
<TD width=1></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD bgColor=#E3ECF4></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD></TD>
</TR>
<TR height=1>
<TD colSpan=3></TD>
<TD bgColor=#6699CC></TD>
<TD colSpan=3></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<%
end Sub
Function PageSplit(vI,vPageCount,cstate)
if vI mod 10 = 0 then
Sp = vI \ 10
else
Sp = vI \ 10 + 1
end if
Pagestart = (Sp-1)*10+1
Pageend = Sp*10
strSplit = "<table width=500 align=center><tr><td align=center>共"&vPageCount&"页 当前第"&vI&"页 <a href=index.asp?act="&cstate&"&AbsolutePage=1><font face=webdings title=第一页>9</font></a> "
if Sp > 1 then strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&Pagestart-10&"><font face=webdings title=前十页>7</font></a> "
for j=PageStart to Pageend
if j > vPageCount then exit for
if j <> vI then
strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&j&">["&j&"]</a> "
else
strSplit = strSplit & "<font color=red>["&j&"]</font> "
end if
next
if Sp*10 < vPageCount then strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&Pagestart+10&"><font face=webdings title=后十页>8</font></a>"
strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&vPageCount&" ><font face=webdings title=""最后一页"">:</font></a></td></tr></table>"
PageSplit = strSplit
End Function
%>
<br>
<div id="idiv"></div>
<TABLE width="747" height=28 border=0 align="center" cellPadding=0 cellSpacing=0 style="TABLE-LAYOUT: fixed">
<TBODY>
<TR height=3 width="100%">
<TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=1>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD bgColor=#6699CC></TD>
<TD width=1></TD>
<TD width=1></TD>
<TD width=1></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD bgColor=#6699CC></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#6699CC></TD>
<TD bgColor=#6699CC colSpan=3></TD>
<TD bgColor=#6699CC></TD>
<TD></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD> <TABLE style="TABLE-LAYOUT: fixed" height="100%" cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD width=1 bgColor=#6699CC></TD>
<TD id=oINNER bgColor=#E3ECF4>
<table width="747" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td align="center"><font color="#990000"><strong>漫步统计</strong></font>
1.5 Final © <font color="#990000"><strong><a href="http://www.manbu.net" target="_blank">Manbu.net</a></strong></font>,2002-2003</td>
</tr>
<tr>
<td align="center"><%
endtime=timer()
response.write "页面执行时间:"&FormatNumber((endtime-startime)*1000,3)&"毫秒"%></td>
</tr>
</table>
</TD>
<TD width=1 bgColor=#6699CC></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR height=3 width="100%">
<TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=1>
<TD width=1></TD>
<TD width=1 bgColor=#6699CC></TD>
<TD width=1 bgColor=#6699CC></TD>
<TD bgColor=#6699CC></TD>
<TD width=1 bgColor=#6699CC></TD>
<TD width=1 bgColor=#6699CC></TD>
<TD width=1></TD>
</TR>
<TR height=1>
<TD></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD bgColor=#6699CC></TD>
<TD bgColor=#6699CC colSpan=2></TD>
<TD></TD>
</TR>
<TR height=1>
<TD colSpan=3></TD>
<TD bgColor=#6699CC></TD>
<TD colSpan=3></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -