#!/usr/local/bin/perl #----------------------------------------------------------------- # Personnel: main script #----------------------------------------------------------------- # Use sub library do 'nh.lib'; # Read CGI parameters with standard PERL library require 'cgi-lib.pl'; &ReadParse(); # Get the Browser type: $browser = $ENV{HTTP_USER_AGENT}; $district = $in{district}; # Specify whether user is inputting or updating the data. # If for some reason the radio button input does not have a value of # "replace" or "update", the script will by default only update the data. # This measure is to prevent script malfunctions from zeroing out # previous data. if ($in{update} eq "replace") { $update_bit = 0; } else { $update_bit = -1; } # Print MIME-type header so output is recognizable as HTML by the browser print "Content-type:text/html\n\n"; # Password, if implemented, could be checked for here # &check_password; (or whatever you want to call the subroutine in nh.lib) # Validate superintendent &validate_superintendent; # If superintendent is valid, go ahead and file and display the data unless ($super_validity != 1) { &print_header; &get_date; &file_data($update_bit); unless ($non_numeric_flag == 1) { &load_data($year); &whatbrowser; } # end unless } else { print "
Please "; print "return.
\n"; }