From caa1f593af82e1271110ec849334ce47139a0136 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 23 Feb 2006 23:25:53 +0000 Subject: [PATCH] pull the signature page information from the database, instead of hardcoded --- register_participants_signature.php | 105 +++++++++++++++------------- 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/register_participants_signature.php b/register_participants_signature.php index 266a9c3..56d0993 100644 --- a/register_participants_signature.php +++ b/register_participants_signature.php @@ -109,67 +109,76 @@ $pdf->newPage(); $pdf->addText($topboxtext); $pdf->hr(); - $pdf->heading(i18n("Exhibitor Declaration")); - $studentbox="The following section is to be read and signed by the exhibitor$plural.\n\n". - ($plural?"We":"I")." certify that:\n". - " - The preparation of this project is mainly ".($plural?"our":"my")." own work\n". - " - ".($plural?"We":"I")." have read the rules and regulations and agree to abide by them\n". - " - ".($plural?"We":"I")." agree that the decision of the judges will be final\n"; - - $pdf->addText($studentbox); - - foreach($studentinfoarray AS $studentinfo) + $q=mysql_query("SELECT * FROM signaturepage WHERE name='exhibitordeclaration'"); + $r=mysql_fetch_object($q); + if($r->use) { - $pdf->vspace($height['sigspace']); + $pdf->heading(i18n("Exhibitor Declaration")); - //signature line - $pdf->hline(1,4.5); - //date line - $pdf->hline(5,7); - //go to next line - $pdf->nextLine(); + $studentbox=$r->text; +/* + $studentbox="The following section is to be read and signed by the exhibitor$plural.\n\n". + ($plural?"We":"I")." certify that:\n". + " - The preparation of this project is mainly ".($plural?"our":"my")." own work\n". + " - ".($plural?"We":"I")." have read the rules and regulations and agree to abide by them\n". + " - ".($plural?"We":"I")." agree that the decision of the judges will be final\n"; - //show their name - $pdf->addTextX(i18n("%1 %2 (signature)",array($studentinfo->firstname,$studentinfo->lastname)),1.25); - //show the Date text - $pdf->addTextX(i18n("Date"),5.25); +*/ + $pdf->addText($studentbox); - //go to next line - $pdf->nextLine(); + foreach($studentinfoarray AS $studentinfo) + { + $pdf->vspace($height['sigspace']); + + //signature line + $pdf->hline(1,4.5); + //date line + $pdf->hline(5,7); + //go to next line + $pdf->nextLine(); + + //show their name + $pdf->addTextX(i18n("%1 %2 (signature)",array($studentinfo->firstname,$studentinfo->lastname)),1.25); + //show the Date text + $pdf->addTextX(i18n("Date"),5.25); + + //go to next line + $pdf->nextLine(); + } + + $pdf->hr(); } - $pdf->hr(); - - //now for the parent/guardian signatures - $pdf->heading(i18n("Parent/Guardian Declaration")); - - $parentbox="The following is to be read and signed by the exhibitor$plural parent$plural/guardian$plural.\n\n". - " - As a parent/guardian I certify to the best of my knowledge and believe the information contained in this application is correct, and the project is the work of the student. I also understand that the material used in the project is the responsibility of the student and that neither the school, the teacher, nor the ".$config['fairname']." can be held responsible for loss, damage, or theft, however caused. I further understand that all exhibits entered must be left on display until the end of the Fair. If my son/daughter does not remove the exhibit at the end of the Fair, the ".$config['fairname']." or the owner of the exhibition hall cannot be responsible for the disposal of the exhibit.\n\n". - - " - If my son/daughter is awarded the honour of having his/her exhibit chosen for presentation at the Canada-Wide Science Fair, I consent to having him/her journey to the Fair, and will not hold the Fair responsible for any accident or mishap to the student or the exhibit.\n"; - - $pdf->addText($parentbox); - - - foreach($studentinfoarray AS $studentinfo) + $q=mysql_query("SELECT * FROM signaturepage WHERE name='parentdeclaration'"); + $r=mysql_fetch_object($q); + if($r->use) { - $pdf->vspace($height['sigspace']); + //now for the parent/guardian signatures + $pdf->heading(i18n("Parent/Guardian Declaration")); - //signature line - $pdf->hline(1,4.5); + $parentbox=$r->text; + $pdf->addText($parentbox); + + foreach($studentinfoarray AS $studentinfo) + { + $pdf->vspace($height['sigspace']); - //date line - $pdf->hline(5,7); - $pdf->nextLine(); + //signature line + $pdf->hline(1,4.5); - //show their name - $pdf->addTextX(i18n("Parent/Guardian of %1 %2 (signature)",array($studentinfo->firstname,$studentinfo->lastname)),1.25); + //date line + $pdf->hline(5,7); + $pdf->nextLine(); - //show the Date text - $pdf->addTextX(i18n("Date"),5.25); - $pdf->nextLine(); + //show their name + $pdf->addTextX(i18n("Parent/Guardian of %1 %2 (signature)",array($studentinfo->firstname,$studentinfo->lastname)),1.25); + //show the Date text + $pdf->addTextX(i18n("Date"),5.25); + $pdf->nextLine(); + + } }