<%@ LANGUAGE="VBSCRIPT" %> <% '*********************************************************************** ' System : ASPBanner Unlimited ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' ' COPYRIGHT NOTICE ' ' See attached Software License Agreement ' ' (c) Copyright 2000 - 2003 by CJWSoft. All rights reserved '*********************************************************************** %> <% CHECKFOR = "Admin" %> <% PostPage = "zone_overview.asp" Show_Banners = Request("Show_Banners") WhichPage = Request("WhichPage") If WhichPage = "" then WhichPage = 1 end if MyPageSize = Request("MyPageSize") If MyPageSize = "" Then MyPageSize = 50 End If %> <% =App_Name %> >
Return to Main Screen.

Zones are the locations on your site where your banners are displayed.

<% Start_Date = Request("Start_Date") End_Date = Request("End_Date") If Start_Date = "" or IsDate(Start_Date) = False Then 'Start_Date = month(NOW - 7) & "/" & day(NOW - 7) & "/" & year(NOW - 7) Start_Date = InternationalDate(NOW - 7) End If If End_Date = "" or IsDate(End_Date) = False Then 'End_Date = month(NOW) & "/" & day(NOW) & "/" & year(NOW) End_Date = InternationalDate(NOW) End If If BannerDatabaseType = "SQL" Then MoreCriteria = " And (Banner_Day >= '" & InternationalDate(Start_Date) & "') AND (Banner_Day <= '" & InternationalDate(End_Date) & "')" ElseIf BannerDatabaseType = "MSACCESS" Then MoreCriteria = " And (Banner_Day >= #" & InternationalDate(Start_Date) & "#) AND (Banner_Day <= #" & InternationalDate(End_Date) & "#)" End IF %>

This date search only effects the date range of banner statistics shown in each zone.
This allows you to get a overall idea of how well all the banners are doing.
It does not do anything other than that. All zones and banners will be always be shown.
 

Stats Start_Date  Stats End_Date

Show Banners >

<% ' This setting from check_user_inc.asp purposely overridden ' To make record cycling features work ok on this page THISPAGE = Request.ServerVariables("script_name") BASE_URL = "http://" & Request.ServerVariables("HTTP_HOST") & Replace(Request.ServerVariables("URL"),"aspbanner/zones.asp","") InjectBanner_Directory = BASE_URL & "aspbanner/injectbanner.asp" RowCount = 0 Set ConnBannerSystem = Server.CreateObject("ADODB.Connection") ConnBannerSystem.Open BannerConnectionString Set CmdBannerTemp = Server.CreateObject("ADODB.Command") Set CmdGetZones = Server.CreateObject("ADODB.Recordset") CmdBannerTemp.CommandText = "SELECT Banner_Zones.* FROM Banner_Zones" CmdBannerTemp.CommandType = 1 Set CmdBannerTemp.ActiveConnection = ConnBannerSystem CmdGetZones.Open CmdBannerTemp, , 1, 3 While Not CmdGetZones.EOF TotalImpressions = 0 TotalClicks = 0 %>
Banners For ( <% =CmdGetZones("Zone_Name") %> )
<% Set ConnClassified = Server.CreateObject("ADODB.Connection") ConnClassified.Open BannerConnectionString Set CmdBannerTemp = Server.CreateObject("ADODB.Command") Set CmdListBanners = Server.CreateObject("ADODB.Recordset") CmdBannerTemp.CommandText = "SELECT Banners.* FROM Banners WHERE (Zone_ID = " & CmdGetZones("Zone_ID") & ")" 'Response.Write CmdBannerTemp.CommandText 'Response.End CmdBannerTemp.CommandType = 1 Set CmdBannerTemp.ActiveConnection = ConnClassified CmdListBanners.Open CmdBannerTemp, , 1, 1 ShowTableEnd = False If Not CmdListBanners.EOF Then CmdListBanners.movefirst CmdListBanners.pagesize = MyPageSize MaxPages = CInt(CmdListBanners.pagecount) MaxRecords = CInt(CmdListBanners.pagesize) CmdListBanners.absolutepage = WhichPage HowManyRecords = 0 HowManyFields = CmdListBanners.fields.count -1 TotalRecords = CmdListBanners.recordcount Span = (MyPageSize * WhichPage) ShowTableEnd = True %>
<% If Show_Banners <> "True" Then %> <% End If %> <% Else %>

No Banners have been set up for this Zone yet.

