www.gusucode.com > 乘风网站推广系统 3.99 (acc)码程序 > CF_Manage_3.asp

    <%
'乘风网站推广系统 Access版
'作者QQ:178575
'作者EMail:yliangcf@163.com
'作者网站:http://www.qqcf.com
'详细简介:http://www.qqcf.com/?action=list&list=cfwztg
'上面有程序在线演示,安装演示,使用疑难解答,最新版本下载等内容
'因为这些内容可能时常更新,就没有放在程序里,请自己上网站查看
%>
<%If Action="alexatj" Then%>
   
<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td> <Select  name="adddate" size="1">
          <option value="">全部日期</option>
          <%
Sql="Select AddDate From CFWztg_Alexa_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr> 
</table>

<%
AddDate=ChkStr(Request("AddDate"),3)
%>
<%If AddDate="" Then%>
<table class="tb_1">
 <%
Sql="Select Sum(IpCounter) As IpCounter,Sum(Alexacounter) As Alexacounter,'' As AddDate From CFWztg_Alexa_Day Where UserName='"&UserName&"'"
Set Rs = Conn.Execute(Sql)

%>
  <tr class="tr_1">
    <td colspan="4">最近全部日期:Alexa统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>点击数</td>
    <td>Alexa数</td>
    <td>Alexa安装比率</td>
    <td>详细推广记录</td>
  </tr>
  <tr class="tr_2"> 
    <td><%=Rs("IpCounter")%></td>
    <td><%=Rs("AlexaCounter")%></td>
    <td><%=MyRate(Rs("AlexaCounter"),Rs("IpCounter"))%>%</td>
    <td><a href="?Action=lylist&AddDate=<%=Rs("AddDate")%>">[查看]</a></td>
  </tr>
</table>
<%Else%>
<table class="tb_1">
 <%
Sql="Select Sum(IpCounter),Sum(Alexacounter) From CFWztg_Alexa_Day Where UserName='"&UserName&"'"
Set Rs = Conn.Execute(Sql)
IpTotal = Rs(0)
AlexaTotal = Rs(1)


Sql="Select * From CFWztg_Alexa_Day Where UserName='"&UserName&"' And AddDate=#"&AddDate&"# Order By AlexaCounter Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1
If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=50
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1">
    <td colspan="7">日期:<%=AddDate%> Alexa统计</strong></td>
  </tr>
  <tr class="tr_2"> 
    <td>广告ID</strong></td>
    <td colspan="2">点击数</strong></td>
    <td colspan="2">Alexa数</strong></td>
    <td>Alexa安装比率</strong></td>
    <td>详细推广记录</strong></td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs("Ad_ID")%></td>
    <td><%=Rs("IpCounter")%></td>
    <td><img src=images/bluebar.gif width=<%=MyRateWidth(Rs("IpCounter"),IpTotal,100)%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
    <td><%=Rs("AlexaCounter")%></td>
    <td><img src=images/greenbar.gif width=<%=MyRateWidth(Rs("AlexaCounter"),AlexaTotal,100)%> height=10><%=MyRate(Rs("AlexaCounter"),AlexaTotal)%>%</td>
    <td><%=MyRate(Rs("AlexaCounter"),Rs("IpCounter"))%>%</td>
    <td><a href="?Action=lylist&AddDate=<%=Rs("AddDate")%>">[查看]</a></td>
  </tr>
  <%
Mypagesize=Mypagesize-1
Rs.MoveNext
Wend
%>
</table>

<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Page=1">第一页</a>
<%
If Page>1 Then%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Page=<%=Page-1%>'>上一页</a>
            <%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Page=<%=Page+1%>'>下一页</a>
<%
End If
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Page=<%=totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=page%></font>/<%=totalpage%>页&nbsp;&nbsp;共<%=totalrs%>条记录&nbsp;&nbsp;每页显示<%=rs.pagesize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?action="&action&"&adddate="&adddate&"&page="& i  
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>

<%End If%>


<%If Action="ipareatj" Then%>
<table class="tb_1">
  <tr> 
    <form name="form1" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_Area_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_Area_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_Area_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_Area_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> IP地区统计</td>
  </tr>
  <tr> 
    <td>序号</td>
    <td>地区</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("IpArea")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>


<%If Action="webwidthtj" Or Action="webheighttj" Or Action="webtoptj" Or Action="weblefttj" Or Action="mousetoptj" Or Action="mouselefttj"  Then%>

<table class="tb_1">
  <tr>
    <td class="tr_1">其它统计请选择以下操作:</td>
  </tr>
<form name="form1" action="#">
<tr> 
    <td>
