sub writeYearStatic(userid)
i=0
dim strArray(13)
for i=1 to 12
strArray(i)=cStr(i) & "月"
next
i=0
strSQL="select sum(num) as ccount from YearStatic where userid='" & userid & "'"
set rst=openRst()
rst.open strSQL,conn,3,3
if isnull(Rst("ccount")) then
ccount=0
else
ccount=Rst("ccount")
end if
strSQL="select * from YearStatic where userid='" & userid & "' order by monthid"
set rst=openRst()
rst.open strSQL,conn,3,3
%>
访问总数<%=ccount%>
<table border=1 width=100%>
<tr height=100%>
<td width=50%><% WriteDateTable 1, 6, strArray ,ccount %></td>
<td width=50%><% WriteDateTable 7, 12, strArray ,ccount %></td>
</tr>
</table>
<%
end sub
%>
<%
sub WriteRecentInfo(userid)
'显示访问者的浏览器分布
StrSQL="select top 10 * from accessstat where userid='" & userid & "' order by VisitTime desc"
set rst=openRst()
Rst.open StrSQL,Conn,3,1
%>
<table border=1 width=100% align=center cellSpacing=1 cellPadding=1>
<tr>
<td width=5% align=center>序 号</td>
<td width=20% align=center>来访时间</td>
<td width=15% align=center>IP地址</td>
<td width=15% align=center>所用操作系统</td>
<td width=15% align=center>所用浏览器类型</td>
<td width=30% align=center>浏览的上一页</td>
<td width=0%></td>
</tr>
<% for i=1 to Rst.RecordCount %>
<tr>
<td width=5% align=center><%=i%></td>
<td width=20% align=center><%=Rst("VisitTime")%
></td>
<td width=15% align=center><%=Rst("IPAddr")%></td>
<td width=15% align=center><%=Rst("UseSystem")%></td>
<td width=15% align=center><%=Rst("BrowserType")%></td>
<td width=30% align=center><a HREF=<%=Rst("LastPage")%>><%Response.Write Rst("LastPage")%
></a></td>
<td width=0%></td>
</tr>
<% Rst.MoveNext%>
<% Next %>
</table>
<%
end sub
%>
<%
sub WriteBrowserInfo(userid)
Set Rst=OpenRst()
strSQL="select count(*) as VisitCount from AccessStat where userid='" & userid & "'"
Rst.open strSQL,Conn,3,1
TotalVisit=rst(0)
StrSQL="select BrowserType,count(BrowserType) as visitcount from AccessStat where userid='" & userid
& "' group by BrowserType order by VisitCount desc"
Set Rst=OpenRst()
Rst.open StrSQL,Conn,3,1
%>
<table border=1 width=100% align=center cellSpacing=1 cellPadding=1>
<tr>
<td width=5% align=center>序 号</td>
<td width=15% align=center>所用浏览器类型</td>
<td width=40% align=center>访问比例尺表示</td>
<td width=15% align=center>访问次数</td>
<td width=5%></td>
</tr>
<%for i=1 to Rst.RecordCount %>
<tr>
<td width=5% align=center><%=i%></td>
<td width=15% align=center><%=Rst("BrowserType")%></td>
<!--
<td width=15% align=center><%=Rst("VisitCount")%
></td>
<td width=10% align=center><%=FormatNumber(CInt(Rst
("VisitCount")/TotalVisit*10000)/100,true,true)%>%</td>
<td width=40% align=left><img src=bar.gif width=<%=(Rst("VisitCount")/TotalVisit)*300%>
height=10></td>
-->
<td><%setbar Rst("VisitCount"),TotalVisit %></td>
<td width=5% ></td>
</tr>
<%Rst.MoveNext%>
<% Next %>
 
i=0
dim strArray(13)
for i=1 to 12
strArray(i)=cStr(i) & "月"
next
i=0
strSQL="select sum(num) as ccount from YearStatic where userid='" & userid & "'"
set rst=openRst()
rst.open strSQL,conn,3,3
if isnull(Rst("ccount")) then
ccount=0
else
ccount=Rst("ccount")
end if
strSQL="select * from YearStatic where userid='" & userid & "' order by monthid"
set rst=openRst()
rst.open strSQL,conn,3,3
%>
访问总数<%=ccount%>
<table border=1 width=100%>
<tr height=100%>
<td width=50%><% WriteDateTable 1, 6, strArray ,ccount %></td>
<td width=50%><% WriteDateTable 7, 12, strArray ,ccount %></td>
</tr>
</table>
<%
end sub
%>
<%
sub WriteRecentInfo(userid)
'显示访问者的浏览器分布
StrSQL="select top 10 * from accessstat where userid='" & userid & "' order by VisitTime desc"
set rst=openRst()
Rst.open StrSQL,Conn,3,1
%>
<table border=1 width=100% align=center cellSpacing=1 cellPadding=1>
<tr>
<td width=5% align=center>序 号</td>
<td width=20% align=center>来访时间</td>
<td width=15% align=center>IP地址</td>
<td width=15% align=center>所用操作系统</td>
<td width=15% align=center>所用浏览器类型</td>
<td width=30% align=center>浏览的上一页</td>
<td width=0%></td>
</tr>
<% for i=1 to Rst.RecordCount %>
<tr>
<td width=5% align=center><%=i%></td>
<td width=20% align=center><%=Rst("VisitTime")%
></td>
<td width=15% align=center><%=Rst("IPAddr")%></td>
<td width=15% align=center><%=Rst("UseSystem")%></td>
<td width=15% align=center><%=Rst("BrowserType")%></td>
<td width=30% align=center><a HREF=<%=Rst("LastPage")%>><%Response.Write Rst("LastPage")%
></a></td>
<td width=0%></td>
</tr>
<% Rst.MoveNext%>
<% Next %>
</table>
<%
end sub
%>
<%
sub WriteBrowserInfo(userid)
Set Rst=OpenRst()
strSQL="select count(*) as VisitCount from AccessStat where userid='" & userid & "'"
Rst.open strSQL,Conn,3,1
TotalVisit=rst(0)
StrSQL="select BrowserType,count(BrowserType) as visitcount from AccessStat where userid='" & userid
& "' group by BrowserType order by VisitCount desc"
Set Rst=OpenRst()
Rst.open StrSQL,Conn,3,1
%>
<table border=1 width=100% align=center cellSpacing=1 cellPadding=1>
<tr>
<td width=5% align=center>序 号</td>
<td width=15% align=center>所用浏览器类型</td>
<td width=40% align=center>访问比例尺表示</td>
<td width=15% align=center>访问次数</td>
<td width=5%></td>
</tr>
<%for i=1 to Rst.RecordCount %>
<tr>
<td width=5% align=center><%=i%></td>
<td width=15% align=center><%=Rst("BrowserType")%></td>
<!--
<td width=15% align=center><%=Rst("VisitCount")%
></td>
<td width=10% align=center><%=FormatNumber(CInt(Rst
("VisitCount")/TotalVisit*10000)/100,true,true)%>%</td>
<td width=40% align=left><img src=bar.gif width=<%=(Rst("VisitCount")/TotalVisit)*300%>
height=10></td>
-->
<td><%setbar Rst("VisitCount"),TotalVisit %></td>
<td width=5% ></td>
</tr>
<%Rst.MoveNext%>
<% Next %>