forked from science-ation/science-ation
- Replace two judging reports.. The second isn't quite a perfect match, but it's close
enough.. Currently we can't produce both a list of judges and a list of awards for each team with the generator (how the heck would we express that with an SQL statement)
This commit is contained in:
parent
2b4c5f12e3
commit
3f737b3270
@ -120,10 +120,14 @@ while($catr=mysql_fetch_object($catq))
|
||||
|
||||
echo "<br />";
|
||||
echo i18n("Judging Teams").": ";
|
||||
echo "<a href=\"reports_judges_teams.php?type=csv\">List (CSV)</a> ";
|
||||
echo "<a href=\"reports_judges_teams.php?type=pdf\">List (PDF)</a> ";
|
||||
echo "<a href=\"reports_judges_teams_view.php?type=csv\">Team View (CSV)</a> ";
|
||||
echo "<a href=\"reports_judges_teams_view.php?type=pdf\">Team View (PDF)</a> ";
|
||||
echo "<a href=\"reports_gen.php?id=21&type=csv\">List (CSV)</a> ";
|
||||
echo "<a href=\"reports_gen.php?id=21&type=pdf\">List (PDF)</a> ";
|
||||
echo "<a href=\"reports_gen.php?id=22&type=csv\">Team Awards (CSV)</a> ";
|
||||
echo "<a href=\"reports_gen.php?id=22&type=pdf\">Team Awards (PDF)</a> ";
|
||||
//cho "<a href=\"reports_judges_teams.php?type=csv\">List (CSV)</a> ";
|
||||
//cho "<a href=\"reports_judges_teams.php?type=pdf\">List (PDF)</a> ";
|
||||
// echo "<a href=\"reports_judges_teams_view.php?type=csv\">Team View (CSV)</a> ";
|
||||
// echo "<a href=\"reports_judges_teams_view.php?type=pdf\">Team View (PDF)</a> ";
|
||||
|
||||
echo "<br />";
|
||||
echo i18n("Judging Teams Project Assignments").": ";
|
||||
|
@ -49,7 +49,7 @@ $report_awards_fields = array(
|
||||
|
||||
'judgeteamnum' => array(
|
||||
'name' => 'Judging Team -- Number',
|
||||
'header' => 'Num',
|
||||
'header' => 'Team',
|
||||
'width' => 0.5,
|
||||
'table' => 'judges_teams.num'),
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
<?
|
||||
/*
|
||||
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)
|
||||
{
|
||||
if(count($team['members']))
|
||||
{
|
||||
foreach($team['members'] AS $member)
|
||||
{
|
||||
$table['data'][]=array($team['num'],$team['name'],$member['captain'],$member['firstname'],$member['lastname']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rep->addTable($table);
|
||||
$rep->output();
|
||||
?>
|
@ -1,91 +0,0 @@
|
||||
<?
|
||||
/*
|
||||
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 View"),
|
||||
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
|
||||
);
|
||||
|
||||
$rep->newPage();
|
||||
$rep->setFontSize(11);
|
||||
}
|
||||
else if($type=="csv")
|
||||
{
|
||||
$rep=new lcsv(i18n("Judging Teams View"));
|
||||
}
|
||||
|
||||
$teams=getJudgingTeams();
|
||||
|
||||
foreach($teams AS $team)
|
||||
{
|
||||
$table=array();
|
||||
|
||||
$table['header']=array(i18n("Captain"),i18n("First Name"),i18n("Last Name"));
|
||||
$table['widths']=array( 1.0, 3.0, 3.0);
|
||||
$table['dataalign']=array("center","left","left");
|
||||
|
||||
$rep->heading($team['name']." (".$team['num'].")");
|
||||
|
||||
$numawards=count($team['awards']);
|
||||
if($numawards==1) $plural=""; else $plural="s";
|
||||
|
||||
$awardstr="$numawards Award$plural: ";
|
||||
if(is_array($team['awards'])) {
|
||||
foreach($team['awards'] AS $award)
|
||||
{
|
||||
$awardstr.="(".$award['award_type'].") ".$award['name'].", ";
|
||||
}
|
||||
}
|
||||
//trim off the last ", "
|
||||
$awardstr=substr($awardstr,0,-2);
|
||||
$rep->addText($awardstr);
|
||||
|
||||
if(count($team['members']))
|
||||
{
|
||||
foreach($team['members'] AS $member)
|
||||
{
|
||||
$table['data'][]=array($member['captain'],$member['firstname'],$member['lastname']);
|
||||
}
|
||||
}
|
||||
|
||||
$rep->addTable($table);
|
||||
$rep->nextline();
|
||||
|
||||
unset($table);
|
||||
|
||||
}
|
||||
|
||||
$rep->output();
|
||||
?>
|
Loading…
Reference in New Issue
Block a user