#! /usr/bin/perl
# Copyright 2001-2007 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 = ('Main' => 'Main',
'No Staff Found' => 'No Staff Found',
'View/Download' => 'View/Download',
'Custom Staff List' => 'Custom Staff List',
'Main' => 'Main',
'View Log File' => 'View Log File',
'Continue' => 'Continue',
'Homeroom' => 'Homeroom',
'Grade' => 'Grade',
'Cell Width' => 'Cell Width',
'Max Staff/Page' => 'Max Staff/Page',
'Select' => 'Select',
'Repeat Col Headings' => 'Repeat Col Headings',
'Staff List' => 'Staff List',
'Grade' => 'Grade',
'Room' => 'Room',
'Rm' => 'Rm',
'Students' => 'Students',
'Select Staff Positions' => 'Select Staff Positions',
'Select Sort Order' => 'Select Sort Order',
'Position' => 'Position',
'Name' => 'Name',
'Column Heading' => 'Column Heading',
'Other Settings' => 'Other Settings',
'Paper Size' => 'Paper Size',
'Letter' => 'Letter',
'A4' => 'A4',
'Legal' => 'Legal',
'No Positions Selected' => 'No Positions Selected',
);
my $self = 'rptcustomstafflist.pl';
use DBI;
use CGI;
# Configurable settings
my $maxstaff = 28; # maximum staff per page.
my $maxstaffpositions = 12; # max type of staff types in admin.conf;
my $width = 8; # default width of columns, 8mm;
my $entrylimit = 15; # Max entries allowed for rotated text.
my $maxentrysize = 14; # Maximum number of characters for the entry
my $namewidth = 50; # Width of the first 'Name' column in mm.
my $extracolwidth = 10; # Width of the second column in mm. Done in case I need this for another field later...
my $margins = 26; # leave 0.5in (13mm) for each side margin.
$q = new CGI;
print $q->header;
%arr = $q->Vars;
unless (require "../etc/admin.conf"){
print "Cannot open admin.conf!";
die "Cannot open admin.conf!";
}
unless (require "../lib/liblatex.pl"){
print "Cannot open liblatex.pl!";
die "Cannot open liblatex.pl!";
}
# Date set after pulling in month and dow array.
my ($sec, $min, $hour, $mday, $mon, $year, $wday,
$yday, $iddst) = localtime(time);
$year = $year + 1900;
$mon++;
$wday++;
my $currdate = "$s_dow[$wday], $s_month[$mon] $mday, $year";
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
print "$doctype\n