#!/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.
my %lex = ('Add' => 'Add',
'Eoy' => 'Eoy',
'Main' => 'Main',
'Type' => 'Type',
'Statutory Holiday' => 'Statutory Holiday',
'Inservice' => 'Inservice',
'Holiday' => 'Holiday',
'Other' => 'Other',
'Description' => 'Description',
'Day In Cycle' => 'Day In Cycle',
'No' => 'No',
'Yes' => 'Yes',
'Save' => 'Save',
'Date' => 'Date',
'Add Another' => 'Add Another',
'Error' => 'Error',
'Closed' => 'Closed',
'School Closed' => 'School Closed',
'Continue' => 'Continue',
'Periods' => 'Periods',
'School' => 'School',
);
my $self = 'dateAdd.pl';
use DBI;
use CGI;
# Read Config variables
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $@
\n";
die $lex{Error}. " $@\n";
}
# Library to provide grade groups based on g_ppd values. (ie. K-4)
eval require "../../lib/libDate.pl";
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;
my $title = "$lex{Add} $lex{Date} - $lex{'School Closed'}";
print qq{$doctype\n