/[webpac-proto]/search/Search.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /search/Search.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dpavlin, Sun Jun 16 18:11:16 2002 UTC revision 1.4 by dpavlin, Sun Jun 16 19:39:44 2002 UTC
# Line 12  Line 12 
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.)
# Line 192  $main::MPSSession = 0; Line 194  $main::MPSSession = 0;
194          'server-log','mps.log',          'server-log','mps.log',
195          'output-colums','yes',          'output-colums','yes',
196          'show-nr-colums',3,          'show-nr-colums',3,
197  #       'show-past-date-list','yes',          'show-past-date-list','no',
198          'database-for-SearchFieldDescriptions','ps',          'database-for-SearchFieldDescriptions','ps',
199  );  );
200    
201  # read configuration fields  # read configuration fields
202  require "config.pl";  require "config.pm";
203    
204  # List of required configuration settings  # List of required configuration settings
205  @main::RequiredSettings = (  @main::RequiredSettings = (
# Line 408  sub vSendHTMLHeader { Line 410  sub vSendHTMLHeader {
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;
# Line 3056  sub vGetSearch { Line 3058  sub vGetSearch {
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    
# Line 3128  sub vGetSearch { Line 3139  sub vGetSearch {
3139                          for(my $i=0; $i <= $next ; $i++) {                          for(my $i=0; $i <= $next ; $i++) {
3140                                  print("<tr>");                                  print("<tr>");
3141                                  for(my $j=0; $j <= $cols; $j++) {                                  for(my $j=0; $j <= $cols; $j++) {
3142                                          print($html_database[$i+$next*$j+$j]);                                          print($html_database[$i+$next*$j+$j] || '');
3143                                  }                                  }
3144                                  print("</tr>");                                  print("</tr>");
3145                          }                          }
# Line 7458  sub fill_SearchFieldDescriptions_fromDB Line 7469  sub fill_SearchFieldDescriptions_fromDB
7469                  foreach my $FieldInformation ( split(/\n/, $Text) ) {                  foreach my $FieldInformation ( split(/\n/, $Text) ) {
7470                          my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3);                          my ($FieldName, $FieldDescription, undef) = split(/\t/, $FieldInformation, 3);
7471                          $main::SearchFieldDescriptions{$FieldName} = $FieldDescription;                          $main::SearchFieldDescriptions{$FieldName} = $FieldDescription;
                         print "-- $FieldName --<br>\n";  
7472                  }                  }
7473          }          }
7474  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26