diff --git a/register_participants_signature.php b/register_participants_signature.php index 27b470f..8c224ff 100644 --- a/register_participants_signature.php +++ b/register_participants_signature.php @@ -94,6 +94,8 @@ $pdf->newPage(); if($_GET['sample']) { $projectinfo->title="Sample Project Title"; + $projectinfo->division="Proj Division"; + $projectinfo->category="Proj Category"; $studentinfo->firstname="SampleFirst"; $studentinfo->lastname="SampleLast"; $studentinfo->grade="10"; @@ -103,7 +105,17 @@ $pdf->newPage(); else { //grab the project info - $q=mysql_query("SELECT * FROM projects WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'"); + $q=mysql_query("SELECT projects.*, + projectcategories.category, + projectdivisions.division + FROM projects + JOIN projectdivisions ON projects.projectdivisions_id=projectdivisions.id + JOIN projectcategories ON projects.projectcategories_id=projectcategories.id + WHERE registrations_id='".$_SESSION['registration_id']."' + AND projects.year='".$config['FAIRYEAR']."' + AND projectdivisions.year='".$config['FAIRYEAR']."' + AND projectcategories.year='".$config['FAIRYEAR']."' + "); $projectinfo=mysql_fetch_object($q); $q=mysql_query("SELECT * FROM students WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'"); @@ -111,8 +123,9 @@ $pdf->newPage(); $studentinfoarray[]=$si; } - $topboxtext="Registration Number: ".$registration_number."\n". - "Project Title: $projectinfo->title\n"; + $topboxtext=i18n("Registration Number").": ".$registration_number."\n". + i18n("Project Title").": $projectinfo->title\n". + i18n($projectinfo->category)." / ".i18n($projectinfo->division)."\n"; if(count($studentinfoarray)>1) $plural="s"; else