forked from science-ation/science-ation
Implement Bug #0000029 - Report to view school access codes and registration passwords
This commit is contained in:
parent
ac3e1d6b1d
commit
130f0f5786
@ -48,6 +48,11 @@ echo "</table>";
|
|||||||
echo "<a href=\"reports_school_mailing_labels.php?type=pdf\">PDF (Avery #05163 4\"x2\")</a> ";
|
echo "<a href=\"reports_school_mailing_labels.php?type=pdf\">PDF (Avery #05163 4\"x2\")</a> ";
|
||||||
echo "<a href=\"reports_school_mailing_labels.php?type=csv\">CSV</a> ";
|
echo "<a href=\"reports_school_mailing_labels.php?type=csv\">CSV</a> ";
|
||||||
|
|
||||||
|
echo "<br />";
|
||||||
|
echo i18n("School Access Codes").": ";
|
||||||
|
echo "<a href=\"reports_schoolaccesscodes.php?type=pdf\">PDF</a> ";
|
||||||
|
echo "<a href=\"reports_schoolaccesscodes.php?type=csv\">CSV</a> ";
|
||||||
|
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo i18n("Student Emergency Contact Names/Numbers").": ";
|
echo i18n("Student Emergency Contact Names/Numbers").": ";
|
||||||
echo "<a href=\"reports_emergencycontact.php?type=pdf\">PDF</a> ";
|
echo "<a href=\"reports_emergencycontact.php?type=pdf\">PDF</a> ";
|
||||||
|
68
admin/reports_schoolaccesscodes.php
Normal file
68
admin/reports_schoolaccesscodes.php
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<?
|
||||||
|
/*
|
||||||
|
This file is part of the 'Science Fair In A Box' project
|
||||||
|
SFIAB Website: http://www.sfiab.ca
|
||||||
|
|
||||||
|
Copyright (C) 2005 Sci-Tech Ontario Inc <info@scitechontario.org>
|
||||||
|
Copyright (C) 2005 James Grant <james@lightbox.org>
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
require("../common.inc.php");
|
||||||
|
auth_required('admin');
|
||||||
|
require("../lpdf.php");
|
||||||
|
require("../lcsv.php");
|
||||||
|
|
||||||
|
$type=$_GET['type'];
|
||||||
|
|
||||||
|
if($type=="pdf")
|
||||||
|
{
|
||||||
|
|
||||||
|
$rep=new lpdf( i18n($config['fairname']),
|
||||||
|
i18n("School Access Codes"),
|
||||||
|
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||||
|
);
|
||||||
|
|
||||||
|
$rep->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();
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user