#! /usr/bin/perl
# Copyright 2001-2008 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 $self = 'rptcustomclasslist.pl';
my %lex = ('Main' => 'Main',
'No Student(s) Found' => 'No Student(s) Found',
'View/Download' => 'View/Download',
'Custom Classlists' => 'Custom Classlists',
'Main' => 'Main',
'View Log File' => 'View Log File',
'Continue' => 'Continue',
'Homeroom' => 'Homeroom',
'Grade' => 'Grade',
'Leave blank for all students' => 'Leave blank for all students',
'Cell Width' => 'Cell Width',
'Max Students/Page' => 'Max Students/Page',
'Select' => 'Select',
'Repeat Entry Elements' => 'Repeat Entry Elements',
'Classlist' => 'Classlist',
'Rm' => 'Rm',
'Students' => 'Students',
'Error' => 'Error',
'Paper Size' => 'Paper Size',
'Letter' => 'Letter',
'Legal' => 'Legal',
'A4' => 'A4',
'Font Size' => 'Font Size',
'Gray Shade' => 'Gray Shade',
'Smaller=Darker' => 'Smaller=Darker',
'Include Student Number, Gender, Youngest' =>
'Include Student Number, Gender, Youngest',
'Additional Field' => 'Additional Field',
);
use DBI;
use CGI;
use Cwd;
# Configurable settings
my $maxstudents = 30; # maximum students per page.
my $width = 8; # default width of columns, 8 mm;
my $extrafieldsize = 18; # studnum and extra field in mm.
my $defaultgrayshade = '0.95'; # shading for alternate rows
my $entrylimit = 18; # 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 $q = new CGI;
print $q->header;
my %arr = $q->Vars;
eval require "../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $@ \n";
die $lex{Error}. " $@\n";
}
eval require "../lib/liblatex.pl";
if ( $@ ) {
print $lex{Error}. " $@ \n";
die $lex{Error}. " $@\n";
}
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $iddst) = localtime(time);
$year = $year + 1900;
$wday++; $mon++;
my $currdate = "$dow[$wday], $month[$mon] $mday, $year";
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
# Get current dir so know what CSS to display;
if (getcwd() =~ /tcgi/){ # we are in tcgi
$css = $tchcss;
$homepage = $tchpage;
}
print "$doctype\n