<%
'乘风多用户计数器 Sql版
'作者QQ：178575
'作者EMail：yliangcf@163.com
'作者网站：http://www.qqcf.com
'详细简介：http://www.qqcf.com/cfcount.htm
'上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
'因为这些内容可能时常更新，就没有放在程序里，请自己上网站上查看
'有完整版本的演示
%>

<table class="tb_1">
<TR class="tr_2">
<TD>
<%
Session("CFCountTemp")=""
Sql="Select b.SiteDesc,a.MyCounter,a.IPCounter From CFCount_Search a Left Join CFCount_Search_Set b on a.siteflag=b.siteflag where a.UserName='"&UserName&"' Order By a.IpCounter Desc"
Set Rs=Conn.Execute(Sql)
If Not Rs.eof Then
  Session("CFCountTemp")=Rs.GetRows(-1)
End If

For I=0 To Ubound(Session("CFCountTemp"),2)
SiteDesc=""
ShowNum=0
IpNum=0

SiteDesc=Session("CFCountTemp")(0,I)
ShowNum=Session("CFCountTemp")(1,I)
IpNum=Session("CFCountTemp")(2,I)

colorstr="AFD8F8"
If I=0 Then colorstr="AFD8F8"
If I=1 Then colorstr="F6BD0F"
If I=2 Then colorstr="8BBA00"
If I=3 Then colorstr="FF8E46"
If I=4 Then colorstr="008E8E"
If I=5 Then colorstr="D64646"
If I=6 Then colorstr="8E468E"
If I=7 Then colorstr="588526"

TitleStr=TitleStr&"<set name='"&SiteDesc&"' value='"&IpNum&"' color='"&colorstr&"'/>"


Next
%>
<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=750 height=450>
<PARAM NAME="FlashVars" VALUE="dataXML=<graph baseFont='SunSim' baseFontSize='12' caption='搜索引擎统计' showFCMenuItem='0' subcaption='全部时间' yAxisMinValue='51650.1' yAxisMaxValue='71118.3' xaxisname='日期' yaxisname='数量' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='1' numdivlines='10' numVdivlines='0' shownames='1' rotateNames='1'><%=TitleStr%></graph>">
<PARAM NAME="movie" VALUE="images/Pie2D.swf">
<embed src="images/Pie2D.swf" width="750" height="450" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" FlashVars="dataXML=<graph baseFont='SunSim' baseFontSize='12' caption='搜索引擎统计' showFCMenuItem='0' subcaption='全部时间' yAxisMinValue='51650.1' yAxisMaxValue='71118.3' xaxisname='日期' yaxisname='数量' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='1' numdivlines='10' numVdivlines='0' shownames='1' rotateNames='1'><%=TitleStr%></graph>"></embed>
</OBJECT>
</TD></TR>
<table>	


<table class="tb_1">
  <%
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Search where UserName='"&UserName&"'"
Set Rs=Conn.execute(Sql)
ShowTotal=Rs(0)
IpTotal=Rs(1)

Sql="Select b.SiteDesc,a.MyCounter,a.IPCounter From CFCount_Search a Left Join CFCount_Search_Set b on a.siteflag=b.siteflag where a.UserName='"&UserName&"' Order By a.IpCounter Desc"
Set Rs=Conn.Execute(Sql)
%>
<tr class="tr_1">
    <td colspan="5">全部时间搜索引擎统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>搜索引擎</td>
    <td colspan="2">PV数量</td>
    <td colspan="2">IP数量</td>
  </tr>
  <%
While Not Rs.Eof
I=I+1
%>
  <tr class="tr_2"> 
    <td> <%=Rs("SiteDesc")%> </td>
    <td><%=Rs("MyCounter")%></td>
    <td class="td_1"><img src=images/bar_blue.gif width=<%=CInt(Rs("MyCounter")/ShowTotal*80)%> height=10><%=MyRate(Rs("MyCounter"),ShowTotal)%>%</td>
    <td><%=Rs("IPCounter")%></td>
    <td class="td_1"><img src=images/bar_green.gif width=<%=CInt(Rs("IpCounter")/IpTotal*80)%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%rs.movenext
wend%>
</table>