# Perl Support File # Variables used by ws_editor.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_editor.cgi to reflect the file's new name. ############################################################################ # outlet_editor.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. # # Variables containing @ signs must be enclosed in " (double quotes). # # # # All other variables are enclosed in ' (single quotes). # # # # If the value you store in a variable enclosed in single quotes requires # # the use of a single quote, backslash the imbedded single quote: # # # # EXAMPLE: $global_page_title = 'Joe\'s Auto Parts' # ############################################################################ #--------------------------------------------------------------------------# # General Settings #--------------------------------------------------------------------------# # $data_file is the pipe delimited flatfile database being edited. $data_file = 'outlet.data'; # $global_page_title is used in the of all HTML pages, and in the # Subject and Body of generated e-mail messages when a new user registers. $global_page_title = 'Inventory Database Editor'; # @store_files is an array listing the WebStore's script name in element # zero followed by a listing of all WebStore store setup files which # reference the database listed in $data_file (above). # When the database listed in $data_file is sorted, WS Editor will update # @categories in each store setup file listed in @store_files. # # When the name of your WebStore script is placed in element zero, an HTML # page of WebStore query string links, one for each database category, will # be created in the /Databases sub-directory named outlet.data.html # ($data_file.html). If element zero ends in :E, the HTML file created # will contain two query string links for each database category. The # second link for each category will have extended characters converted, # allowing you to cut and paste these links directly into your WebStore's # HTML pages from a web browser when viewing outlet.data.html. # @categories in a WebStore setup file is a listing of database categories # used to print the drop down select element in WebStore's search engine. # $category_fld_num (below) must be set to the same database field number as # $category_fld_num in the WebStore setup file(s) listed in @store_files. # WS Editor will add the extension '.setup' to each file name listed in # @store_files if a file name does not end in '.setup'. # If a WebStore store setup file listed in @store_files does not exist, # WS Editor will bypass the file name. No error is generated when this occurs. # If you do not use WebStore's search engine or you do not want WS Editor to # update WebStore's setup file(s), set @store_files = (); # ELEMENT: zero one two @store_files = ('ws400.cgi:E', 'outlet', 'No_Frames'); # $max_items is the maximum number of items returned to the web browser # by the search engine. $max_items defaults to 30 if mis-configured. $max_items = '30'; # 30 # If $ascending_sort = 1, sort drop down selects are intially set to # perform ascending alpha sorts of the records in the database. # If $ascending_sort = 0, sort drop down selects are intially set to # perform descending alpha sorts of the records in the database. $ascending_sort = '1'; # If $sort_buttons = 1, Print "Sort/Add" and "Sort/Remove" buttons. # Setting $sort_buttons = '' disables printing of the "Sort/Add" and # "Sort/Remove" buttons. # The "Sort/Add" and "Sort/Remove" functions assign sequential database # item id numbers after sorting database records by their category name. # If you use item id query strings on the HTML pages of your WebStore, # you should not use these functions to sort the records in the database. # Removing the "Sort/Add" and "Sort/Remove" buttons from WS Editor # will prevent accidental submission of these functions. $sort_buttons = '1'; # 1 # If $single_spacing = 1, reduce multiple imbedded spaces to one space in # database fields for all functions which modify the database. # If $single_spacing = 0, ignore multiple imbedded spaces in database fields. # WS Editor always removes leading and trailing whitespace from all fields. $single_spacing = '1'; # 1 # $return_link_url is an absolute URL link printed at the bottom # of all pages in WebStore whose format is: # # $return_link_url = 'http://www.YourDomain.xxx/AnyDirectories/Filename.html'; # # Setting $return_link_url = '' disables printing of this URL. # # $script_url is internal to WS Editor, derived from the value of # $main_script_url set in ws_global.setup. # # $return_link_title is the absolute URL's description. $return_link_url = $script_url.'/ws400.cgi'; $return_link_title = 'Test WebStore'; # $email_link_url is an email link printed at the bottom of all # pages in WebStore. # # Setting $email_link_url = '' disables printing of this link. # # $email_link_title is the email link's description. $email_link_url = "WebStore\@ratite.com"; $email_link_title = 'Mail to: '.$email_link_url; #--------------------------------------------------------------------------# # Database of Items for Sale #--------------------------------------------------------------------------# # $category_fld_num is the array index number or field number of the # "Category" field within a database record of outlet.data. # 0 | 1 | 2 | 3 | 4 | 5 | 6 # Item | Shipping | Category | Price | Name | Description | Id # NOTE: First element of an array is '0'. $category_fld_num = '2'; # %FIELDS is a hash of arrays defining each database field and it's # corresponding field input for the search engine forms used in WS Editor. # The numeric KEYS permit ascending, sequential sorting of the arrays # in %FIELDS in the order of occurrence in database records. # For example, KEYS 00, 01, 02 correspond to database fields 0, 1, and 2. # The field arrays in %FIELDS must be listed in the order of the field's # occurrence in the database with the field array for 'Id' defined as the # last array in %FIELDS. # The 'Id' field array in %FIELDS must have 'Id' as element zero's value and # 'id_field' as element one's value. # Valid INPUT types are "select", "text", and "textarea". #------------------------------------------------------------------------------# # EXAMPLE: INPUT TYPE="text" # # Field 00: <INPUT NAME="name" TYPE="text" SIZE="35" MAXLENGTH="150"> # # Elements of Field 00: # # 00 0 1 2 # '00' => ['Name', 'text', 'SIZE="35" MAXLENGTH="150"'], # # 00 = The form element's array index number # # 0 = Descriptive <TABLE> header and <INPUT NAME="name"> # For INPUT NAME, the script replaces spaces with _ (underscore) # and switches all characters to lowercase. # # 1 = <INPUT TYPE="text"> # # 2 = Attributes for the <INPUT TYPE> (size, maxlength, etc.) #------------------------------------------------------------------------------# # EXAMPLE: INPUT TYPE="textarea" # # Field 07: <TEXTAREA NAME="description" ROWS="4" COLS="58"></TEXTAREA> # # "textarea" input types are identical to "text" input types. # # 07 0 1 2 # '07' => ['Description', 'textarea', 'ROWS="4" COLS="58"'], # # 07 = The form element's array index number # # 0 = Descriptive <TABLE> header and <INPUT NAME="name"> # For INPUT NAME, the script replaces spaces with _ (underscore) # and switches all characters to lowercase. # # 1 = <INPUT TYPE="text"> # # 2 = Attributes for the <INPUT TYPE> (size, maxlength, etc.) #------------------------------------------------------------------------------# # EXAMPLE: INPUT TYPE="select" # # 04 0 1 2 # '04' => ['Category', 'select', 'Option1:Option2:Option3'], # # 04 = The form element's array index number # # 0 = Descriptive <TABLE> header and <INPUT NAME="name"> # For INPUT NAME, the script replaces spaces with _ (underscore) # and switches all characters to lowercase. # # 1 = <INPUT TYPE="select"> # # 2 = Colon delimited listing of options. # Options may be listed on multiple lines. # # To select an option's value as <OPTION SELECTED>, precede the # the option with SELECTED~ # # '04' => ['Category', 'select', 'Option1:SELECTED~Option2:Option3'], # # Option2 will be printed as the <OPTION SELECTED>. #------------------------------------------------------------------------------# # 0 | 1 | 2 | 3 | 4 | 5 | 6 # Item | Shipping | Category | Price | Name | Description | Id # NOTE: First element of an array is '0'. %FIELDS = ( # Field Array Elements Dbase Field # KEYS zero one two '00' => ['Item', 'text', 'SIZE="20" MAXLENGTH="100"' ], # 0 '01' => ['Shipping', 'text', 'SIZE="20" MAXLENGTH="100"' ], # 1 '02' => ['Category', 'text', 'SIZE="68"' ], # 2 '03' => ['Price', 'text', 'SIZE="20" MAXLENGTH="30"' ], # 3 '04' => ['Name', 'text', 'SIZE="68"' ], # 4 '05' => ['Description', 'textarea', 'ROWS="4" COLS="58"' ], # 5 '06' => ['Id', 'id_field'], # 6 ); # DO NOT REMOVE - terminates %FIELDS #--------------------------------------------------------------------------# # Security #--------------------------------------------------------------------------# # $user_security is the security group assigned to all users when they # register. Security levels can be modified for any user listed in the # user file by removing "add, delete, or modify" from the user's # record. # Valid security attributes are: add delete modify OR admin # "admin" gives full permissions and is equal to "add delete modify" # Security attributes may be listed in any order. # User filename and location: /Web_store/Databases/ws_userfile.users $user_security = 'add delete modify'; # If $allow_register = 0, new user registration is not allowed. # $email_register and $generate_password are also disabled, # regardless of their values in this setup file. # If $allow_register = 1 and $email_register = 0, new user registration # is allowed and users are added immediately to the user database. # If $allow_register = 1 and $email_register = 1, new user registration # is allowed. New user's details are emailed to the database administrator # and must be manually added to the user's database. Add the line # from the administrative email containing the encrypted password # which is labeled "Database Record:" to the user's database. $allow_register = '1'; # 1 $email_register = '0'; # 0 # If $generate_password = 1, the script uses it's password and # encryption routines to generate new user passwords. Password # is emailed to the new user and must be retrieved by the user # before logging in. # If $generate_password = 0, new users are allowed to enter a # password of their choice and may logon immediately. $generate_password = '0'; # 0 # If $allow_search = 1, allow users to search for usernames. # If $allow_search = 0, username search is disabled. $allow_search = '1'; # 1 # If $duplicate_check = 1, the script checks for the possible # duplication of a user's details before registering a new user. # If $duplicate_check = 0, duplicate checking is disabled. $duplicate_check = '1'; # 1 #--------------------------------------------------------------------------# # Statistics #--------------------------------------------------------------------------# # $log_file is the name of the visitior log file. # Maintain a formatted or | (pipe) delimited log file for the first access # to WS Editor consisting of: # # Access Date and Time 21/Dec/1996 12:54:03 PM # $ENV{'HTTP_USER_AGENT'} Type of Browser # $ENV{'HTTP_REFERER'} Referring web page # $ENV{'REMOTE_ADDR'} Remote address # $ENV{'REMOTE_HOST'} Remote host # Setting $log_file = '' disables the statistics log file routine. $log_file = 'WSEditor_Access.stats'; # $log_file_size = the maximum size of log file before file overwrite occurs. # Setting $log_file_size = '' disables overwrite of the log file. $log_file_size = '25000'; # log file size = 25K # Setting $log_delimiter = 'Y' will | (pipe) delimit the fields of each # record written to the log file. # Setting $log_delimiter = '' disables pipe delimited fields. Fields are # separated by four spaces. $log_delimiter = ''; # $stat_file is the name of the WS Editor query stat file. # Maintain a formatted or | (pipe) delimited stat file consisting of: # # Access Date and Time 21/Dec/1996 12:54:03 PM # Setup File Setup filename (file extension truncated) # Request Primary Request (query name=value pair) # $ENV{'REMOTE_ADDR'} Remote address # Process ID Script process ID # Query String name=value pairs present in form POST submissions. # Values for login, password, username, and any # field beginning with cc or chk are replaced with # * (asterisks). Field names are case insensitive. # Setting $stat_file = '' disables the query stat file routine. $stat_file = 'WSEditor_Query.stats'; # $stat_file_size = the maximum size of query stat file before file overwrite # occurs. # Setting $stat_file_size = '' disables overwrite of the stat file. $stat_file_size = '50000'; # log file size = 50K # Setting $stat_delimiter = 'Y' will | (pipe) delimit the fields of each # access record written to the query stat file. # Setting $stat_delimiter = '' disables pipe delimited fields. Fields are # separated by four spaces. $stat_delimiter = ''; #--------------------------------------------------------------------------# # HTML Display #--------------------------------------------------------------------------# # Dimensions of table's borders, space between text and columns, and # width of borders between rows can be modified by adjusting the values # of $BORDER, $CELLPADDING, and $CELLSPACING. # Setting $BORDER = '0' disables border display. $BORDER = '4'; # 4 = Display table border. $CELLPADDING = '3'; # 3 = <TABLE CELLPADDING> value $CELLSPACING = '0'; # 0 = <TABLE CELLSPACING> value # %body is a hash of arrays listing attributes written to the opening # <BODY> 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 WS Editor, 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 Editor, 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'; # The script determines whether to precede $body{'background'} with # $graphics_url or $ssl_graphics_url depending on the setting of $ssl_url # and by including a name=value pair for 'use_ssl' in the query string of # the URL accessing ws_editor.cgi: ws_editor.cgi?use_ssl=Y. # Under most conditions, WS Editor is accessed without the use of SSL. # # $graphics_url/$body{'background'} OR $ssl_graphics_url/$body{'background'} # Deleting an element or setting an element's value = '' disables printing # that attribute to the opening <BODY> tag. # $body{'background'} = ''; # Background Image $body{'bgcolor'} = '#F0F8FF'; # 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'} = ''; # Left Margin $body{'topmargin'} = ''; # Top Margin $body{'marginheight'} = ''; # Margin Height $body{'marginwidth'} = ''; # Margin Width # $header_font and $header_face, set in ws_global.setup, are used with # $header_fnt_clr to develop an opening <FONT> tag for use in table # header rows. # $header_bkg_clr and $header_fnt_clr are the background color and # font color used in table header rows <TH> (respectively) to display # table page headers. # Setting $header_bkg_clr = '' disables $header_bkg_clr. # Setting $header_fnt_clr = '' disables $header_fnt_clr. # Defaults to <BODY BGCOLOR or BACKGROUND> and <BODY TEXT> attributes. $header_bkg_clr = '#0000A0'; # Darkblue $header_fnt_clr = '#FFFFFF'; # White # $data_font and $data_face, set in ws_global.setup, are used with # $extc_fnt_clr, $error_fnt_clr, $html_fnt_clr, and $message_fnt_clr # to develop opening <FONT> tags for use in table data rows. # $message_fnt_clr is the font color used in table header rows <TH> # to display helpful messages to users. # Setting $message_fnt_clr = '' disables $message_fnt_clr. # Defaults to <BODY TEXT> attribute. $message_fnt_clr = '#0000A0'; # Darkblue # $error_fnt_clr is the font color used in table header rows <TH> # to display user key entry error messages or additional information # concerning the function just performed (or submitted) by the user. # Setting $error_fnt_clr = '' disables $error_fnt_clr. # Defaults to <BODY TEXT> attribute. $error_fnt_clr = '#C00000'; # Darkred # $extc_fnt_clr is the font color used in all "Modify Item" functions # to display the extended HTML character set ( , ©, etc.). # $extc_fnt_clr must be defined and can not be disabled. # $extc_fnt_clr defaults to '#0000FF' if mis-configured. $extc_fnt_clr = '#0000FF'; # Blue # $html_fnt_clr is the font color used in all "Modify Item" functions # to display <HTML> tags. # $html_fnt_clr must be defined and can not be disabled. # $html_fnt_clr defaults to '#FF0000' if mis-configured. $html_fnt_clr = '#FF0000'; # Red 1; # DO NOT REMOVE __END__