#!/usr/bin/perl
# Copyright 2001-2020 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.
# Description: Grade based subject enrollment. List all the students
# for all the subjects in that grade. Deselect those that you don't
# have in those subjects.
my %lex = ('Main' => 'Main',
'Student Group' => 'Student Group',
'Grade' => 'Grade',
'Homeroom' => 'Homeroom',
'Continue' => 'Continue',
'Medical' => 'Medical',
'Add' => 'Add',
'Record' => 'Record',
'Checked' => 'Checked',
'Blank=All' => 'Blank=All',
'Separate with Spaces' => 'Separate with Spaces',
'Category' => 'Category',
'New' => 'New',
'Next Page' => 'Next Page',
'Description' => 'Description',
'Record(s) Stored' => 'Record(s) Stored',
'Contact' => 'Contact',
'Error' => 'Error',
'Checked' => 'Checked',
'Student Number' => 'Student Number',
'Results' => 'Results',
'Record Exists' => 'Record Exists',
'Skipping' => 'Skipping',
'Multiple Categories' => 'Multiple Categories',
'Blank' => 'Blank',
'Missing' => 'Missing',
'or' => 'or',
'Not Found' => 'Not Found',
);
my $self = 'medadd.pl';
use DBI;
use CGI;
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. " $@ \n";
die $lex{Error}. " $@\n";
}
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
# Print Page Header
my $title = qq{$lex{Add} $lex{Medical} $lex{Record}};
print qq{$doctype\n