#! /usr/bin/perl
# Copyright 2001-2023 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 = ('Teacher' => 'Teacher',
'Main' => 'Main',
'Timetables' => 'Timetables',
'Timetable' => 'Timetable',
'Cannot open tex file' => 'Cannot open tex file',
'View/Download' => 'View/Download',
'View Log File' => 'View Log File',
'Select' => 'Select',
'Lastname, Firstname' => 'Lastname, Firstname',
'Homeroom, Lastname, Firstname' => 'Homeroom, Lastname, Firstname',
'Grade, Lastname, Firstname' => 'Grade, Lastname, Firstname',
'Band, Lastname, Firstname' => 'Band, Lastname, Firstname',
'Sort by' => 'Sort by',
'Grade' => 'Grade',
'Homeroom' => 'Homeroom',
'Continue' => 'Continue',
'No Staff Found' => 'No Staff Found',
'Error' => 'Error',
'Blank=All' => 'Blank=All',
'Term' => 'Term',
'Period' => 'Period',
'Day' => 'Day',
'Separate with Spaces' => 'Separate with Spaces',
'Terms' => 'Terms',
'Font Size' => 'Font Size',
'Paper Size' => 'Paper Size',
'Letter' => 'Letter',
'Legal' => 'Legal',
'A4' => 'A4',
'Missing' => 'Missing',
);
# maxchars and field info passed into page 1.
#my $maxchars = 10; # maximum characters for subject description (if not small desc field)
#my $descfield = 'smdesc'; # either smdesc or description value
#my $logowidth = '20mm';
#my $logofile = 'schoollogo.jpg';
my $self = "rptStaffTtb.pl";
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $@
\n";
die $lex{Error}. " $@\n";
}
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
# print page header
my $title = qq{$lex{Teacher} $lex{Timetables} Report 1};
print qq{$doctype\n