#!/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 = ( 'Update Record' => 'Update Record', 'Edit Attendance' => 'Edit Attendance', 'Student Number' => 'Student Number', 'Date' => 'Date', 'Reason' => 'Reason', 'Attendance' => 'Attendance', 'Your attendance update is now stored' => 'Your attendance update is now stored', 'There was an error storing your data' => 'There was an error storing your data', 'Please contact your network administrator at' => 'Please contact your network administrator at', 'Please record the following error string' => 'Please record the following error string', 'Edit/Delete Another Record' => 'Edit/Delete Another Record', 'Today' => 'Today', 'Yesterday' => 'Yesterday', 'All' => 'All', 'Period' => 'Period', 'Subject-Section' => 'Subject-Section', 'min' => 'min', 'Late' => 'Late', 'Main' => 'Main', ); my $self = 'atted.pl'; use DBI; use CGI; my $q = new CGI; print $q->header; my %arr = $q->Vars; require "../etc/admin.conf" or die "Cannot open admin.conf!"; my $dsn = "DBI:$dbtype:dbname=$dbase"; my $dbh = DBI->connect($dsn,$user,$password); my $name = $arr{name}; my $sth = $dbh->prepare("select * from attend where attid = '$arr{recnum}'"); $sth->execute; if ($DBI::errstr) { print $DBI::errstr; die $DBI::errstr; } my ($attid, $studnum, $absdate, $reason, $period, $subjsec, $late) = $sth->fetchrow; # Print Page Head. print "$doctype\n