#-------------------------------------------------------------------- #Print header #-------------------------------------------------------------------- sub print_header { print "

Thank you, district of $district

"; print "

You have submitted the following data from $ENV{REMOTE_HOST}.
"; print "You are using a \"$browser\" browser.

\n"; print "


"; } #--------------------------------------------------------------------- #Determine browser #--------------------------------------------------------------------- sub whatbrowser { #set scratch variable equal to browser type $_ = $browser; #scan scratch variable for HTML info type if (/Mozilla\/[2-3]/) { &with_tables; } elsif (/Mozilla\/1\.1/) { &with_tables; } elsif (/MSIE [2-]/) { &with_tables; } elsif (/NCSA Mosaic\/[1-2]/) { &with_tables; } elsif (/NCSA Mosaic\/[3-]/) { &with_tables; } elsif (/Lynx/) { &no_tables; } elsif (/Mozilla\/1\.0/) { &no_tables; } else { # Table support assumed if browser is not recognizable. &with_tables; } #--------------------------------------------------------------------- # With tables #--------------------------------------------------------------------- sub with_tables { print ""; print ""; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print ""; print "

Teaching Personnel

Elementary

Secondary

FTE's rounded to the nearest tenth

Male

Female

Male

Female

$year

$lyear

$year

$lyear

$year

$lyear

$year

$lyear

1a. Numer of pre-school teachers in full-time equivalents

$thisyear{f1aa}

$lastyear{f1aa}

$thisyear{f1ab}

$lastyear{f1ab}

1b. Numer of kindergarten teachers in full-time equivalents

$thisyear{f1ba}

$lastyear{f1ba}

$thisyear{f1bb}

$lastyear{f1bb}

2. Numer of full-time classroom teachers

$thisyear{f2a}

$lastyear{f2a}

$thisyear{f2b}

$lastyear{f2b}

$thisyear{f2c}

$lastyear{f2c}

$thisyear{f2d}

$lastyear{f2d}

3. Numer of part-time classroom teachers in full-time equivalents

$thisyear{f3a}

$lastyear{f3a}

$thisyear{f3b}

$lastyear{f3b}

$thisyear{f3c}

$lastyear{f3c}

$thisyear{f3d}

$lastyear{f3d}

4. Numer of instructional Aides in full-time equivalents

$thisyear{f4a}

$lastyear{f4a}

$thisyear{f4b}

$lastyear{f4b}

$thisyear{f4c}

$lastyear{f4c}

$thisyear{f4d}

$lastyear{f4d}

5. Average salary of all FULL-TIME teachers in the district \$$thisyear{f5} ($year), \$$lastyear{f5} ($lyear)\.

"; print "
"; print "
"; print "
"; print ""; print ""; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print " "; print ""; print "

Other Professional Personnel and Support Staff

Elementary

Secondary

FTE\'s rounded to the nearest tenth

Male

Female

Male

Female

$year

$lyear

$year

$lyear

$year

$lyear

$year

$lyear

6. Numer of principals in full-time equivalents

$thisyear{f6a}

$lastyear{f6a}

$thisyear{f6b}

$lastyear{f6b}

$thisyear{f6c}

$lastyear{f6c}

$thisyear{f6d}

$lastyear{f6d}

7. Numer of assistant principals in full-time equivalents

$thisyear{f7a}

$lastyear{f7a}

$thisyear{f7b}

$lastyear{f7b}

$thisyear{f7c}

$lastyear{f7c}

$thisyear{f7d}

$lastyear{f7d}

8. Numer of guidance couselors/directors in full-time equivalents

$thisyear{f8a}

$lastyear{f8a}

$thisyear{f8b}

$lastyear{f8b}

$thisyear{f8c}

$lastyear{f8c}

$thisyear{f8d}

$lastyear{f8d}

9. Numer of librarians / media specialists in full-time"; print "equivalents

$thisyear{f9a}

$lastyear{f9a}

$thisyear{f9b}

$lastyear{f9b}

$thisyear{f9c}

$lastyear{f9c}

$thisyear{f9d}

$lastyear{f9d}

10. Numer of library / media support staff in full-time equivalents

$thisyear{f10a}

$lastyear{f10a}

$thisyear{f10b}

$lastyear{f10b}

$thisyear{f10c}

$lastyear{f10c}

$thisyear{f10d}

$lastyear{f10d}

11. Numer of non-teaching Special Education professionals not included above in full-time equivalents

$thisyear{f11a}

$lastyear{f11a}

$thisyear{f11b}

