pull the signature page information from the database, instead of hardcoded

This commit is contained in:
james 2006-02-23 23:25:53 +00:00
parent 45b4f7b220
commit caa1f593af

View File

@ -109,67 +109,76 @@ $pdf->newPage();
$pdf->addText($topboxtext); $pdf->addText($topboxtext);
$pdf->hr(); $pdf->hr();
$pdf->heading(i18n("Exhibitor Declaration"));
$studentbox="The following section is to be read and signed by the exhibitor$plural.\n\n". $q=mysql_query("SELECT * FROM signaturepage WHERE name='exhibitordeclaration'");
($plural?"We":"I")." certify that:\n". $r=mysql_fetch_object($q);
" - The preparation of this project is mainly ".($plural?"our":"my")." own work\n". if($r->use)
" - ".($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)
{ {
$pdf->vspace($height['sigspace']); $pdf->heading(i18n("Exhibitor Declaration"));
//signature line $studentbox=$r->text;
$pdf->hline(1,4.5); /*
//date line $studentbox="The following section is to be read and signed by the exhibitor$plural.\n\n".
$pdf->hline(5,7); ($plural?"We":"I")." certify that:\n".
//go to next line " - The preparation of this project is mainly ".($plural?"our":"my")." own work\n".
$pdf->nextLine(); " - ".($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); $pdf->addText($studentbox);
//show the Date text
$pdf->addTextX(i18n("Date"),5.25);
//go to next line foreach($studentinfoarray AS $studentinfo)
$pdf->nextLine(); {
$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(); $q=mysql_query("SELECT * FROM signaturepage WHERE name='parentdeclaration'");
$r=mysql_fetch_object($q);
//now for the parent/guardian signatures if($r->use)
$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)
{ {
$pdf->vspace($height['sigspace']); //now for the parent/guardian signatures
$pdf->heading(i18n("Parent/Guardian Declaration"));
//signature line $parentbox=$r->text;
$pdf->hline(1,4.5); $pdf->addText($parentbox);
//date line foreach($studentinfoarray AS $studentinfo)
$pdf->hline(5,7); {
$pdf->nextLine(); $pdf->vspace($height['sigspace']);
//show their name //signature line
$pdf->addTextX(i18n("Parent/Guardian of %1 %2 (signature)",array($studentinfo->firstname,$studentinfo->lastname)),1.25); $pdf->hline(1,4.5);
//show the Date text //date line
$pdf->addTextX(i18n("Date"),5.25); $pdf->hline(5,7);
$pdf->nextLine(); $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();
}
} }