&nbsp;&nbsp;<input style="width:85px" type="button" name="b1" value="页面宽度统计"onClick="location.href='?Action=webwidthtj';"<%If Action="webwidthtj" Then Response.write " class='button_2'"%>>
&nbsp;&nbsp;<input style="width:85px" type="button" name="b2" value="页面高度统计"onClick="location.href='?Action=webheighttj';"<%If Action="webheighttj" Then Response.write " class='button_2'"%>>
&nbsp;&nbsp;<input style="width:85px" type="button" name="b3" value="页面顶部统计"onClick="location.href='?Action=webtoptj';"<%If Action="webtoptj" Then Response.write " class='button_2'"%>>
&nbsp;&nbsp;<input style="width:85px" type="button" name="b4" value="页面左边统计"onClick="location.href='?Action=weblefttj';"<%If Action="weblefttj" Then Response.write " class='button_2'"%>>
&nbsp;&nbsp;<input style="width:115px" type="button" name="b5" value="鼠标点击顶部统计" onClick="location.href='?Action=mousetoptj';"<%If Action="mousetoptj" Then Response.write " class='button_2'"%>>
&nbsp;&nbsp;<input style="width:115px" type="button" name="b6" value="鼠标点击左边统计" onClick="location.href='?Action=mouselefttj';"<%If Action="mouselefttj" Then Response.write " class='button_2'"%>>
	</td>
  </tr>
</form>

</table>
<%End If%>



<%If Action="webwidthtj" Then%>
<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_WebWidth_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_WebWidth_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_WebWidth_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_WebWidth_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> 来源网页宽度统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>序号</td>
    <td>大小</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("WebWidth")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>




<%If Action="webheighttj" Then%>

<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_WebHeight_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_WebHeight_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_WebHeight_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_WebHeight_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> 来源网页高度统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>序号</td>
    <td>大小</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
   <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("WebHeight")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>




<%If Action="webtoptj" Then%>

<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_WebTop_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_WebTop_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_WebTop_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_WebTop_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> 来源网页顶部统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>序号</td>
    <td>大小</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("WebTop")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>




<%If Action="weblefttj" Then%>

<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_WebLeft_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_WebLeft_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_WebLeft_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_WebLeft_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> 来源网页左部统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>序号</td>
    <td>大小</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("WebLeft")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>




<%If Action="mousetoptj" Then%>

<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_MouseTop_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_MouseTop_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_MouseTop_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_MouseTop_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> 鼠标点击顶部统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>序号</td>
    <td>大小</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("MouseTop")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>

  </tr>
</table>
<%End If%>




<%If Action="mouselefttj" Then%>

<table class="tb_1">
  <tr> 
    <form name="form6" method="post" action="?Action=<%=Action%>">
      <td colspan="4" > <Select  name="adddate" size="1">
          <option value="">请选择日期</option>
          <%
Sql="Select AddDate From CFWztg_MouseLeft_Day Where UserName='"&UserName&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("AddDate")&"'"
 If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select> <Select  name="ad_id" size="1">
          <option value="">请选择广告</option>
          <%
Sql="Select Ad_ID From CFWztg_MouseLeft_Day Where UserName='"&UserName&"' Group By Ad_ID Order By Ad_ID Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("Ad_ID")&"</option>"
 Ad_ID_2=Rs("Ad_ID")
Rs.MoveNext
Wend
%>
        </select> <input type="submit" name="Submit" value="查询"> </td>
    </form>
  </tr>
  <%
AddDate=ChkStr(Request("AddDate"),3)
Ad_ID=ChkStr(Request("Ad_ID"),2)

If AddDate="" Then AddDate=Date()
If Ad_ID="" Then Ad_ID=CLng(Ad_ID_2)

Sql="Select Sum(IpCounter) From CFWztg_MouseLeft_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&" And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.Execute(Sql)
IpTotal=Rs(0)

Sql="Select * From CFWztg_MouseLeft_Day where UserName='"&UserName&"' And Ad_ID="&Ad_ID&"  And Datediff('d',AddDate,'"&AddDate&"')=0  Order By IpCounter Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize=10
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr class="tr_1"> 
    <td colspan="4">日期:<%=AddDate%> 广告ID:<%=Ad_ID%> 鼠标点击左边统计</td>
  </tr>
  <tr class="tr_2"> 
    <td>序号</td>
    <td>大小</td>
    <td colspan="2">数量</td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td>  <%=Rs("MouseTop")%> </td>
    <td> 
        <%=Rs("IpCounter")%>
      </td>
    <td><img src=images/greenbar.gif width=<%=Rs("IpCounter")/IpTotal*200%> height=10><%=MyRate(Rs("IpCounter"),IpTotal)%>%</td>
  </tr>
  <%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Ad_ID%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=TotalRs%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&AddDate="&AddDate&"&Ad_ID="&Ad_ID&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>
  </tr>
</table>
<%End If%>