<% End If %> <% DO UNTIL CmdListBanners.EOF Or HowManyRecords >= MaxRecords If RowCount = 2 Then RowCount = 0 End If If RowCount = 0 Then Cellbgcolor = "#F3F3EB" Else Cellbgcolor = "#FFFFFF" End If RowCount = RowCount + 1 If CmdListBanners("Banner_Status") = "Active" Then Status_Cellbgcolor = "#00FF00" ElseIf CmdListBanners("Banner_Status") = "Hold" Then Status_Cellbgcolor = "#FFFF00" ElseIf CmdListBanners("Banner_Status") = "Waiting" Then Status_Cellbgcolor = "#98B0EF" ElseIf CmdListBanners("Banner_Status") = "ImpHit" Then Status_Cellbgcolor = "#FF9900" ElseIf CmdListBanners("Banner_Status") = "Expired" Then Status_Cellbgcolor = "#FF0000" End If Set CmdBannerTemp = Server.CreateObject("ADODB.Command") Set CmdRetrieveImpressions = Server.CreateObject("ADODB.Recordset") CmdBannerTemp.CommandText = "SELECT SUM(Banner_Impressions) AS TotalImpressions, SUM(Banner_Clicks) AS TotalClicks FROM Banner_Stats WHERE (Banner_ID = " & CmdListBanners("Banner_ID") & ")" & MoreCriteria CmdBannerTemp.CommandType = 1 Set CmdBannerTemp.ActiveConnection = ConnBannerSystem CmdRetrieveImpressions.Open CmdBannerTemp, , 0, 1 'response.write CmdBannerTemp.CommandText 'response.end %> <% If Show_Banners = "True" Then Cellbgcolor = "#F3F3EB" %> <% End If TotalImpressions = TotalImpressions + Cint(CmdRetrieveImpressions("TotalImpressions")) TotalClicks = TotalClicks + Cint(CmdRetrieveImpressions("TotalClicks")) %> <% If Show_Banners = "True" Then %> <% End If%> <% CmdListBanners.MoveNext HowManyRecords = HowManyRecords+1 Loop %> <% If ShowTableEnd Then %>
  Name  Status  Type  Weight  Begins  Ends    Limit  Imp  Clicks  ClickThru   
  Name  Status  Type  Weight  Begins  Ends    Limit  Imp  Clicks  ClickThru   
&TotalImpressions=<% =CmdRetrieveImpressions("TotalImpressions") %>&TotalClicks=<% =CmdRetrieveImpressions("TotalClicks") %>&Start_Date=<% =Start_Date %>&End_Date=<% =End_Date %>&FromNewReport=True', 600, 600)">View Banner Statistics <% =CmdListBanners("Banner_Name") %> <%= CmdListBanners("Banner_Status") %> <% =CmdListBanners("Banner_Type") %> <%= CmdListBanners("Banner_Weight") %> <%= CmdListBanners("Banner_Begin_Date") %> <%= CmdListBanners("Banner_End_Date") %> &Zone_ID=<% =Zone_ID %>">Reset Banner Stats <%= CmdListBanners("Banner_Impressions_Purchased") %> <%= CmdRetrieveImpressions("TotalImpressions") %> <%= CmdRetrieveImpressions("TotalClicks") %> <% If CmdRetrieveImpressions("TotalImpressions") > 0 AND CmdRetrieveImpressions("TotalClicks") > 0 then Response.Write(FormatPercent((CmdRetrieveImpressions("TotalClicks")/CmdRetrieveImpressions("TotalImpressions")),1)) %> &Zone_ID=<% =CmdListBanners("Zone_ID") %>&User_ID=<% =CmdListBanners("User_ID") %>">Edit Banner &Zone_ID=<% =CmdListBanners("Zone_ID") %>">Delete Banner

<% If CmdListBanners("Banner_Type") = "Image" Then %> " target="_blank"> " src="<% =CmdListBanners("Banner_Image_URL") %>" alt="<% =CmdListBanners("Banner_ALT_Text") %>" <% If CmdListBanners("Banner_Width") <> "" Then %>width="<% =CmdListBanners("Banner_Width") %>" <% End If %> <% If CmdListBanners("Banner_height") <> "" Then %>height="<% =CmdListBanners("Banner_height") %>" <% End If %>> <% If CmdListBanners("Banner_Text_Message") <> "" Then %>
" target="_blank"><% =CmdListBanners("Banner_Text_Message") %>

<% Else %>

<% End If %> <% Else %> <% =CmdListBanners("Banner_HTML_Code") %> <% End If %>
<% End If%>
<% If CInt(MaxPages) <> 1 Then %>

<% For MyCounter = 1 to MaxPages TempSpan = (MyPageSize * MyCounter) %> &Banner_ID=<% =Banner_ID %>&WhichPage=<% = MyCounter %>&MyPageSize=<% =MyPageSize%>&Show_Banners=<% =Show_Banners %>">(<% = ((TempSpan - MyPageSize) + 1) %> - <% If CInt(MaxPages) = CInt(MyCounter) Then %><% =TotalRecords %><% Else %><% =TempSpan %><% End If %>)  <% If MyCounter Mod 10 = 0 then %>
<% End If %> <% Next %>

<% End If %> <% TempSpan2 = (MyPageSize * WhichPage + 1) %> Overall Zone Statistics
Imp  Clicks  ClickThru 
<%= TotalImpressions %> <%= TotalClicks %> <% If TotalImpressions > 0 AND TotalClicks > 0 then Response.Write(FormatPercent((TotalClicks/TotalImpressions),1)) %>



<% CmdGetZones.MoveNext Wend %>