From 130f0f57867e90444541e545cf82482ee5ea746f Mon Sep 17 00:00:00 2001 From: james Date: Sun, 15 Oct 2006 20:07:18 +0000 Subject: [PATCH] Implement Bug #0000029 - Report to view school access codes and registration passwords --- admin/reports.php | 5 +++ admin/reports_schoolaccesscodes.php | 68 +++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 admin/reports_schoolaccesscodes.php diff --git a/admin/reports.php b/admin/reports.php index f9861da..76429f5 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -48,6 +48,11 @@ echo ""; echo "PDF (Avery #05163 4\"x2\")   "; echo "CSV   "; + echo "
"; + echo i18n("School Access Codes").": "; + echo "PDF   "; + echo "CSV   "; + echo "
"; echo i18n("Student Emergency Contact Names/Numbers").": "; echo "PDF   "; diff --git a/admin/reports_schoolaccesscodes.php b/admin/reports_schoolaccesscodes.php new file mode 100644 index 0000000..dc46105 --- /dev/null +++ b/admin/reports_schoolaccesscodes.php @@ -0,0 +1,68 @@ + + Copyright (C) 2005 James Grant + + This program 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, version 2. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +?> +newPage(); + $rep->setFontSize(11); + } + else if($type=="csv") + { + $rep=new lcsv(i18n("School Access Codes")); + } + + $schoolsq=mysql_query("SELECT + * + FROM + schools + WHERE + year='".$config['FAIRYEAR']."' + ORDER BY school + "); + + $table=array(); + $table['header']=array(i18n("School"),i18n("City"),i18n("Access Code"),i18n("Reg Pass")); + $table['widths']=array( 4.0, 1.5, 1.0, 1.0); + $table['dataalign']=array("left","left","left","left"); + + while($school=mysql_fetch_object($schoolsq)) + { + $table['data'][]=array($school->school,$school->city,$school->accesscode,$school->registration_password); + } + $rep->addTable($table); + $rep->output(); +?>