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

iExFor=0
MaxWidth=200
TotalNum=0
Sql="Select * From FWeburl Order By TWebNum DESC"

Rs.Open Sql,Conn,1,1
If Not Rs.Bof And Not Rs.Eof Then
   Assay=Rs.GetRows
   Rows=Ubound(Assay,2)
Else
   Rows=-1
End If
Rs.Close
Conn.Close
Set Rs=Nothing
Set Conn=Nothing
For i=0 to Rows
	TotalNum=TotalNum+Assay(1,i)
Next
ReDim Percent(Rows)
ReDim BarWidth(Rows)
For i=0 to Rows
    If TotalNum>0 Then
	   Percent(i)=FormatNumber(Int(Assay(1,i)/TotalNum*10000)/100,2,-1)&"%"
       BarWidth(i)=Assay(1,i)/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="640" border=1 bordercolor=#000099 cellpadding=0 cellspacing=0 >
    <tbody> 
    <tr> 
      <td> 
        <table border=0 cellpadding=3 cellspacing=0 width="100%" bgcolor="#FFFFFF">
          <tbody> 
          <tr> 
            <td colspan=4 align="center" bgcolor="#000099"> 
              <div align="right"><font color="#FFFFFF">访 问 者 来 访 网 站 分 析 （总量：<%=TotalNum%>）</font> 
                <font color="#FFFFFF"></font>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
                <a href="FReferer.asp"><font color="#FFFFFF">[链接页面分析]</font></a> 
              </div>
            </td>
          </tr>
          <tr bgcolor="#CCCCCC"> 
            <td align=left>来访网站</td>
            <td align=left>访问人数</td>
            <td align=left>百分比</td>
            <td align=left>图示</td>
          </tr>
          <%for i=0 to Rows
		  ExFor=ExFor+1%> 
          <tr bgcolor="#FFFFFF"> 
            <td align=left width="25%">
			<% If Assay(0,i)="直接输入或书签导入" Then%>
			      <%=Left(Assay(0,i),40)%>
			 <%Else%>
			      <a href="<%=Assay(0,i)%>"><%=Left(Assay(0,i),40)%></a>
			 <%End If%></td>
            <td align=left width="20%"><%=Assay(1,i)%></td>
            <td align=left width="20%"><%=Percent(i)%></td>
            <td align=left width="35%"><img src="Image/bar.gif" width="<%=Barwidth(i)%> "height="12"></td>
          </tr>
          <%If Exfor>=30 Then Exit For
		  Next%> 
          <tr align="right"> 
            <td colspan=4 bgcolor="#000099"> 
              <p>&nbsp;</p>
            </td>
          </tr>
          </tbody> 
        </table>
      </td>
    </tr>
    </tbody> 
  </table>
<!-- #Include File=End.asp-->
</CENTER>
</BODY>
</HTML>
