<%@ LANGUAGE="VBSCRIPT" %> <% '*********************************************************************** ' System : ASPBanner ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' ' COPYRIGHT NOTICE ' ' See attached Software License Agreement ' ' (c) Copyright 2000 - 2001 by CJWSoft. All rights reserved '*********************************************************************** %> <% CHECKFOR = "Admin" %> <% Banner_ID = Request("Banner_ID") Zone_ID = Request("Zone_ID") Show_Banners = Request("Show_Banners") If Zone_ID = "" Then Zone_ID = 1 End If PostPage = "locations.asp" WhichPage = Request("WhichPage") If WhichPage = "" then WhichPage = 1 end if MyPageSize = Request("MyPageSize") If MyPageSize = "" Then MyPageSize = 15 End If %> <% =App_Name %> >
Banners Per Page
> 5 > 50
> 15 > 100
> 30
  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") RowCount = 0 Function FileFound(FileName) Dim FileObj FileFound = True Set fs = CreateObject("Scripting.FileSystemObject") On Error Resume Next Set FileObj = fs.OpenTextFile(FileName, 1, False, 0) If Err.Number <> 0 Then Err.Clear FileFound = False Exit Function End If FileObj.Close Set fs = Nothing End Function %>
Banners For Area <% =Zone_ID %>      Return to Main Screen.
<% Set ConnClassified = Server.CreateObject("ADODB.Connection") ConnClassified.Open BannerConnectionString Set cmdTemp = Server.CreateObject("ADODB.Command") Set CmdListBanners = Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "SELECT Banners.* FROM Banners WHERE (Zone_ID = " & Zone_ID & ")" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = ConnClassified CmdListBanners.Open cmdTemp, , 1, 1 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 %>

(<% = TotalRecords %> Banner<% If TotalRecords > 1 Then %>s<% End If%> Found)   <% If CInt(MaxPages) <> 1 Then %> (Showing <% = ((Span - MyPageSize) + 1) %> - <% If CInt(MaxPages) = CInt(WhichPage) Then %><% =TotalRecords %><% Else %><% =Span %><% End If %>)   (Page <% =WhichPage %> of <% =MaxPages%>)

<% End If %>

<% If Show_Banners <> "True" Then %> <% End If %> <% Else %>

No Banners have been set up for this Area 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 cmdTemp = Server.CreateObject("ADODB.Command") Set CmdRetrieveImpressions = Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "SELECT SUM(Banner_Impressions) AS TotalImpressions, SUM(Banner_Clicks) AS TotalClicks FROM Banner_Stats WHERE (Banner_ID = " & CmdListBanners("Banner_ID") & ")" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = ConnPasswords CmdRetrieveImpressions.Open cmdTemp, , 0, 1 %> <% If Show_Banners = "True" Then Cellbgcolor = "#F3F3EB" %> <% End If %> <% 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 
&Zone_ID=<% =Zone_ID %>">Edit Banner &Zone_ID=<% =Zone_ID %>&WhichPage=<% = WhichPage %>&MyPageSize=<% =MyPageSize%>&Show_Banners=<% =Show_Banners %>#statsbookmark">View Banner Statistics <% =CmdListBanners("Banner_Name") %> <%= CmdListBanners("Banner_Status") %> <% =CmdListBanners("Banner_Type") %> <%= CmdListBanners("Banner_Weight") %> <%= CmdListBanners("Banner_Begin_Date") %> <%= CmdListBanners("Banner_End_Date") %> <%= 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=<% =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_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) %> (<% = ((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) %> <% If Banner_ID= "" Then %>







<% Else %> <% End If %>