$lastyear{f11b}

$thisyear{f11c}

$lastyear{f11c}

$thisyear{f11d}

$lastyear{f11d}

12. Numer of clerical support staff in full-time equivalents

$thisyear{f12a}

$lastyear{f12a}

$thisyear{f12b}

$lastyear{f12b}

$thisyear{f12c}

$lastyear{f12c}

$thisyear{f12d}

$lastyear{f12d}

13. Numer of other support service staff in full-time equivalents

$thisyear{f13a}

$lastyear{f13a}

$thisyear{f13b}

$lastyear{f13b}

$thisyear{f13c}

$lastyear{f13c}

$thisyear{f13d}

$lastyear{f13d}

"; print "
"; print "
"; print "
"; print "Submission Date: $thisyear{date}

"; print "

Please verify the data; otherwise return to change it.

"; } #--------------------------------------------------------------------- # No tables #--------------------------------------------------------------------- sub no_tables { print ""; print ""; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print ""; print ""; print ""; print " "; print " "; print " "; print " "; print ""; print ""; print ""; print " "; print " "; print " "; print " "; print ""; print ""; print ""; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print ""; print "

Teaching Personnel

Elementary

Secondary

Round all FTE's to the nearest tenth

Male

Female

Male

Female

1a. Numer of pre-school teachers in full-time equivalents

$thisyear{f1aa}

$thisyear{f1ab}

1b. Numer of kindergarten teachers in full-time equivalents

$thisyear{f1ba}

$thisyear{f1bb}

2. Numer of full-time classroom teachers

$thisyear{f2a}

$thisyear{f2b}

$thisyear{f2c}

$thisyear{f2d}

3. Numer of part-time classroom teachers in full-time equivalents

$thisyear{f3a}

$thisyear{f3b}

$thisyear{f3c}

$thisyear{f3d}

4. Numer of instructional Aides in full-time equivalents

$thisyear{f4a}

$thisyear{f4b}

$thisyear{f4c}

$thisyear{f4d}

5. Average salary of all FULL-TIME teachers in the district \$$in{f5}

"; print "
"; print "
"; print "
"; print ""; print ""; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print ""; print " "; print " "; print " "; print " "; print " "; print ""; print "

Other Professional Personnel and Support Staff

Elementary

Secondary

Round all FTE\'s to the nearest tenth

Male

Female

Male

Female

6. Numer of principals in full-time equivalents

$thisyear{f6a}

$thisyear{f6b}

$thisyear{f6c}

$thisyear{f6d}

7. Numer of assistant principals in full-time equivalents

$thisyear{f7a}

$thisyear{f7b}

$thisyear{f7c}

$thisyear{f7d}

8. Numer of guidance couselors/directors in full-time equivalents

$thisyear{f8a}

$thisyear{f8b}

$thisyear{f8c}

$thisyear{f8d}

9. Numer of librarians / media specialists in full-timev"; print "equivalents

$thisyear{f9a}

$thisyear{f9b}

$thisyear{f9c}

$thisyear{f9d}

10. Numer of library / media support staff in full-time equivalents

$thisyear{f10a}

$thisyear{f10b}

$thisyear{f10c}

$thisyear{f10d}

11. Numer of non-teaching Special Education professionals not included above in full-time equivalents

$thisyear{f11a}

$thisyear{f12b}

$thisyear{f11c}

$thisyear{f11d}

12. Numer of clerical support staff in full-time equivalents

$thisyear{f12a}

$thisyear{f12b}

$thisyear{f12c}

$thisyear{f12d}

13. Numer of other support service staff in full-time equivalents

$thisyear{f13a}

$thisyear{f13b}

$thisyear{f13c}

$thisyear{f13d}

"; print "
"; print "
"; print "
"; print "Submission Date: $thisyear{date}

"; print "

Please verify the data; otherwise return to change it.

