#!/usr/bin/perl
# Copyright 2001-2009 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',
'Report Card' => 'Report Card',
'Transcript Post' => 'Transcript Post',
'Select Posting Term' => 'Select Posting Term',
'Select Term' => 'Select Term',
'Select Subjects to Post to Transcript System' =>
'Select Subjects to Post to Transcript System',
'Select Subjects' => 'Select Subjects',
'Check Subjects' => 'Check Subjects',
'Posting to Transcript System' => 'Posting to Transcript System',
'Mark' => 'Mark',
'Student' => 'Student',
'Subject' => 'Subject',
'Post more Subjects' => 'Post more Subjects',
'Duplicate' => 'Duplicate',
'Error' => 'Error',
'Identity Mismatch for' => 'Identity Mismatch for',
'Replace existing records?' => 'Replace existing records?',
'Updating Record for' => 'Updating Record for',
'Skipping' => 'Skipping',
);
# rounding precsion of mark.
my $precision = 1;
my $self = 'tscpost.pl';
my $idfield = 'provnum'; # change to suit the field for state/provincial id or SSN, etc.
use DBI;
use CGI;
use Number::Format qw(:subs);
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $@
\n";
die $lex{Error}. " $@\n";
}
my $q = CGI->new;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
my $fmt = new Number::Format(-decimal_fill => '1', -decimal_digits => '2');
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
# Page Header
print "$doctype\n