#!/usr/bin/perl
# Copyright Les Richardson 2001-2009
# This file is part of Open Administration for Schools. Released under GPL Licensing.
my %lex = ('Student Field Reset' => 'Student Field Reset',
'Main' => 'Main',
'Eoy' => 'Eoy',
'Continue' => 'Continue',
'Select Field to Reset' => 'Select Field to Reset',
'Type of Field Selection' => 'Type of Field Selection',
'Type in Values' => 'Type in Values',
'Select from List' => 'Select from List',
'No Field Selected' => 'No Field Selected',
'Mistake in Input Type' => 'Mistake in Input Type',
'Default Fill - Blank Fields' => 'Default Fill - Blank Fields',
'Grade' => 'Grade',
'Homeroom' => 'Homeroom',
'Student Group' => 'Student Group',
'Separate with Spaces' => 'Separate with Spaces',
'No field to reset' => 'No field to reset',
'Blank=All' => 'Blank=All',
'Student' => 'Student',
'Your update is now stored' => 'Your update is now stored',
'There was an error storing your data' => 'There was an error storing your data',
'Contact' => 'Contact',
'Record the following error' => 'Record the following error',
'Error' => 'Error',
'Gr' => 'Gr',
'HRm' => 'HRm',
);
my $self = 'resetselect.pl';
my $maxTypeCount = 30; # don't allow more than $maxTypeCount different types in a selection list
my %disallow = qw(studid 1 grade 1 homeroom 1);
use DBI;
use CGI;
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
# Show top of page.
print "$doctype\n