#!/usr/bin/perl
# Copyright 2001-2019 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.
# Monthly report for Enrollment change.
# PDF Output
my %lex = ('Monthly Enrollment' => 'Monthly Enrollment',
'View/Download' => 'View/Download',
'View Log File' => 'View Log File',
'Main' => 'Main',
'Blank=Previous Month' => 'Blank=Previous Month',
'No Enrollment Changes' => 'No Enrollment Changes',
'Student' => 'Student',
'Reason' => 'Reason',
'Principal' => 'Principal',
'Grade' => 'Grade',
'Error' => 'Error',
'Continue' => 'Continue',
'Month' => 'Month',
'Paper Size' => 'Paper Size',
'Letter' => 'Letter',
'Legal' => 'Legal',
'A4' => 'A4',
'Font Size' => 'Font Size',
'Report' => 'Report',
'Days Open' => 'Days Open',
'Homeroom' => 'Homeroom',
'Missing' => 'Missing',
'Periods Per Day' => 'Periods Per Day',
);
# show Principal Signature Line; set to 0 to turn off
my $principalSign = 1;
my $self = 'attenrolfix.pl';
use DBI;
use CGI;
use Time::JulianDay;
use Number::Format qw(:all);
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
eval require "../../lib/libattend.pl";
if ( $@ ) {
print $lex{Error}. " $@
\n";
die $lex{Error}. " $@
\n";
}
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
# Database setup
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
# Set Date
my @tim = localtime(time);
my $cyear = @tim[5] + 1900;
my $cmonth = @tim[4] + 1;
my $cday = @tim[3];
my $currdate = "$cyear-$cmonth-$cday";
my $currjd = julian_day( split('-', $currdate) );
my $curryrmo = "$cyear-$cmonth";
# Print Page Head.
my $title = "Fix Attendance Outside Enrollments Error";
print qq{$doctype\n