Committee Nametags

This commit is contained in:
james 2005-04-22 19:51:47 +00:00
parent 424274b52c
commit 7c95c37d21
2 changed files with 112 additions and 0 deletions

View File

@ -51,6 +51,7 @@ echo "</table>";
echo i18n("Nametags").": ";
echo "<a href=\"reports_nametags_students.php\">Students PDF</a> &nbsp; ";
echo "<a href=\"reports_nametags_judges.php\">Judges PDF</a> &nbsp; ";
echo "<a href=\"reports_nametags_committee.php\">Committee PDF</a> &nbsp; ";
echo "<br />";

View File

@ -0,0 +1,111 @@
<?
/*
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");
$card_width=4;
$card_height=3;
$rep=new lpdf( i18n($config['fairname']),
"Student Nametags",
$_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"
);
$rep->setPageStyle("nametags");
$rep->newPage(8.5,11);
$rep->setNametagDimensions($card_width,$card_height);
$rep->setFontSize(11);
$q=mysql_query("SELECT
name,
organization
FROM
committees_members
WHERE
deleted='N'
ORDER BY
name
");
//
/*
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->name");
$rep->setFontSize(14);
$rep->addNametagText(0.90,"Committee");
$rep->setFontSize(12);
$rep->addNametagText(1.5,$r->organization);
}
$rep->output();
?>