#!/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.
%lex = ('Edit' => 'Edit',
'Staff Member' => 'Staff Member',
'Main' => 'Main',
'Eoy' => 'Eoy',
'Unable to open template file:' => 'Unable to open template file:',
'The staff member is now stored' => 'The staff member is now stored',
'Start/End of Year Page' => 'Start/End of Year Page',
'Edit Another' => 'Edit Another',
'There was an error storing your data' => 'There was an error storing your data',
'Please record the following error' => 'Please record the following error',
'Contact' => 'Contact',
'Update' => 'Update',
'Error' => 'Error',
'Password Error' => 'Password Error',
'You MUST have a unique userid and a password and staff position.' =>
'You MUST have a unique userid and a password and staff position.',
'Please go back and try again.' => 'Please go back and try again.',
'Error' => 'Error',
);
my $self = 'staffed.pl';
use CGI;
use DBI;
use Data::Password qw(:all); # for password checking...
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
eval require "../../lib/libmeta.pl";
if ( $@ ) {
print $lex{Error}. " $@
\n";
die $lex{Error}. " $@\n";
}
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
my $recid = $arr{id};
my $table;
if ( $arr{tbl} ) {
$table = 'prereg_staff';
} else {
$table = 'staff';
}
my $dsn = "DBI:$dbtype:dbname=$dbase";
$dbh = DBI->connect($dsn,$user,$password);
# Print Page Header
print "$doctype\n