forked from science-ation/science-ation
Add a footer to the form, change line widths for all lines
This commit is contained in:
parent
30ff0c29ad
commit
4477a9412c
@ -49,18 +49,20 @@ echo mysql_error();
|
|||||||
pdf_set_info($pdf,"Title","SFIAB - Participant Signature Page");
|
pdf_set_info($pdf,"Title","SFIAB - Participant Signature Page");
|
||||||
pdf_set_info($pdf,"Subject","Signature Form");
|
pdf_set_info($pdf,"Subject","Signature Form");
|
||||||
|
|
||||||
|
pdf_setlinewidth($pdf,0.3);
|
||||||
|
|
||||||
//The title of the fair
|
//The title of the fair
|
||||||
$yloc=10;
|
$yloc=10.25;
|
||||||
$height['title']=0.25;
|
$height['title']=0.25;
|
||||||
$height['subtitle']=0.22;
|
$height['subtitle']=0.22;
|
||||||
$height['topbox']=0.8;
|
$height['topbox']=0.8;
|
||||||
$height['exhibitortitle']=0.2;
|
$height['exhibitortitle']=0.2;
|
||||||
$height['exhibitorbox']=1.1;
|
$height['exhibitorbox']=1.3;
|
||||||
$height['exhibitorsigspace']=0.30;
|
$height['exhibitorsigspace']=0.40;
|
||||||
$height['exhibitorsigtext']=0.13;
|
$height['exhibitorsigtext']=0.13;
|
||||||
$height['parenttitle']=0.2;
|
$height['parenttitle']=0.2;
|
||||||
$height['parentbox']=2.5;
|
$height['parentbox']=3;
|
||||||
$height['parentsigspace']=0.30;
|
$height['parentsigspace']=0.40;
|
||||||
$height['parentsigtext']=0.13;
|
$height['parentsigtext']=0.13;
|
||||||
|
|
||||||
pdf_setfont($pdf,$arial,18);
|
pdf_setfont($pdf,$arial,18);
|
||||||
@ -104,7 +106,7 @@ echo mysql_error();
|
|||||||
pdf_set_value($pdf,"leading",15);
|
pdf_set_value($pdf,"leading",15);
|
||||||
|
|
||||||
$yloc-=$height['topbox'];
|
$yloc-=$height['topbox'];
|
||||||
pdf_show_boxed($pdf,$topboxtext, loc(0.5),loc($yloc),loc(7.5),loc($height['topbox']),"left",null);
|
pdf_show_boxed($pdf,$topboxtext, loc(0.75),loc($yloc),loc(7),loc($height['topbox']),"left",null);
|
||||||
|
|
||||||
pdf_moveto($pdf,loc(0.5),loc($yloc));
|
pdf_moveto($pdf,loc(0.5),loc($yloc));
|
||||||
pdf_lineto($pdf,loc(8),loc($yloc));
|
pdf_lineto($pdf,loc(8),loc($yloc));
|
||||||
@ -118,14 +120,14 @@ echo mysql_error();
|
|||||||
pdf_setfont($pdf,$arial,11);
|
pdf_setfont($pdf,$arial,11);
|
||||||
pdf_set_value($pdf,"leading",15);
|
pdf_set_value($pdf,"leading",15);
|
||||||
|
|
||||||
$studentbox="The following section is to be read and signed by the exhibitor$plural\n".
|
$studentbox="The following section is to be read and signed by the exhibitor$plural\n\n".
|
||||||
"I certify that:\n".
|
($plural?"We":"I")." certify that:\n".
|
||||||
" - The preparation of this project is mainly my/our work\n".
|
" - The preparation of this project is mainly ".($plural?"our":"my")." own work\n".
|
||||||
" - I have read the rules and regulations and agree to abide by them\n".
|
" - ".($plural?"We":"I")." have read the rules and regulations and agree to abide by them\n".
|
||||||
" - I agree that the decision of the judges will be final\n";
|
" - ".($plural?"We":"I")." agree that the decision of the judges will be final\n";
|
||||||
|
|
||||||
$yloc-=$height['exhibitorbox'];
|
$yloc-=$height['exhibitorbox'];
|
||||||
pdf_show_boxed($pdf,$studentbox, loc(0.5),loc($yloc),loc(7.5),loc($height['exhibitorbox']),"left",null);
|
pdf_show_boxed($pdf,$studentbox, loc(0.75),loc($yloc),loc(7),loc($height['exhibitorbox']),"left",null);
|
||||||
|
|
||||||
foreach($studentinfoarray AS $studentinfo)
|
foreach($studentinfoarray AS $studentinfo)
|
||||||
{
|
{
|
||||||
@ -163,13 +165,13 @@ echo mysql_error();
|
|||||||
pdf_setfont($pdf,$arial,11);
|
pdf_setfont($pdf,$arial,11);
|
||||||
pdf_set_value($pdf,"leading",15);
|
pdf_set_value($pdf,"leading",15);
|
||||||
|
|
||||||
$parentbox="The following is to be read and signed by the exhibitor$plural parent$plural/guardian$plural.\n".
|
$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".
|
" - 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";
|
" - 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";
|
||||||
|
|
||||||
$yloc-=$height['parentbox'];
|
$yloc-=$height['parentbox'];
|
||||||
pdf_show_boxed($pdf,$parentbox, loc(0.5),loc($yloc),loc(7.5),loc($height['parentbox']),"left",null);
|
pdf_show_boxed($pdf,$parentbox, loc(0.75),loc($yloc),loc(7.0),loc($height['parentbox']),"left",null);
|
||||||
|
|
||||||
|
|
||||||
foreach($studentinfoarray AS $studentinfo)
|
foreach($studentinfoarray AS $studentinfo)
|
||||||
@ -195,6 +197,17 @@ echo mysql_error();
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//now put a nice little footer at the bottom
|
||||||
|
$footertext="Reg Num: ".$_SESSION['registration_number']." - Generated: ".date("Y-m-d h:i:sa")." - ".$config['fairname']." - ".$config['FAIRYEAR'];
|
||||||
|
$footerwidth=pdf_stringwidth($pdf,$footertext,$arial,9);
|
||||||
|
pdf_setfont($pdf,$arial,9);
|
||||||
|
pdf_show_xy($pdf,$footertext,loc(4.25)-$footerwidth/2,loc(0.5));
|
||||||
|
|
||||||
|
//footer line
|
||||||
|
pdf_moveto($pdf,loc(0.5),loc(0.7));
|
||||||
|
pdf_lineto($pdf,loc(8.0),loc(0.7));
|
||||||
|
pdf_stroke($pdf);
|
||||||
|
|
||||||
pdf_end_page($pdf);
|
pdf_end_page($pdf);
|
||||||
pdf_close($pdf);
|
pdf_close($pdf);
|
||||||
$pdfdata=pdf_get_buffer($pdf);
|
$pdfdata=pdf_get_buffer($pdf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user