"; } } #---------------------------------------------------------------------- # File data: store the data in a DBM file. # This module receives a parameter from the main program. # This parameter may be either the default value to be stored for # empty fields, or a special code to signal an update of only a few # values. #---------------------------------------------------------------------- sub file_data { local($separator, $error_value); $separator=":"; # Separator for fieldnames, not URL paths! $error_value = "Init value--if you see this, contact your sysadmin!"; $non_numeric_flag = 0; # Initialization # open DBM file # Any changes to associative array filehandle automatically get written to disk $dbmfile = "Server HD:WebSTAR:nhdata:data:data"; dbmopen(%DATA, $dbmfile, 0644); $in{date} = localtime; # Submission date. This can be changed to be # inputted in the HTML form. # Check data for non-numeric characters while ( ($fieldname, $value) = each(%in) ) { if ($value eq "") { # If field is left blank. $in{$fieldname} = $_[0]; # Set the value to passed parameter. } # end if # \D stands for non-numeric characters. elsif (($value =~ m!\D!) && (($fieldname ne "district") && ($fieldname ne "date") && ($fieldname ne "super") && ($fieldname ne "last_page") && ($fieldname ne "update"))) { $non_numeric_flag = 1; $error_value = "\'$value\'"; } # end if-elsif } # end while #transfer data from associative array %in to filehandle %DATA unless ($non_numeric_flag == 1) { while ( ($fieldname, $value) = each(%in) ) { unless ($value == -1) { # A negative number signals an update, # which implies not filing any blank fields. # The -1 was chosen as an arbitrary numeric # signal--any other special number could be used. # Fieldnames are something like 1996:Manchester:f2b $fieldname = $year . $separator . $in{district} . $separator . $fieldname; $DATA{$fieldname} = $value; } # end unless } # end while } else { print "

Error

Your entry \'$error_value\' is not valid.\n"; print "Only numeric data is acceptable. In other words, the form "; print "will accept only numbers and decimals. If commas, letters, "; print "and/or any other characters that are not numbers (or the "; print "decimal point) are present in even a single field, the data "; print "will all be rejected. In this specific case, "; print "you submitted \'$error_value\', which is why your data is "; print "being rejected.

\n"; } # end unless-else dbmclose(DATA); } # end sub #---------------------------------------------------------------------- #Get date # #Get's date using "localtime". This date can then be used to write #the data files. #---------------------------------------------------------------------- sub get_date { $date = localtime; $date =~ s! ! !g; # Eliminate double spaces, which can wreak havoc at the beginning of the month. local (@date_fields); # $date is now something like "Mon Jul 15 15:15:01 1996" # We only want the year, therefore we split up the string @date_fields = split(/\s/,$date); # The year is the fifth element. Since array starts at 0, # $date_fields[4] is equal to the year. $year = $date_fields[4]; $lyear = $year; --$lyear; } #---------------------------------------------------------------------- # Load data # # Puts the year's data into %thisyear # Puts last year's data into %lastyear # # Assumes filed data is valid. #---------------------------------------------------------------------- sub load_data { local($separator, $maxvalue); $separator=":"; $maxvalue=0.25; # Set alert threshold to a difference of 25%. #open DBM file $dbmfile = "Server HD:WebSTAR:nhdata:data:data"; dbmopen(%DATA, $dbmfile, 0644); #load %DATA into %thisyear and %lastyear print "Year: $year
District: $district
\n"; print "
"; while ( ($fieldname, $value) = each(%DATA) ) { ($y, $d, $f) = split(/$separator/,$fieldname); if (($y == $year) && ($d eq $district)) { $thisyear{$f} = $value; } elsif (($y == $lyear) && ($d eq $district)) { $lastyear{$f} = $value; } #end elsif } #end while dbmclose(DATA); #Check values for large discrepancies (determined by $maxvalue) while ( ($f, $value) = each(%thisyear) ) { unless ( $lastyear{$f} <= 0) { local($diff, $alert, $endalert); $diff = ($value - $lastyear{$f}) / $lastyear{$f}; if ($diff >= $maxvalue) { $alert = ""; $endalert = "*"; } else { $alert = ""; $endalert = ""; } #end if-else $thisyear{$f} = $alert . $thisyear{$f} . $endalert; } # end unless } #end while } #end sub #---------------------------------------------------------------------- # Validate superintendent # # Checks superintendent against a file of valid names #---------------------------------------------------------------------- sub validate_superintendent { local($super, $district); $super=$in{super}; $district=$in{district}; $assoc_file = 'Server HD:WebSTAR:nhdata:data:associations'; #initialize $super_validity $super_validity = 0; dbmopen(%SUPER_OF, $assoc_file, 0644); if ($super eq $SUPER_OF{$district}) { $super_validity = 1; } # end if dbmclose(SUPER_OF); } # end sub #---------------------------------------------------------------------- # check_password # # This subroutine is not actually implemented. However, if password- # checking is desirable, one way of implementing it would be # something like the (commented out) lines below. #---------------------------------------------------------------------- #sub check_password { #[define password file] #[open password file and check password-user matches] #[set a password bit to 1 or 0] #[close passoword file] #} end sub