<!-- #Include File=Conn.asp -->
<%
Response.Expires=0
Dim Percent(),BarWidth()
Dim Conn,Sql,Rs
Dim TotalNum,Assay,MaxWidth,Rows,i

MaxWidth=200
TotalNum=0
QDay=Request.QueryString("QDay")
If QDay="" Then QDay=Cstr(Year(Date)&"-"&Month(Date)&"-"&Day(date))
Rows=23
Sql="Select * From StatDay Where TDay='"&QDay&"'"
Rs.Open Sql,Conn,1,1
If Not Rs.Bof And Not Rs.Eof Then
   Assay=Rs.GetRows
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>
<BODY onselectstart=window.event.returnValue=null style="background-color: #ffffff">
<link rel="stylesheet" type="text/css" href="image/style.css">
<BODY oncontextmenu="return false">
<LINK href="image/jx_style.css" type=text/css rel=stylesheet>
<!-- #Include File=Header.asp-->
<div align="center">
  <center>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=560 
border=1 bgcolor="#DFF4FF" bordercolor="#CDCDCD" height="46">
  <TR>
    <TD class=newfont1 align=middle width=454 height=18 colspan="4">
            <font color="#000000">日 
              访 问 统 计 分 析 (总量：<%=TotalNum%>人) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><a href="StatAllDay.asp"><font color="#000000">[全部日分析]</font></font></a></TD>
    </TR>
  <tr>
    <TD class=newfont1 align=middle width=100 height=18>
    <font color="#000000">小&nbsp; 时</font></TD>
    <TD class=newfont1 align=middle width=85 height=18>
    <font color="#000000">访问人数</font></TD>
    <TD class=newfont1 align=middle width=90 height=18>
    <font color="#000000">百分比</font></TD>
    <TD class=newfont1 align=middle width=200 height=18>
    <font color="#000000">图示</font></TD>
    </tr>
  <TR>
    　<%for i=0 to Rows%> 
            <td class=newfont1 width="100" height="17"><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=mid(i+100,2)&":00-"&mid(i+101,2)&":00"%></td>
            <td class=newfont1 align=left width="20%" height="17"><font color="#000000"><p align="center"><%=Assay(i,0)%></td>
            <td class=newfont1 align=left width="20%" height="17"><font color="#000000"><p align="center"><%=Percent(i)%></td>
            <td class=newfont1 align=left width="35%" height="17">
            <font color="#000000"><img src="Image/bar.gif" width="<%=Barwidth(i)%> "height="12"></font></td>
      </tr>
          <%Next%>
</TD>
    </TR>
  </TABLE>
  </center>
</div>
</CENTER>
</BODY>
</HTML>

