From 65c4600bec31e25cc46a8c113052712f9dde3d89 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 22 Apr 2005 19:14:37 +0000 Subject: [PATCH] Judges nametags --- admin/reports.php | 5 +- admin/reports_nametags_judges.php | 115 ++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 admin/reports_nametags_judges.php diff --git a/admin/reports.php b/admin/reports.php index 359bded..b4f2ede 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -48,8 +48,9 @@ echo ""; echo i18n("Project Table Labels").": "; echo "PDF   "; echo "
"; - echo i18n("Student Nametags").": "; - echo "PDF   "; + echo i18n("Nametags").": "; + echo "Students PDF   "; + echo "Judges PDF   "; echo "
"; diff --git a/admin/reports_nametags_judges.php b/admin/reports_nametags_judges.php new file mode 100644 index 0000000..ae3714a --- /dev/null +++ b/admin/reports_nametags_judges.php @@ -0,0 +1,115 @@ + + 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. +*/ +?> +setPageStyle("nametags"); + $rep->newPage(8.5,11); + $rep->setNametagDimensions($card_width,$card_height); + $rep->setFontSize(11); + + $q=mysql_query("SELECT + judges.firstname, + judges.lastname, + judges.organization + FROM + judges, + judges_years + WHERE + judges.complete='yes' AND + judges_years.year='".$config['FAIRYEAR']."' AND + judges.id=judges_years.judges_id + ORDER BY + judges.lastname, judges.firstname + "); +// +/* + this is 4x3" on my screen, so i'll use it to figure + out what it should look like in a semi-proporational + layout. + +*********************************************************** +* * +* -------- * +* | | [ NAME OF THE SCIENCE FAIR GOES HERE ] * +* | logo | * +* | | [ NAME OF THE FAIR IN FRENCH GOES HERE ] * +* | | * +* -------- * +* * +* * +* [ ] * +* [ THE STUDENTS NAME IN BIG LETTERS ] * +* [ ] * +* * +* * +* [ ] * +* [ PROJECT TITLE GOES HERE ALSO FAIRLY BIG ] * +* [ ] * +* * +* * +* [ CATEGORY / DIVISION ] * +* * +* * +* PROJECT NUMBER * +* * +* * +*********************************************************** + + +on the page we have tagnum layout like this: + + 1 2 + 3 4 + 5 6 + +*/ + + while($r=mysql_fetch_object($q)) + { + $rep->newNametag(); + $rep->setFontSize(18); + $rep->addNametagText(0.25,"$r->firstname $r->lastname"); + $rep->setFontSize(14); + $rep->addNametagText(0.90,"Judge"); + $rep->setFontSize(12); + $rep->addNametagText(1.5,$r->organization); + + } + + + $rep->output(); + +?>