forked from science-ation/science-ation
68 lines
1.9 KiB
PHP
68 lines
1.9 KiB
PHP
<?
|
|
/*
|
|
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");
|
|
require("judges.inc.php");
|
|
|
|
$type=$_GET['type'];
|
|
|
|
if($type=="pdf")
|
|
{
|
|
|
|
$rep=new lpdf( i18n($config['fairname']),
|
|
i18n("Judging Teams"),
|
|
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
|
);
|
|
|
|
$rep->newPage();
|
|
$rep->setFontSize(11);
|
|
}
|
|
else if($type=="csv")
|
|
{
|
|
$rep=new lcsv(i18n("Judging Teams"));
|
|
}
|
|
|
|
$teams=getJudgingTeams();
|
|
|
|
$table=array();
|
|
|
|
$table['header']=array(i18n("Team Num"),i18n("Team Name"),i18n("Captain"),i18n("First Name"),i18n("Last Name"));
|
|
$table['widths']=array(0.5, 2.5, 0.8, 1.5, 1.5);
|
|
$table['dataalign']=array("left","left","center","left","left");
|
|
|
|
foreach($teams AS $team)
|
|
{
|
|
foreach($team['members'] AS $member)
|
|
{
|
|
$table['data'][]=array($team['num'],$team['name'],$member['captain'],$member['firstname'],$member['lastname']);
|
|
}
|
|
}
|
|
|
|
$rep->addTable($table);
|
|
$rep->output();
|
|
?>
|