#!/usr/bin/perl # Copyright 2001-2006 Leslie Richardson # This file is part of Open Admin for Schools. # Open Admin for Schools is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. my %lex = ('Reset Attendance Reasons' => 'Reset Attendance Reasons', 'Name' => 'Name', 'Reason' => 'Reason', 'Period' => 'Period', 'Date' => 'Date', 'Continue' => 'Continue', 'Your selected records are now updated' => 'Your selected records are now updated', 'There was an error updating your data' => 'There was an error updating your data', 'Attendance' => 'Attendance', 'Records' => 'Records', 'Red = Withdrawn' => 'Red = Withdrawn', ); use DBI; use CGI; my @month = ('','January','February','March','April','May','June','July', 'August','September','October','November','December'); # Get Date my @tim = localtime(time); my $year = @tim[5] + 1900; my $month = @tim[4] + 1; my $day = @tim[3]; my $currdate = "$year-$month-$day"; my $currdate1 = "@month[$month] $day, $year"; my $q = new CGI; print $q->header; my %arr = $q->Vars; require "../etc/admin.conf" or die "Cannot open admin.conf!"; my $dsn = "DBI:$dbtype:dbname=$dbase"; my $dbh = DBI->connect($dsn,$user,$password); my $date; if ($arr{date}){ $day = substr($arr{date},4,2); $month = substr($arr{date},2,2); $year = "20".substr($arr{date},0,2); $date = "$year-$month-$day"; # Date to reset } else { $date = $currdate; } # Main Page Header. print "$doctype\n
Reset Date: $date
\n"; if ($arr{updateflag}) { delete $arr{updateflag}; updateReason(); } # Start of form setup. print "