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. */ ?> << ".i18n("Back to Administration")."  "; echo "<< ".i18n("Back to Reports")."
"; echo "
"; echo ""; /* We need to prompt them for the fields. We will display check boxes for every field. By default all of the fields are checked. */ echo "\n\n"; echo "\n"; echo "\n"; echo "
"; echo i18n("Please select what fields you would like to display on the table labels").": "; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo " Project Title\n"; echo "
\n"; echo " Project Number\n"; echo "
\n"; echo " Student's First Name\n"; echo "
\n"; echo " Student's Surname Name\n"; echo "
\n"; echo " Project Category\n"; echo "
\n"; echo " Project Division\n"; echo "
\n"; echo "\n"; echo "
"; echo "\n"; send_footer(); } else { if($type=="pdf") { $rep=new lpdf( i18n($config['fairname']), i18n(""), $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif" ); $rep->newPage(11,8.5); $rep->setFontSize(11); } else if($type=="csv") { $rep=new lcsv(i18n("Table Labels")); } $projq=mysql_query("SELECT registrations.id AS reg_id, registrations.num AS reg_num, projects.id, projects.title, projects.projectnumber, projects.projectdivisions_id, projects.projectcategories_id, projectdivisions.division, projectcategories.category FROM registrations LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id LEFT JOIN projects on projects.registrations_id=registrations.id WHERE projects.year='".$config['FAIRYEAR']."' AND projectdivisions.year='".$config['FAIRYEAR']."' AND projectcategories.year='".$config['FAIRYEAR']."' AND ( registrations.status='complete' OR registrations.status='paymentpending' ) ORDER BY projects.projectnumber "); echo mysql_error(); $num=mysql_num_rows($projq); while($proj=mysql_fetch_object($projq)) { $rep->setFontSize(22); if($title) $rep->addtext($proj->title,"center"); else $rep->nextLine(); $rep->setFontSize(150); $rep->yloc=6.75; if($projectnumber) $rep->addtext($proj->projectnumber,"center"); else $rep->nextLine(); $rep->setFontSize(22); $sq=mysql_query("SELECT students.firstname, students.lastname FROM students WHERE students.registrations_id='$proj->reg_id' "); $students=""; $studnum=0; while($studentinfo=mysql_fetch_object($sq)) { if($studnum>0) $students.=", "; if($firstname && $lastname) $students.="$studentinfo->firstname $studentinfo->lastname"; else if($firstname) $students.="$studentinfo->firstname"; else if($lastname) $students.="$studentinfo->lastname"; $studnum++; } $rep->nextLine(); $rep->nextLine(); $rep->addText($students,"center"); $rep->nextLine(); $rep->nextLine(); if($category && $division) $rep->addText(i18n($proj->category)." - ".i18n($proj->division),"center"); else if($category) $rep->addText(i18n($proj->category),"center"); else if($division) $rep->addText(i18n($proj->division),"center"); $index++; if($index!=$num) $rep->newPage(); } $rep->output(); } ?>