📄 statallmonth.asp
字号:
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
%><!-- #Include File=Conn.asp -->
<%
Response.Expires=0
Dim Percent(),BarWidth()
Dim Conn,Sql,Rs
Dim TotalNum,Assay,MaxWidth,Rows,SYear,SMonth
MaxWidth=200
TotalNum=0
QMonth=Request.QueryString("QMonth")
If QMonth="" Then QMonth=Cstr(Year(Date)&"-"&Month(Date))
Sql="Select * From StatMonth Where TMonth='Total'"
Rs.Open Sql,Conn,1,1
If Not Rs.Bof And Not Rs.Eof Then
Assay=Rs.GetRows
SYear=Mid(QMonth,1,Instr(QMonth,"-")-1)
SMonth=Mid(QMonth,Instr(QMonth,"-")+1)
If SMonth="4" Or SMonth="6" Or SMonth="9"Or SMonth="11" Then
Rows=29
Else
If SMonth="2" Then
Rows=27
Else
Rows=30
End If
End If
Else
Rows=-1
End If
Rs.Close
Conn.Close
Set Rs=Nothing
Set Conn=Nothing
For i=0 to Rows
TotalNum=TotalNum+Assay(i,0)
Next
ReDim Percent(Rows)
ReDim BarWidth(Rows)
For i=0 to Rows
If TotalNum>0 Then
Percent(i)=FormatNumber(Int(Assay(i,0)/TotalNum*10000)/100,2,-1)&"%"
BarWidth(i)=Assay(i,0)/TotalNum*MaxWidth
End If
Next
%>
<HTML>
<HEAD>
<TITLE>网站统计分析系统</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" href="Info/Style.css">
</HEAD>
<BODY bgColor=#FFFFFF>
<CENTER>
<!-- #Include File=Header.asp-->
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#9DB2D4">
<tbody>
<tr align="right" bgcolor="#C7D3E6">
<td colspan=4><font color="#FFFFFF"> 全 部 月 访 问 统 计 分 析 (总量:<%=TotalNum%>)</font> <a href="StatMonth.asp"><font color="#FFFFFF">[本月分析]</font></a></td>
</tr>
<tr bgcolor="#F0F3F8">
<td height="22" align=left>日期</td>
<td height="22" align=left>访问人数</td>
<td height="22" align=left>百分比</td>
<td height="22" align=left>图示</td>
</tr>
<%for i=0 to Rows%>
<tr bgcolor="#F0F3F8">
<td width="25%" height="22" align=left> <%=i+1%>日</td>
<td width="20%" height="22" align=left><%=Assay(i,0)%></td>
<td width="20%" height="22" align=left><%=Percent(i)%></td>
<td width="35%" height="22" align=left><img src="Image/bar.gif" width="<%=Barwidth(i)%> "height="12"></td>
</tr>
<%Next%>
</tbody>
</table>
<!-- #Include File=End.asp-->
</CENTER>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -