%@ 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" %> <% Banner_ID = Request("Banner_ID") Zone_ID = Request("Zone_ID") Show_Banners = Request("Show_Banners") If Request("EditButton") = "Edit Zone" And Zone_ID <> "" Then Response.Redirect("edit_zone.asp?Zone_ID=" & Zone_ID) Response.End End If If Request("DeleteButton") = "Delete Zone" And Zone_ID <> "" Then Response.Redirect("delete_zone.asp?Zone_ID=" & Zone_ID) Response.End End If If Request("ShowSubmit") = "Display Banners" And Zone_ID = "" Then %> <% End If PostPage = "zones.asp" WhichPage = Request("WhichPage") If WhichPage = "" then WhichPage = 1 end if MyPageSize = Request("MyPageSize") If MyPageSize = "" Then MyPageSize = 15 End If %>
Zones are
the locations on your site where your banners are displayed.
Zone Report Overview
|
<%
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 = " & Zone_ID & ")"
CmdBannerTemp.CommandType = 1
Set CmdBannerTemp.ActiveConnection = ConnClassified
CmdListBanners.Open CmdBannerTemp, , 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%>)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<%
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 %>