#!/usr/bin/perl # Copyright 2001-2007 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 = ('Delete Subject Enrollment' => 'Delete Subject Enrollment', 'Main' => 'Main', 'Report Card' => 'Report Card', 'No Student Found' => 'No Student Found', 'Edit/Delete Subject Enrollments' => 'Edit/Delete Subject Enrollments', ); use CGI; use DBI; require "../../etc/admin.conf" or die "Cannot open admin.conf!"; my $q = new CGI; print $q->header; my %arr = $q->Vars; my $dsn = "DBI:$dbtype:dbname=$dbase"; my $dbh = DBI->connect($dsn,$user,$password); my $sth = $dbh->prepare("select * from eval where id = ?"); $sth->execute( $arr{id} ); my @arr = $sth->fetchrow; # Lookup Student Name $sth = $dbh->prepare("select lastname,firstname from studentall where studnum = ?"); $sth->execute( $arr[2] ); if ($DBI::errstr){ print $DBI::errstr; die $DBI::errstr; } my ($lastname,$firstname) = $sth->fetchrow; if (not $lastname) { $lastname = "". $lex{'No Student Found'}. ""; } print "$doctype\n
| Course Code: | $arr[1] |
| Reporting Period: | $arr[4] |
| Program: | $arr[5] |
| Comment: | $arr[6] |
| Mark: | $arr[7] |
| $arr[8] | |
| $arr[9] | |
| $arr[10] |
Are you sure you want to delete this record?