# Perl Support File # Variables used by ws_banner.cgi # Variables used by all scripts: /Web_store/ws_global.setup # File Permissions: 644 -rw-r--r-- # NOTE: If you change the filename of this file, change the value of # $default_setup_file in ws_banner.cgi to reflect the file's new name. ############################################################################ # ws_banner.setup # #==========================================================================# # Copyright (c) 1996 - 2003, RDC Software # # WebStore@ratite.com http://www.ratite.com/Perl/WebStore.shtml # # Version: 4.16.00 Date: 01/01/2003 # # # # Full copyright notice can be found in the following files for the # # listed license type: # # # # Single User License: /Docs/Copyright_SingleUser.html # # Server License: /Docs/Copyright_Server.html # # # # This copyright notification can not be altered or removed from this file.# #==========================================================================# # Backslash all @ signs --> \@ <-- Perl 5 compatibility. # ############################################################################ # $timeout is the amount of time (in minutes) each banner listed in %images # is used as the printed to the banners HTML page generated by # this script before switching to the next banner (in numeric sequence) # listed in %images (below). # When $timeout is numeric, the script stores the image's index array # number (from %images) for the last banner image displayed in the file # banner_timeout.file in the /User_carts sub-directory. # The age of banner_timeout.file is queried to determine when to switch # to the next sequential image. # A web browser accessing this script will receive the image whose index # number is currently listed in banner_timeout.file. # The next browser access will receive this image as well if the time-out # file's age has not exceeded the age limit set in $timeout. # Once the first image has been used for the length of time set in $timeout, # the script will store the next image's index number in banner_timeout.file, # overwrite the file (resetting the file's age), and switch to the image # whose index number is now stored in banner_timeout.file, and so on. # When $timeout is set to a non-zero value, it overrides query string data # for "refresh" and "random" and forces single, sequential banner display. # Setting $timeout = '' disables timed banner switching. Each call of this # script will load banners according to the query string data received. # Example Settings: # $timeout = '.167' - 10 seconds # $timeout = '.25' - 15 seconds # $timeout = '.5' - 30 seconds # $timeout = '.75' - 45 seconds # $timeout = '15' - 15 minutes # $timeout = '30' - 30 minutes # $timeout = '45' - 45 minutes # $timeout = '60' - 1 hour # $timeout = '120' - 2 hours # $timeout = '360' - 6 hours # $timeout = '720' - 12 hours # $timeout = '1080' - 18 hours # $timeout = '1440' - 24 hours (1 day) # $timeout = '2880' - 48 hours (2 days) $timeout = ''; # $max_cycles is the number of times each web browser is allowed to cycle # through the images listed in %images (below) when using &refresh=xxx in # the query string of URLs accessing this script. # Refreshes of the banner HTML document generated by this script are # accomplished using the tag in the of the document. # Setting $max_cycles = '' disables cycle protection. # calls to this script will print banners indefinitely to # the web browser at the refresh rate set by &refresh=xxx in the query # string (xxx = seconds). $max_cycles = '2'; # When $browser_errors = 1, print error messages to the web browser for # the following error conditions: # # Image File not Found # Image File not Readable # Banner Key File Error - Read # Banner Key File Error - Write # Setting $browser_errors = '' disables printing viewable error messages # to the web browser. Error messages are printed as hidden comments in # the web browser's Document Source. $browser_errors = '1'; # %body is a hash of arrays listing attributes written to the opening # tag of script generated pages. %body is defined globally in # ws_global.setup for use by all scripts in the WebStore application. # To configure specific attributes for the WS Banner frame, elements of %body # may be re-defined, deleted, or defined for the first time. # For clarity, the entire %body hash may be re-defined below. # To re-define specific attributes for WS Banner, remove the pound sign from # column 1 of the elements of %body below and set to the desired value. # Any combination of elements may be uncommented (pound sign removed). # $body{'background'} is the filename of the background image stored in the # /Web_store/Graphics sub-directory. # # Example: $body{'background'} = 'filename.jpg'; # Deleting an element or setting an element's value = '' disables printing # that attribute to the opening tag. # $body{'background'} = ''; # Background Image # $body{'bgcolor'} = '#FFFFFF'; # Background Color # $body{'text'} = '#000000'; # Text Color # $body{'link'} = '#0000FF'; # Link Color # $body{'alink'} = '#FF0000'; # Active Link Color # $body{'vlink'} = '#0000A0'; # Visited Link Color $body{'leftmargin'} = '0'; # Left Margin $body{'topmargin'} = '12'; # Top Margin $body{'marginheight'} = '12'; # Margin Height $body{'marginwidth'} = '0'; # Margin Width # %images is a hash of arrays listing all banner images for display. # Each image consists of four elements: # Element 0: Image filename - REQUIRED # Element 1: Image file attributes # Element 2: URL wrapped around image file in an tag. # and are generated by this script # when element 2 is present for an image. # Element 3: URL's attributes (onMouseOver, onMouseOut, TARGET=, etc.) # Element 0 # Elements 1, 2, and 3 are OPTIONAL. # If the URL (Element 2) is omitted, element 3 is disregarded. # To avoid backslashing double and single quotes contained in the text of # the elements of %images, you may change any element's delimiter from # single or double quotes to other non-alphanumeric, non-whitespace # characters according to the following chart: # Normal Generic Interpolates # ------ ------- ------------ # ' q// No # " qq// Yes # The delimiter for element 3 of all images in %images has been changed # from ' (single quotes) to ! (exclamation points) to avoid backslashing # of single quotes contained in the text of these elements. # A minimum of two banner images must exist in %images. %images = ( # Keys Elements '01' => ['banner_01.gif', 'ALT="Random Banners - 5 second refresh rate" WIDTH=400 HEIGHT=45 BORDER=1', $main_script_url.'?random=Y&refresh=5', q!TARGET="_self" onMouseOut="window.status=''; return true" onMouseOver="window.status='Random Banners - 5 second refresh rate'; return true"! ], '02' => ['banner_02.gif', 'ALT="Sequential Banners - 5 second refresh rate" WIDTH=312 HEIGHT=40 BORDER=1', $main_script_url.'?refresh=5', q!TARGET="_self" onMouseOut="window.status=''; return true" onMouseOver="window.status='Sequential Banners - 5 second refresh rate'; return true"! ], '03' => ['banner_03.gif', 'ALT="Random Banners - 1 minute refresh rate" WIDTH=400 HEIGHT=40 BORDER=1', $main_script_url.'?random=Y&refresh=60', q!TARGET="_self" onMouseOut="window.status=''; return true" onMouseOver="window.status='Random Banners - 1 minute refresh rate'; return true"! ], '04' => ['banner_04.gif', 'ALT="Sequential Banners - 1 minute refresh rate" WIDTH=400 HEIGHT=40 BORDER=1', $main_script_url.'?refresh=60', q!TARGET="_self" onMouseOut="window.status=''; return true" onMouseOver="window.status='Sequential Banners - 1 minute refresh rate'; return true"! ], '05' => ['banner_05.gif', 'ALT="Cyber Tech Personal Computers - Database Category" WIDTH=400 HEIGHT=40 BORDER=1', $script_url.'/ws400.cgi?category=Cyber+Tech&store=outlet&cart_id=', q!TARGET="main" onMouseOut="window.status=''; return true" onMouseOver="window.status='Cyber Tech Personal Computers - Database Category'; return true"! ], '06' => ['banner_06.gif', 'ALT="InfoTek Personal Computers - Database Category" WIDTH=400 HEIGHT=40 BORDER=1', $script_url.'/ws400.cgi?category=InfoTek&store=outlet&cart_id=', q!TARGET="main" onMouseOut="window.status=''; return true" onMouseOver="window.status='InfoTek Personal Computers - Database Category'; return true"! ], '07' => ['banner_07.gif', 'ALT="Perl Books - Database Category" WIDTH=400 HEIGHT=40 BORDER=1', $script_url.'/ws400.cgi?category=Perl+Books&store=outlet&cart_id=', q!TARGET="main" onMouseOut="window.status=''; return true" onMouseOver="window.status='Perl Books - Database Category'; return true"! ], '08' => ['banner_08.gif', 'ALT="Workstation - Database Category" WIDTH=400 HEIGHT=40 BORDER=1', $script_url.'/ws400.cgi?category=Workstation&store=outlet&cart_id=', q!TARGET="main" onMouseOut="window.status=''; return true" onMouseOver="window.status='Workstation - Database Category'; return true"! ], '09' => ['banner_09.gif', 'ALT="Peripherals - Category Front Page" WIDTH=400 HEIGHT=40 BORDER=1', $script_url.'/ws400.cgi?category=Peripherals.html&store=outlet&cart_id=', q!TARGET="main" onMouseOut="window.status=''; return true" onMouseOver="window.status='Peripherals - Category Front Page'; return true"! ], '10' => ['banner_10.gif', 'ALT="Store Front Page" WIDTH=400 HEIGHT=40 BORDER=1', $script_url.'/ws400.cgi?frontpage=Y&store=outlet&cart_id=', q!TARGET="main" onMouseOut="window.status=''; return true" onMouseOver="window.status='Store Front Page'; return true"! ], ); # DO NOT REMOVE - terminates %images 1; # DO NOT REMOVE __END__