#! /usr/bin/perl
# Copyright 2001-2022 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.
use DBI;
use CGI;
my %lex = ('Attendance' => 'Attendance',
'Perfect Attendance' => 'Perfect Attendance',
'Report' => 'Report',
'Not Found' => 'Not Found',
'Name' => 'Name',
'Start Date' => 'Start Date',
'End Date' => 'End Date',
'Error' => 'Error',
'Grade' => 'Grade',
'Homeroom' => 'Homeroom',
'Main' => 'Main',
'Unexcused' => 'Unexcused',
);
my $self = 'rptAttPerf.pl';
# Get passed date for perfect attendance (inclusive)
# Read config variables
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
# Get Current 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;
my %arr = $q->Vars;
print $q->header( -charset, $charset );
my $startdate = $arr{startdate};
my $enddate = $arr{enddate};
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
# Print Page Header
my $title = qq{$lex{'Perfect Attendance'} $lex{Report}};
print qq{$doctype\n