#!/usr/bin/perl
# Copyright 2001-2019 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.
# *** Outline ***
# Delete Function to permanently remove students which are already
# withdrawn and will never be registered in this or other division
# schools (ie. graduate, etc)
my %lex = ('Main' => 'Main',
'Eoy' => 'Eoy',
'Error' => 'Error',
'Withdrawn Students' => 'Withdrawn Students',
'Demographics' => 'Demographics',
'Discipline' => 'Discipline',
'Attendance' => 'Attendance',
'Report Card' => 'Report Card',
'Records' => 'Records',
'Birthdate' => 'Birthdate',
'Age' => 'Age',
'Transfers' => 'Transfers',
'Delete' => 'Delete',
'Student' => 'Student',
'Contact' => 'Contact',
'Records Deleted' => 'Records Deleted',
'Demographics' => 'Demographics',
'Delete' => 'Delete',
'Password' => 'Password',
'Continue' => 'Continue',
'Audit' => 'Audit',
'Record(s) Stored' => 'Record(s) Stored',
);
my $self = 'permdel.pl';
my $pass = 'tansi';
use DBI;
use CGI;
# Read config variables
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
# Load audit write function
eval require "../../lib/libaudit.pl";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
# Get Date
my @tim = localtime(time);
my $year = @tim[5] + 1900;
my $month = @tim[4] + 1;
my $day = @tim[3];
if ( length( $day ) == 1 ) { $day = '0'. $day; }
if ( length( $month ) == 1 ) { $month = '0'. $month; }
my $currdate = "$year-$month-$day";
my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
# HTML Header
my $title = "$lex{Delete} $lex{'Withdrawn Students'}";
print qq{$doctype\n