home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 21 / CTROM21B.mdf / win95 / zakelijk / shopease / _setup.1 / fmail.pl < prev    next >
Encoding:
Perl Script  |  1999-06-24  |  21.1 KB  |  602 lines

  1. #!{|PerlScript|}
  2.  
  3. #recipient, subject, redirect
  4.  
  5. $mailprog = '{|Sendmail|}';
  6.  
  7. # Check Referring URL
  8. &check_url;
  9.  
  10. # Retrieve Date
  11. &get_date;
  12.  
  13. # Parse Form Contents
  14. &parse_form;
  15.  
  16. # Check Required Fields
  17. &check_required;
  18.  
  19. # Return HTML Page or Redirect User
  20. &return_html;
  21.  
  22. # Send E-Mail
  23. &send_mail;
  24.  
  25. sub check_url {
  26.  
  27.     # Localize the check_referer flag which determines if user is valid.     #
  28.     local($check_referer) = 0;
  29.  
  30.     # If a referring URL was specified, for each valid referer, make sure    #
  31.     # that a valid referring URL was passed to FormMail.                     #
  32.  
  33.     if ($ENV{'HTTP_REFERER'}) {
  34.         foreach $referer (@referers) {
  35.             if ($ENV{'HTTP_REFERER'} =~ m|https?://([^/]*)$referer|i) {
  36.                 $check_referer = 1;
  37.                 last;
  38.             }
  39.         }
  40.     }
  41.     else {
  42.         $check_referer = 1;
  43.     }
  44.  
  45.     # If the HTTP_REFERER was invalid, send back an error.                   #
  46.     if ($check_referer != 1) { &error('bad_referer') }
  47. }
  48.  
  49. sub get_date {
  50.  
  51.     # Define arrays for the day of the week and month of the year.           #
  52.     @days   = ('Sunday','Monday','Tuesday','Wednesday',
  53.                'Thursday','Friday','Saturday');
  54.     @months = ('January','February','March','April','May','June','July',
  55.              'August','September','October','November','December');
  56.  
  57.     # Get the current time and format the hour, minutes and seconds.  Add    #
  58.     # 1900 to the year to get the full 4 digit year.                         #
  59.     ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
  60.     $time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
  61.     $year += 1900;
  62.  
  63.     # Format the date.                                                       #
  64.     $date = "$days[$wday], $months[$mon] $mday, $year at $time";
  65.  
  66. }
  67.  
  68. sub parse_form {
  69.  
  70.     # Define the configuration associative array.                            #
  71.     %Config = ('recipient','',          'subject','',
  72.                'email','',              'realname','',
  73.                'redirect','',           'bgcolor','',
  74.                'background','',         'link_color','',
  75.                'vlink_color','',        'text_color','',
  76.                'alink_color','',        'title','',
  77.                'sort','',               'print_config','',
  78.                'required','',           'env_report','',
  79.                'return_link_title','',  'return_link_url','',
  80.                'print_blank_fields','', 'missing_fields_redirect','');
  81.  
  82.     # Determine the form's REQUEST_METHOD (GET or POST) and split the form   #
  83.     # fields up into their name-value pairs.  If the REQUEST_METHOD was      #
  84.     # not GET or POST, send an error.                                        #
  85.     if ($ENV{'REQUEST_METHOD'} eq 'GET') {
  86.         # Split the name-value pairs
  87.         @pairs = split(/&/, $ENV{'QUERY_STRING'});
  88.     }
  89.     elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
  90.         # Get the input
  91.         read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  92.  
  93.         # Split the name-value pairs
  94.         @pairs = split(/&/, $buffer);
  95.     }
  96.     else {
  97.         &error('request_method');
  98.     }
  99.  
  100.     # For each name-value pair:                                              #
  101.     foreach $pair (@pairs) {
  102.  
  103.         # Split the pair up into individual variables.                       #
  104.         local($name, $value) = split(/=/, $pair);
  105.  
  106.         # Decode the form encoding on the name and value variables.          #
  107.         $name =~ tr/+/ /;
  108.         $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  109.  
  110.         $value =~ tr/+/ /;
  111.         $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  112.  
  113.         # If they try to include server side includes, erase them, so they
  114.         # aren't a security risk if the html gets returned.  Another 
  115.         # security hole plugged up.
  116.         $value =~ s/<!--(.|\n)*-->//g;
  117.  
  118.         # If the field name has been specified in the %Config array, it will #
  119.         # return a 1 for defined($Config{$name}}) and we should associate    #
  120.         # this value with the appropriate configuration variable.  If this   #
  121.         # is not a configuration form field, put it into the associative     #
  122.         # array %Form, appending the value with a ', ' if there is already a #
  123.         # value present.  We also save the order of the form fields in the   #
  124.         # @Field_Order array so we can use this order for the generic sort.  #
  125.         if (defined($Config{$name})) {
  126.             $Config{$name} = $value;
  127.         }
  128.         else {
  129.             if ($Form{$name} && $value) {
  130.                 $Form{$name} = "$Form{$name}, $value";
  131.             }
  132.             elsif ($value) {
  133.                 push(@Field_Order,$name);
  134.                 $Form{$name} = $value;
  135.             }
  136.         }
  137.     }
  138.  
  139.     # The next six lines remove any extra spaces or new lines from the       #
  140.     # configuration variables, which may have been caused if your editor     #
  141.     # wraps lines after a certain length or if you used spaces between field #
  142.     # names or environment variables.                                        #
  143.     $Config{'required'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
  144.     $Config{'required'} =~ s/(\s+)?\n+(\s+)?//g;
  145.     $Config{'env_report'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
  146.     $Config{'env_report'} =~ s/(\s+)?\n+(\s+)?//g;
  147.     $Config{'print_config'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
  148.     $Config{'print_config'} =~ s/(\s+)?\n+(\s+)?//g;
  149.  
  150.     # Split the configuration variables into individual field names.         #
  151.     @Required = split(/,/,$Config{'required'});
  152.     @Env_Report = split(/,/,$Config{'env_report'});
  153.     @Print_Config = split(/,/,$Config{'print_config'});
  154. }
  155.  
  156. sub check_required {
  157.  
  158.     # Localize the variables used in this subroutine.                        #
  159.     local($require, @error);
  160.  
  161.     if (!$Config{'recipient'}) {
  162.         if (!defined(%Form)) { &error('bad_referer') }
  163.         else                 { &error('no_recipient') }
  164.     }
  165.  
  166.     # For each require field defined in the form:                            #
  167.     foreach $require (@Required) {
  168.  
  169.         # If the required field is the email field, the syntax of the email  #
  170.         # address if checked to make sure it passes a valid syntax.          #
  171.         if ($require eq 'email' && !&check_email($Config{$require})) {
  172.             push(@error,$require);
  173.         }
  174.  
  175.         # Otherwise, if the required field is a configuration field and it   #
  176.         # has no value or has been filled in with a space, send an error.    #
  177.         elsif (defined($Config{$require})) {
  178.             if (!$Config{$require}) {
  179.                 push(@error,$require);
  180.             }
  181.         }
  182.  
  183.         # If it is a regular form field which has not been filled in or      #
  184.         # filled in with a space, flag it as an error field.                 #
  185.         elsif (!$Form{$require}) {
  186.             push(@error,$require);
  187.         }
  188.     }
  189.  
  190.     # If any error fields have been found, send error message to the user.   #
  191.     if (@error) { &error('missing_fields', @error) }
  192. }
  193.  
  194. sub return_html {
  195.     # Local variables used in this subroutine initialized.                   #
  196.     local($key,$sort_order,$sorted_field);
  197.  
  198.     # If redirect option is used, print the redirectional location header.   #
  199.     if ($Config{'redirect'}) {
  200.         print "Location: $Config{'redirect'}\n\n";
  201.     }
  202.  
  203.     # Otherwise, begin printing the response page.                           #
  204.     else {
  205.  
  206.         # Print HTTP header and opening HTML tags.                           #
  207.         print "Content-type: text/html\n\n";
  208.         print "<html>\n <head>\n";
  209.  
  210.         # Print out title of page                                            #
  211.         if ($Config{'title'}) { print "  <title>$Config{'title'}</title>\n" }
  212.         else                  { print "  <title>Thank You</title>\n"        }
  213.  
  214.         print " </head>\n <body";
  215.  
  216.         # Get Body Tag Attributes                                            #
  217.         &body_attributes;
  218.  
  219.         # Close Body Tag                                                     #
  220.         print ">\n  <center>\n";
  221.  
  222.         # Print custom or generic title.                                     #
  223.         if ($Config{'title'}) { print "   <h1>$Config{'title'}</h1>\n" }
  224.         else { print "   <h1>Thank You For Filling Out This Form</h1>\n" }
  225.  
  226.         print "</center>\n";
  227.  
  228.         print "Below is what you submitted to $Config{'recipient'} on ";
  229.         print "$date<p><hr size=1 width=75\%><p>\n";
  230.  
  231.         # Sort alphabetically if specified:                                  #
  232.         if ($Config{'sort'} eq 'alphabetic') {
  233.             foreach $field (sort keys %Form) {
  234.  
  235.                 # If the field has a value or the print blank fields option  #
  236.                 # is turned on, print out the form field and value.          #
  237.                 if ($Config{'print_blank_fields'} || $Form{$field}) {
  238.                     print "<b>$field:</b> $Form{$field}<p>\n";
  239.                 }
  240.             }
  241.         }
  242.  
  243.         # If a sort order is specified, sort the form fields based on that.  #
  244.         elsif ($Config{'sort'} =~ /^order:.*,.*/) {
  245.  
  246.             # Set the temporary $sort_order variable to the sorting order,   #
  247.             # remove extraneous line breaks and spaces, remove the order:    #
  248.             # directive and split the sort fields into an array.             #
  249.             $sort_order = $Config{'sort'};
  250.             $sort_order =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
  251.             $sort_order =~ s/(\s+)?\n+(\s+)?//g;
  252.             $sort_order =~ s/order://;
  253.             @sorted_fields = split(/,/, $sort_order);
  254.  
  255.             # For each sorted field, if it has a value or the print blank    #
  256.             # fields option is turned on print the form field and value.     #
  257.             foreach $sorted_field (@sorted_fields) {
  258.                 if ($Config{'print_blank_fields'} || $Form{$sorted_field}) {
  259.                     print "<b>$sorted_field:</b> $Form{$sorted_field}<p>\n";
  260.                 }
  261.             }
  262.         }
  263.  
  264.         # Otherwise, default to the order in which the fields were sent.     #
  265.         else {
  266.  
  267.             # For each form field, if it has a value or the print blank      #
  268.             # fields option is turned on print the form field and value.     #
  269.             foreach $field (@Field_Order) {
  270.                 if ($Config{'print_blank_fields'} || $Form{$field}) {
  271.                     print "<b>$field:</b> $Form{$field}<p>\n";
  272.                 }
  273.             }
  274.         }
  275.  
  276.         print "<p><hr size=1 width=75%><p>\n";
  277.  
  278.         # Check for a Return Link and print one if found.                    #
  279.         if ($Config{'return_link_url'} && $Config{'return_link_title'}) {
  280.             print "<ul>\n";
  281.             print "<li><a href=\"$Config{'return_link_url'}\">$Config{'return_link_title'}</a>\n";
  282.             print "</ul>\n";
  283.         }
  284.  
  285.         # Print the page footer.                                             #
  286.         print <<"(END HTML FOOTER)";
  287.         <hr size=1 width=75%><p> 
  288.         <center><font size=-1><a href="http://www.worldwidemart.com/scripts/formmail.shtml">FormMail</a> V1.6 © 1995 -1997  Matt Wright<br>
  289. A Free Product of <a href="http://www.worldwidemart.com/scripts/">Matt's Script Archive, Inc.</a></font></center>
  290.         </body>
  291.        </html>
  292. (END HTML FOOTER)
  293.     }
  294. }
  295.  
  296. sub send_mail {
  297.     # Localize variables used in this subroutine.                            #
  298.     local($print_config,$key,$sort_order,$sorted_field,$env_report);
  299.  
  300.     # Open The Mail Program
  301.     open(MAIL,"|$mailprog -t");
  302.  
  303.     print MAIL "To: $Config{'recipient'}\n";
  304.     print MAIL "From: $Config{'email'} ($Config{'realname'})\n";
  305.  
  306.     # Check for Message Subject
  307.     if ($Config{'subject'}) { print MAIL "Subject: $Config{'subject'}\n\n" }
  308.     else                    { print MAIL "Subject: WWW Form Submission\n\n" }
  309.  
  310.     print MAIL "Below is the result of your feedback form.  It was submitted by\n";
  311.     print MAIL "$Config{'realname'} ($Config{'email'}) on $date\n";
  312.     print MAIL "-" x 75 . "\n\n";
  313.  
  314.     if (@Print_Config) {
  315.         foreach $print_config (@Print_Config) {
  316.             if ($Config{$print_config}) {
  317.                 print MAIL "$print_config: $Config{$print_config}\n\n";
  318.             }
  319.         }
  320.     }
  321.  
  322.     # Sort alphabetically if specified:                                      #
  323.     if ($Config{'sort'} eq 'alphabetic') {
  324.         foreach $field (sort keys %Form) {
  325.  
  326.             # If the field has a value or the print blank fields option      #
  327.             # is turned on, print out the form field and value.              #
  328.             if ($Config{'print_blank_fields'} || $Form{$field} ||
  329.                 $Form{$field} eq '0') {
  330.                 print MAIL "$field: $Form{$field}\n\n";
  331.             }
  332.         }
  333.     }
  334.  
  335.     # If a sort order is specified, sort the form fields based on that.      #
  336.     elsif ($Config{'sort'} =~ /^order:.*,.*/) {
  337.  
  338.         # Remove extraneous line breaks and spaces, remove the order:        #
  339.         # directive and split the sort fields into an array.                 #
  340.         $Config{'sort'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
  341.         $Config{'sort'} =~ s/(\s+)?\n+(\s+)?//g;
  342.         $Config{'sort'} =~ s/order://;
  343.         @sorted_fields = split(/,/, $Config{'sort'});
  344.  
  345.         # For each sorted field, if it has a value or the print blank        #
  346.         # fields option is turned on print the form field and value.         #
  347.         foreach $sorted_field (@sorted_fields) {
  348.             if ($Config{'print_blank_fields'} || $Form{$sorted_field} ||
  349.                 $Form{$sorted_field} eq '0') {
  350.                 print MAIL "$sorted_field: $Form{$sorted_field}\n\n";
  351.             }
  352.         }
  353.     }
  354.  
  355.     # Otherwise, default to the order in which the fields were sent.         #
  356.     else {
  357.  
  358.         # For each form field, if it has a value or the print blank          #
  359.         # fields option is turned on print the form field and value.         #
  360.         foreach $field (@Field_Order) {
  361.             if ($Config{'print_blank_fields'} || $Form{$field} ||
  362.                 $Form{$field} eq '0') {
  363.                 print MAIL "$field: $Form{$field}\n\n";
  364.             }
  365.         }
  366.     }
  367.  
  368.     print MAIL "-" x 75 . "\n\n";
  369.  
  370.     # Send any specified Environment Variables to recipient.                 #
  371.     foreach $env_report (@Env_Report) {
  372.         if ($ENV{$env_report}) {
  373.             print MAIL "$env_report: $ENV{$env_report}\n";
  374.         }
  375.     }
  376.  
  377.     close (MAIL);
  378. }
  379.  
  380. sub check_email {
  381.     # Initialize local email variable with input to subroutine.              #
  382.     $email = $_[0];
  383.  
  384.     # If the e-mail address contains:                                        #
  385.     if ($email =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ||
  386.  
  387.         # the e-mail address contains an invalid syntax.  Or, if the         #
  388.         # syntax does not match the following regular expression pattern     #
  389.         # it fails basic syntax verification.                                #
  390.  
  391.         $email !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) {
  392.  
  393.         # Basic syntax requires:  one or more characters before the @ sign,  #
  394.         # followed by an optional '[', then any number of letters, numbers,  #
  395.         # dashes or periods (valid domain/IP characters) ending in a period  #
  396.         # and then 2 or 3 letters (for domain suffixes) or 1 to 3 numbers    #
  397.         # (for IP addresses).  An ending bracket is also allowed as it is    #
  398.         # valid syntax to have an email address like: user@[255.255.255.0]   #
  399.  
  400.         # Return a false value, since the e-mail address did not pass valid  #
  401.         # syntax.                                                            #
  402.         return 0;
  403.     }
  404.  
  405.     else {
  406.  
  407.         # Return a true value, e-mail verification passed.                   #
  408.         return 1;
  409.     }
  410. }
  411.  
  412. sub body_attributes {
  413.     # Check for Background Color
  414.     if ($Config{'bgcolor'}) { print " bgcolor=\"$Config{'bgcolor'}\"" }
  415.  
  416.     # Check for Background Image
  417.     if ($Config{'background'}) { print " background=\"$Config{'background'}\"" }
  418.  
  419.     # Check for Link Color
  420.     if ($Config{'link_color'}) { print " link=\"$Config{'link_color'}\"" }
  421.  
  422.     # Check for Visited Link Color
  423.     if ($Config{'vlink_color'}) { print " vlink=\"$Config{'vlink_color'}\"" }
  424.  
  425.     # Check for Active Link Color
  426.     if ($Config{'alink_color'}) { print " alink=\"$Config{'alink_color'}\"" }
  427.  
  428.     # Check for Body Text Color
  429.     if ($Config{'text_color'}) { print " text=\"$Config{'text_color'}\"" }
  430. }
  431.  
  432. sub error { 
  433.     # Localize variables and assign subroutine input.                        #
  434.     local($error,@error_fields) = @_;
  435.     local($host,$missing_field,$missing_field_list);
  436.  
  437.     if ($error eq 'bad_referer') {
  438.         if ($ENV{'HTTP_REFERER'} =~ m|^https?://([\w\.]+)|i) {
  439.             $host = $1;
  440.             print <<"(END ERROR HTML)";
  441. Content-type: text/html
  442.  
  443. <html>
  444.  <head>
  445.   <title>Bad Referrer - Access Denied</title>
  446.  </head>
  447.  <body bgcolor=#FFFFFF text=#000000>
  448.   <center>
  449.    <table border=0 width=600 bgcolor=#9C9C9C>
  450.     <tr><th><font size=+2>Bad Referrer - Access Denied</font></th></tr>
  451.    </table>
  452.    <table border=0 width=600 bgcolor=#CFCFCF>
  453.     <tr><td>The form attempting to use
  454.      <a href="http://www.worldwidemart.com/scripts/formmail.shtml">FormMail</a>
  455.      resides at <tt>$ENV{'HTTP_REFERER'}</tt>, which is not allowed to access
  456.      this cgi script.<p>
  457.  
  458.      If you are attempting to configure FormMail to run with this form, you need
  459.      to add the following to \@referers, explained in detail in the README file.<p>
  460.  
  461.      Add <tt>'$host'</tt> to your <tt><b>\@referers</b></tt> array.<hr size=1>
  462.      <center><font size=-1>
  463.       <a href="http://www.worldwidemart.com/scripts/formmail.shtml">FormMail</a> V1.6 © 1995 - 1997  Matt Wright<br>
  464.       A Free Product of <a href="http://www.worldwidemart.com/scripts/">Matt's Script Archive, Inc.</a>
  465.      </font></center>
  466.     </td></tr>
  467.    </table>
  468.   </center>
  469.  </body>
  470. </html>
  471. (END ERROR HTML)
  472.         }
  473.         else {
  474.             print <<"(END ERROR HTML)";
  475. Content-type: text/html
  476.  
  477. <html>
  478.  <head>
  479.   <title>FormMail v1.6</title>
  480.  </head>
  481.  <body bgcolor=#FFFFFF text=#000000>
  482.   <center>
  483.    <table border=0 width=600 bgcolor=#9C9C9C>
  484.     <tr><th><font size=+2>FormMail</font></th></tr>
  485.    </table>
  486.    <table border=0 width=600 bgcolor=#CFCFCF>
  487.     <tr><th><tt><font size=+1>Copyright 1995 - 1997 Matt Wright<br>
  488.         Version 1.6 - Released May 02, 1997<br>
  489.         A Free Product of <a href="http://www.worldwidemart.com/scripts/">Matt's Script Archive,
  490.         Inc.</a></font></tt></th></tr>
  491.    </table>
  492.   </center>
  493.  </body>
  494. </html>
  495. (END ERROR HTML)
  496.         }
  497.     }
  498.  
  499.     elsif ($error eq 'request_method') {
  500.             print <<"(END ERROR HTML)";
  501. Content-type: text/html
  502.  
  503. <html>
  504.  <head>
  505.   <title>Error: Request Method</title>
  506.  </head>
  507.  <body bgcolor=#FFFFFF text=#000000>
  508.   <center>
  509.    <table border=0 width=600 bgcolor=#9C9C9C>
  510.     <tr><th><font size=+2>Error: Request Method</font></th></tr>
  511.    </table>
  512.    <table border=0 width=600 bgcolor=#CFCFCF>
  513.     <tr><td>The Request Method of the Form you submitted did not match
  514.      either <tt>GET</tt> or <tt>POST</tt>.  Please check the form and make sure the
  515.      <tt>method=</tt> statement is in upper case and matches <tt>GET</tt> or <tt>POST</tt>.<p>
  516.  
  517.      <center><font size=-1>
  518.       <a href="http://www.worldwidemart.com/scripts/formmail.shtml">FormMail</a> V1.6 © 1995 - 1997  Matt Wright<br>
  519.       A Free Product of <a href="http://www.worldwidemart.com/scripts/">Matt's Script Archive, Inc.</a>
  520.      </font></center>
  521.     </td></tr>
  522.    </table>
  523.   </center>
  524.  </body>
  525. </html>
  526. (END ERROR HTML)
  527.     }
  528.  
  529.     elsif ($error eq 'no_recipient') {
  530.             print <<"(END ERROR HTML)";
  531. Content-type: text/html
  532.  
  533. <html>
  534.  <head>
  535.   <title>Error: No Recipient</title>
  536.  </head>
  537.  <body bgcolor=#FFFFFF text=#000000>
  538.   <center>
  539.    <table border=0 width=600 bgcolor=#9C9C9C>
  540.     <tr><th><font size=+2>Error: No Recipient</font></th></tr>
  541.    </table>
  542.    <table border=0 width=600 bgcolor=#CFCFCF>
  543.     <tr><td>No Recipient was specified in the data sent to FormMail.  Please
  544.      make sure you have filled in the 'recipient' form field with an e-mail
  545.      address.  More information on filling in recipient form fields can be
  546.      found in the README file.<hr size=1>
  547.  
  548.      <center><font size=-1>
  549.       <a href="http://www.worldwidemart.com/scripts/formmail.shtml">FormMail</a> V1.6 © 1995 - 1997  Matt Wright<br>
  550.       A Free Product of <a href="http://www.worldwidemart.com/scripts/">Matt's Script Archive, Inc.</a>
  551.      </font></center>
  552.     </td></tr>
  553.    </table>
  554.   </center>
  555.  </body>
  556. </html>
  557. (END ERROR HTML)
  558.     }
  559.  
  560.     elsif ($error eq 'missing_fields') {
  561.         if ($Config{'missing_fields_redirect'}) {
  562.             print "Location: $Config{'missing_fields_redirect'}\n\n";
  563.         }
  564.         else {
  565.             foreach $missing_field (@error_fields) {
  566.                 $missing_field_list .= "      <li>$missing_field\n";
  567.             }
  568.  
  569.             print <<"(END ERROR HTML)";
  570. Content-type: text/html
  571.  
  572. <html>
  573.  <head>
  574.   <title>Error: Blank Fields</title>
  575.  </head>
  576.   <center>
  577.    <table border=0 width=600 bgcolor=#9C9C9C>
  578.     <tr><th><font size=+2>Error: Blank Fields</font></th></tr>
  579.    </table>
  580.    <table border=0 width=600 bgcolor=#CFCFCF>
  581.     <tr><td>The following fields were left blank in your submission form:<p>
  582.      <ul>
  583. $missing_field_list
  584.      </ul><br>
  585.  
  586.      These fields must be filled in before you can successfully submit the form.<p>
  587.      Please use your browser's back button to return to the form and try again.<hr size=1>
  588.      <center><font size=-1>
  589.       
  590.      </font></center>
  591.     </td></tr>
  592.    </table>
  593.   </center>
  594.  </body>
  595. </html>
  596. (END ERROR HTML)
  597.         }
  598.     }
  599.     exit;
  600. }
  601.  
  602.