Change the code to the following:
# Database Definition: LINKS
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, '', '^http|news|mailto|ftp'],
DateAdded => [3, 'date', 15, 15, 0, \&get_date, ''],
Date => [4, 'date', 15, 15, 1, \&get_date, ''],
Category => [5, 'alpha', 0, 150, 1, '', ''],
Description => [6, 'alpha', '40x3', 250, 0, '', ''],
Keywords => [7, 'alpha', '40x5', 450, 0, '', ''],
'Contact Name' => [8, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [9, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [10, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [11, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [12, 'alpha', 0, 5, 0, 'No', ''],
Rating => [13, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [14, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [15, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Logo => [16, 'alpha', 0, 5, 1, 'No', 'No|Yes'],
Graphic => [17, 'alpha', 40, 100, 0, '', ''],
Gwidth => [18, 'alpha', 5, 5, 0, '', ''],
Gheight => [19, 'alpha', 5, 5, 0, '', ''],
Priority => [20, 'alpha', 0, 5, 1, 'No', 'No|Yes'],
PriorityNo => [21, 'alpha', 0, 5, 1, '0', '0|1|2|3|4|5|6|7|8|9|10'],
IP => [22, 'alpha', 20, 20, 1, '', ''],
Host => [23, 'alpha', 40, 40, 1, '', ''],
Domain => [24, 'alpha', 20, 20, 1, '', ''],
ServerIP => [25, 'alpha', 20, 20, 1, '', ''],
Password => [26, 'alpha', 10, 10, 1, '', '']
);
# Database file to use -- defined in mse.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in mse.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'Links Database';
$html_object = 'Link';
# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_title = 1; $db_url = 2; $db_dateadded = 3;
$db_modified = 4; $db_category = 5;
$db_contact_name = 8; $db_contact_email = 9; $db_hits = 10;
$db_isnew = 11; $db_ispop = 12; $db_rating = 13;
$db_votes = 14; $db_mail = 15; $db_logo = 16;
$db_priority = 20; $db_priorityno = 21; $db_ip = 22;
$db_host = 23; $db_domain = 24; $db_serverip = 25;
$db_password = 26;
# Field number to sort links by:
$db_sort_links = 1;
# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,6,7);
# System defaults. When adding new links or modifying links, these fields
# can not be overwritten by a user.
%add_system_fields = (
isNew => 'No',
isPopular => 'No',
Hits => '0',
Priority => 'No',
PriorityNo => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes',
Logo => 'No',
);
# Hash of column names to possible options. If you want to use a select form
# field, you can use &build_select_field in your HTML page. This routine will
# make a <SELECT> input tag using the following values:
%db_select_fields = (
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No',
Logo => 'Yes,No',
Priority => 'Yes,No',
PriorityNo => '0,1,2,3,4,5,6,7,8,9,10'
);
Note: This is not the full file, just overwrite it with your existing values.
Regards,
Nuno Duque
--------------------
Macau Search Engine
inmacau.com