diff --git a/register_participants_main.php b/register_participants_main.php index 1c2f35f..ef88787 100644 --- a/register_participants_main.php +++ b/register_participants_main.php @@ -53,49 +53,53 @@ echo i18n("Student Information"); echo ""; echo ""; //check to see if its complete -$status=studentStatus(); -echo outputStatus($status); +$statusstudent=studentStatus(); +echo outputStatus($statusstudent); echo ""; //project information - project requires students, so only show the link if the students is complete echo ""; -if($status=="complete") +if($statusstudent=="complete") echo ""; echo i18n("Project Information"); -if($status=="complete") +if($statusstudent=="complete") echo ""; echo ""; //check to see if its complete -$status=projectStatus(); -echo outputStatus($status); +$statusproject=projectStatus(); +echo outputStatus($statusproject); echo ""; //mentor information echo ""; echo ""; echo i18n("Mentor Information"); -if($status=="complete") - echo ""; +echo ""; echo ""; //check to see if its complete -$status=mentorStatus(); -echo outputStatus($status); +$statusmentor=mentorStatus(); +echo outputStatus($statusmentor); echo ""; //safety information echo ""; echo ""; echo i18n("Safety Information"); -if($status=="complete") - echo ""; +echo ""; echo ""; //check to see if its complete -$status=safetyStatus(); -echo outputStatus($status); +$statussafety=safetyStatus(); +echo outputStatus($statussafety); echo ""; //signature page -echo "".i18n("Signature Page").""; +echo ""; +if($statusstudent=="complete" && $statusproject=="complete" && $statusmentor=="complete" && $statussafety=="complete") + echo ""; +echo i18n("Signature Page"); +if($statusstudent=="complete" && $statusproject=="complete" && $statusmentor=="complete" && $statussafety=="complete") + echo ""; +echo ""; //check to see if its complete echo ""; diff --git a/register_participants_signature.php b/register_participants_signature.php new file mode 100644 index 0000000..2819a18 --- /dev/null +++ b/register_participants_signature.php @@ -0,0 +1,205 @@ +title\n"; + if(count($studentinfoarray)>1) + $plural="s"; + else + $plural=""; + + $topboxtext.="Exhibitor$plural: "; + foreach($studentinfoarray AS $studentinfo) + { + $topboxtext.="$studentinfo->firstname $studentinfo->lastname, "; + } + //strip off the last comma + $topboxtext=substr($topboxtext,0,-2); + //add the newline + $topboxtext.="\n"; + + pdf_setfont($pdf,$arial,11); + pdf_set_value($pdf,"leading",15); + + $yloc-=$height['topbox']; + pdf_show_boxed($pdf,$topboxtext, loc(0.5),loc($yloc),loc(7.5),loc($height['topbox']),"left",null); + + pdf_moveto($pdf,loc(0.5),loc($yloc)); + pdf_lineto($pdf,loc(8),loc($yloc)); + pdf_stroke($pdf); + + + pdf_setfont($pdf,$arial,12); + $yloc-=$height['exhibitortitle']; + pdf_show_xy($pdf,"Exhibitor Declaration",loc(0.5),loc($yloc)); + + pdf_setfont($pdf,$arial,11); + pdf_set_value($pdf,"leading",15); + + $studentbox="The following section is to be read and signed by the exhibitor$plural\n". + "I certify that:\n". + " - The preparation of this project is mainly my/our work\n". + " - 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"; + + $yloc-=$height['exhibitorbox']; + pdf_show_boxed($pdf,$studentbox, loc(0.5),loc($yloc),loc(7.5),loc($height['exhibitorbox']),"left",null); + + foreach($studentinfoarray AS $studentinfo) + { + $yloc-=$height['exhibitorsigspace']; + //signature line + pdf_moveto($pdf,loc(1),loc($yloc)); + pdf_lineto($pdf,loc(4.5),loc($yloc)); + pdf_stroke($pdf); + + //date line + pdf_moveto($pdf,loc(5),loc($yloc)); + pdf_lineto($pdf,loc(7),loc($yloc)); + pdf_stroke($pdf); + + $yloc-=$height['exhibitorsigtext']; + //show their name + pdf_show_xy($pdf,"$studentinfo->firstname $studentinfo->lastname (signature)",loc(1.25),loc($yloc)); + + //show the Date text + pdf_show_xy($pdf,"Date",loc(5.25),loc($yloc)); + + } + + $yloc-=3*$height['exhibitorsigtext']; + pdf_moveto($pdf,loc(0.5),loc($yloc)); + pdf_lineto($pdf,loc(8),loc($yloc)); + pdf_stroke($pdf); + + + //now for the parent/guardian signatures + pdf_setfont($pdf,$arial,12); + $yloc-=$height['parenttitle']; + pdf_show_xy($pdf,"Parent/Guardian Declaration",loc(0.5),loc($yloc)); + + pdf_setfont($pdf,$arial,11); + pdf_set_value($pdf,"leading",15); + + $parentbox="The following is to be read and signed by the exhibitor$plural parent$plural/guardian$plural.\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"; + + $yloc-=$height['parentbox']; + pdf_show_boxed($pdf,$parentbox, loc(0.5),loc($yloc),loc(7.5),loc($height['parentbox']),"left",null); + + + foreach($studentinfoarray AS $studentinfo) + { + $yloc-=$height['parentsigspace']; + //signature line + pdf_moveto($pdf,loc(1),loc($yloc)); + pdf_lineto($pdf,loc(4.5),loc($yloc)); + pdf_stroke($pdf); + + //date line + pdf_moveto($pdf,loc(5),loc($yloc)); + pdf_lineto($pdf,loc(7),loc($yloc)); + pdf_stroke($pdf); + + $yloc-=$height['parentsigtext']; + //show their name + pdf_show_xy($pdf,"Parent/Guardian of $studentinfo->firstname $studentinfo->lastname (signature)",loc(1.25),loc($yloc)); + + //show the Date text + pdf_show_xy($pdf,"Date",loc(5.25),loc($yloc)); + + } + + + pdf_end_page($pdf); + pdf_close($pdf); + $pdfdata=pdf_get_buffer($pdf); + header("Content-type: application/pdf"); + header("Content-disposition: inline; filename=sfiab_sig_".$_SESSION['registration_id'].".pdf"); + header("Content-length: ".strlen($pdfdata)); + echo $pdfdata; +?>