#!/usr/bin/perl
# Copyright 2001-2010 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 = ('Track Report' => 'Track Report',
'Main' => 'Main',
'Date format Error' => 'Date format Error',
'Aging Date' => 'Aging Date',
'Name' => 'Name',
'Birthdate' => 'Birthdate',
'Sex' => 'Sex',
'House' => 'House',
'Homeroom' => 'Homeroom',
'Month' => 'Month',
'Day' => 'Day',
'Age' => 'Age',
'Error' => 'Error',
'Continue' => 'Continue',
'Blank=Today' => 'Blank=Today',
);
use DBI;
use CGI;
eval require "../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
# Get Date
my @tim = localtime(time);
my $year = @tim[5] + 1900;
my $month = @tim[4] + 1;
if (length($month) == 1) { $month = '0'.$month; }
my $day = @tim[3];
if (length($day) == 1) { $day = '0'.$day; }
my $currdate = "$year-$month-$day";
my $currdate1 = "@month[$month] $day, $year";
my $q = new CGI;
my %arr = $q->Vars;
print $q->header( -charset, $charset );
print "$doctype\n
'. $lex{'Aging Date'}. ": $agingdate Split Date: $splitdate
\n"; my $first = 1; my ($prevmonthday, $currmonthday); while (my ($lastname, $firstname, $initial, $grade, $homeroom, $sex, $birthdate, $house) = $sth->fetchrow) { my ($yr,$mon,$day) = split /-/, $birthdate; my $student = "$sex$lastname$firstname:$lastname, $firstname $initial:$birthdate:$sex:$house:$homeroom"; $prevmonthday = $currmonthday; $prevyear = $curryear; $currmonthday = $mon.$day; $curryear = $yr; if ($first) { # for setup... loop after getting @rec started and dates set. $first = 0; push @rec, $student; next; } #print "P:$prevmonthday S:$splitdate C:$currmonthday PY:$prevyear CY:$curryear