%FIELDS = (
# KEYS zero one two Field
'00' => ['Color', 'text', 'SIZE="20" MAXLENGTH="100"' ], # 0
'01' => ['Size', 'text', 'SIZE="20" MAXLENGTH="100"' ], # 1
'02' => ['Shipping', 'text', 'SIZE="20" MAXLENGTH="100"' ], # 2
'03' => ['Item', 'text', 'SIZE="32" MAXLENGTH="100"' ], # 3
'04' => ['Category', 'text', 'SIZE="68"' ], # 4
# '04' => ['Category', 'select', 'Outer Wear:Shirts:Sweaters'], # 4
'05' => ['Price', 'text', 'SIZE="20" MAXLENGTH="30"' ], # 5
'06' => ['Name', 'text', 'SIZE="68"' ], # 6
'07' => ['Description', 'textarea', 'ROWS="4" COLS="58"' ], # 7
'08' => ['Image', 'text', 'SIZE="68"' ], # 8
'09' => ['Id', 'id_field'], # 9
); # DO NOT REMOVE - terminates %FIELDS
%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.
The Id field must be defined and it's attribute value of id_field
MUST NOT BE CHANGED.
Valid INPUT types are
select,
text, and
textarea.
<INPUT TYPE="text"> select textarea
Elements of $FIELDS{00}:
KEY zero one two
'00' => ['Color', 'text', 'SIZE="20" MAXLENGTH="100"' ],
zero |
|
Descriptive <TABLE> header text and <INPUT NAME="name">
For INPUT NAME, WS Editor replaces spaces with _ (underscore)
and switches all characters to lowercase. |
|
one |
|
<INPUT TYPE="text"> |
|
two |
|
Attributes for the <INPUT TYPE> (size, maxlength, etc.). |
|
<INPUT TYPE="textarea"> select text
Elements of $FIELDS{07}:
KEY zero one two
'07' => ['Description', 'textarea', 'ROWS="4" COLS="58"'],
zero |
|
Descriptive <TABLE> header text and <INPUT NAME="name">
For INPUT NAME, WS Editor replaces spaces with _ (underscore)
and switches all characters to lowercase. |
|
one |
|
<INPUT TYPE="textarea"> |
|
two |
|
Attributes for the <INPUT TYPE> (size, maxlength, etc.). |
|
<INPUT TYPE="select"> text textarea
Elements of $FIELDS{04}:
KEY zero one two
'04' => ['Category', 'select', 'Outer Wear:Shirts:Sweaters'],
'04' => ['Category', 'select', 'Option1:Option2:Option3'],
zero |
|
Descriptive <TABLE> header text and <INPUT NAME="name">
For INPUT NAME, WS Editor replaces spaces with _ (underscore)
and switches all characters to lowercase. |
|
one |
|
<INPUT TYPE="select"> |
|
two |
|
Colon delimited listing of options. Leading and trailing
whitespace
are removed from each option. Whitespace strings embedded within options
are reduced to one space. Options may be listed on multiple lines:
'04' => ['Category', 'select',
'Option1:
SELECTED~Option2:
Option3'
], |
|
To select a specific option as <OPTION SELECTED>, precede the
the option with SELECTED~ |
|
|
'04' => [ 'Category', 'select', 'Option1:SELECTED~Option2:Option3' ], |
|
|
Option2 will be printed as the <OPTION SELECTED>. |
|
Index
$category_fld_num = '4';
$category_fld_num is the array index number or field number of the Category
field within all database records of outlet.data.
Index
Security
$user_security = 'add delete modify';
$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.
Index
$allow_register = '1';
$email_register = '0';
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.
Index
$generate_password = '0';
If $generate_password = 1, WS Editor 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.
Index
$allow_search = '1';
If $allow_search = 1, allow users to search for usernames.
If $allow_search = 0, username search is disabled.
Index
$duplicate_check = '1';
If $duplicate_check = 1, WS Editor checks for the possible duplication of a user's details before registering a user.
If $duplicate_check = 0, duplicate checking is disabled.
Index
Statistics
$log_file = 'WSEditor_Access.stats';
$log_file is the name of the statistics log file stored in the /Statistics sub-directory.
Maintain a formatted or | (pipe) delimited log file for the first access
to WS Editor consisting of: