#!/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.
use CGI;
use DBI;
use Data::Password qw(:all); # for password checking...
my $q = new CGI;
print $q->header;
my %arr = $q->Vars;
my $recid = $arr{id};
my $table;
if ( $arr{tbl} ) {
$table = 'prereg_staff';
} else {
$table = 'staff';
}
my $self = 'staffed.pl';
%lex = ( 'Edit Staff Members' => 'Edit Staff Members',
'Edit Prereg Staff Members' =>
'Edit Prereg Staff Members',
'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 Staff Member' => 'Edit Another Staff Member',
'Edit Another Prereg Staff Member' =>
'Edit Another Prereg Staff Member',
'There was an error storing your data.' => 'There was an error storing your data.',
'Please record the following error string' => 'Please record the following error string',
'Please contact' => 'Please contact',
'Cannot open' => 'Cannot open',
'Update Staff Member Information' => 'Update Staff Member Information',
'Warning! You should have a unique userid for each teacher.' =>
'Warning! You should have a unique userid for each teacher.',
'This userid exists already exists.' => 'This userid exists already exists.',
'Ignore this warning if you are creating another entry' =>
'Ignore this warning if you are creating another entry',
'for the same teacher.' => 'for the same teacher.',
'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.',
);
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 $dsn = "DBI:$dbtype:dbname=$dbase";
$dbh = DBI->connect($dsn,$user,$password);
# Print Page Header
print "$doctype\n