12 |
# of FS Consulting, Inc. * |
# of FS Consulting, Inc. * |
13 |
#***************************************************************************** |
#***************************************************************************** |
14 |
|
|
15 |
|
#print "Content-type: text/plain\n\n"; |
16 |
|
|
17 |
#-------------------------------------------------------------------------- |
#-------------------------------------------------------------------------- |
18 |
# |
# |
19 |
# Author: Francois Schiettecatte (FS Consulting, Inc.) |
# Author: Francois Schiettecatte (FS Consulting, Inc.) |
193 |
'mailer-application','/usr/lib/sendmail', |
'mailer-application','/usr/lib/sendmail', |
194 |
'server-log','mps.log', |
'server-log','mps.log', |
195 |
'output-colums','yes', |
'output-colums','yes', |
196 |
# 'show-past-date-list','yes', |
'show-nr-colums',3, |
197 |
|
'show-past-date-list','no', |
198 |
'database-for-SearchFieldDescriptions','ps', |
'database-for-SearchFieldDescriptions','ps', |
199 |
); |
); |
200 |
|
|
201 |
# DbP: Define which fields you have in normal and advanced search |
# read configuration fields |
202 |
# first define all available fields and then how many fields of that |
require "config.pm"; |
|
# are visible. |
|
|
@main::NormalSearchFieldNames = ( |
|
|
'700+', |
|
|
'200+', |
|
|
'610', |
|
|
'210', |
|
|
'10', |
|
|
|
|
|
); |
|
|
$main::NormalSearchDropdowns = 3 ; |
|
|
|
|
|
@main::AdvancedSearchFieldNames = ( |
|
|
'700+', |
|
|
'200+', |
|
|
'610', |
|
|
'210', |
|
|
'225', |
|
|
'300+', |
|
|
'330', |
|
|
'464', |
|
|
'675', |
|
|
'686', |
|
|
'990', |
|
|
'991', |
|
|
'10', |
|
|
'001', |
|
|
); |
|
|
$main::AdvancedSearchDropdowns = 4 ; |
|
|
|
|
203 |
|
|
204 |
# List of required configuration settings |
# List of required configuration settings |
205 |
@main::RequiredSettings = ( |
@main::RequiredSettings = ( |
410 |
if ( ! $ENV{'GATEWAY_INTERFACE'} ) { |
if ( ! $ENV{'GATEWAY_INTERFACE'} ) { |
411 |
return; |
return; |
412 |
} |
} |
413 |
|
|
414 |
# Bail if we have already sent the header |
# Bail if we have already sent the header |
415 |
if ( $main::HeaderSent ) { |
if ( $main::HeaderSent ) { |
416 |
return; |
return; |
3058 |
print ("<SELECT NAME=\"FieldName${field}\">"); |
print ("<SELECT NAME=\"FieldName${field}\">"); |
3059 |
for (my $i=0; $i<=$#SearchFieldNames; $i++) { |
for (my $i=0; $i<=$#SearchFieldNames; $i++) { |
3060 |
my $ItemEntry = $SearchFieldNames[$i]; |
my $ItemEntry = $SearchFieldNames[$i]; |
3061 |
my $Selected = ($main::FormData{"FieldName${field}"} == $ItemEntry || $i == ($field-1)) ? "SELECTED" : ""; |
my $Selected = ""; |
3062 |
|
if ($main::FormData{"FieldName${field}"} && $main::FormData{"FieldName${field}"} eq $ItemEntry) { |
3063 |
|
$Selected = "SELECTED"; |
3064 |
|
} elsif ($i == ($field - 1)) { |
3065 |
|
$Selected = "SELECTED"; |
3066 |
|
} |
3067 |
|
|
3068 |
print("<OPTION VALUE=\"$ItemEntry\" $Selected> $main::SearchFieldDescriptions{$ItemEntry}\n"); |
print("<OPTION VALUE=\"$ItemEntry\" $Selected> $main::SearchFieldDescriptions{$ItemEntry}\n"); |
3069 |
} |
} |
3070 |
my $Value = defined($main::FormData{"FieldContent${field}"}) ? "VALUE='".$main::FormData{"FieldContent${field}"}."'" : ""; |
my $Value = ""; |
3071 |
|
if (defined($main::FormData{"FieldContent${field}"})) { |
3072 |
|
$Value = "VALUE='".$main::FormData{"FieldContent${field}"}."'"; |
3073 |
|
} |
3074 |
print("</SELECT></TD><TD ALIGN=LEFT><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n"); |
print("</SELECT></TD><TD ALIGN=LEFT><INPUT NAME=\"FieldContent${field}\" TYPE=TEXT $Value SIZE=45> </TD></TR>\n"); |
3075 |
} |
} |
3076 |
|
|
3114 |
|
|
3115 |
|
|
3116 |
$Flag = 0; |
$Flag = 0; |
3117 |
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>\n"); |
print("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n"); |
3118 |
|
|
3119 |
my @html_database; |
my @html_database; |
3120 |
|
|
3133 |
if ($main::ConfigurationData{'output-colums'}) { |
if ($main::ConfigurationData{'output-colums'}) { |
3134 |
# create database names in columns |
# create database names in columns |
3135 |
|
|
3136 |
my $max = $#html_database+1 ; |
my $cols = $main::ConfigurationData{'show-nr-colums'}; |
3137 |
|
my $next = int($#html_database/$cols) ; |
3138 |
|
|
3139 |
my $j=0; |
for(my $i=0; $i <= $next ; $i++) { |
3140 |
for(my $i=0; $i < $max ; $i=$i+2) { |
print("<tr>"); |
3141 |
print("<tr>",$html_database[$j],$html_database[$j+int($max/2)],"</tr>"); |
for(my $j=0; $j <= $cols; $j++) { |
3142 |
$j++; |
print($html_database[$i+$next*$j+$j] || ''); |
3143 |
|
} |
3144 |
|
print("</tr>"); |
3145 |
} |
} |
3146 |
|
|
3147 |
} else { |
} else { |