#!/usr/bin/perl
# Copyright 2001-2022 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',
'student records depend on this subject' => 'student records depend on this subject',
'Please remove these first using' => 'Please remove these first using',
'Course Enrollment' => 'Course Enrollment',
'Course' => 'Course',
'Subject-Section' => 'Subject-Section',
'Records Depending' => 'Records Depending',
'Are you sure' => 'Are you sure',
'Edit/Delete' => 'Edit/Delete',
'Contact' => 'Contact',
'deleted' => 'deleted',
'Error' => 'Error',
'Delete' => 'Delete',
'Record' => 'Record',
);
my $self = 'subjdel.pl';
use CGI;
use DBI;
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;
my $title = qq{$lex{Delete} $lex{Course}};
print qq{$doctype\n
$lex{Course}}; print qq{ | $description |
$lex{'Subject-Section'}}; print qq{ | $subjsec |
$lex{'Records Depending'}}; print qq{ | $subjcount |