Copyright (C) 2005 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> firstname) { echo i18n("Hello %1",array($r->firstname)); echo "
"; } echo "
"; if(registrationFormsReceived()) { //now select their project number $q=mysql_query("SELECT projectnumber FROM projects WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'"); $projectinfo=mysql_fetch_object($q); if($r->status=="complete") { echo i18n("Congratulations, You are successfully registered for the %1. No further changes may be made to any of your forms.",array($config['fairname'])); } else if($r->status=="paymentpending") { echo i18n("We have received your forms but are missing your registration fee. You are NOT registered for the fair until your registration fee has been received"); } echo "
"; echo i18n("Your project number is:"); echo "  $projectinfo->projectnumber"; } else { echo i18n("Please use the checklist below to complete your registration. Click on an item in the table to edit that information. When you have entered all information, the Status field will change to Complete"); } echo "
"; echo "
"; echo ""; echo ""; echo "
"; echo ""; echo ""; //participant information echo ""; //participant emergency contact information echo ""; //project information - project requires students, so only show the link if the students is complete echo ""; if($config['participant_mentor']=="yes") { //mentor information echo ""; } else { //if mentorship isnt required, then assume its complete so the checks below will still work properly $statusmentor="complete"; } //safety information echo ""; if($config['tours_enable']=="yes") { echo ""; } else { $statustour = "complete"; } //FIXME: this should be a global detection so we can use the results elsewhere, especially for all the reports! if(function_exists("pdf_new")) $sigfile="register_participants_signature.php"; else if(file_exists("tcpdf/tcpdf.php")) $sigfile="register_participants_signature_tcpdf.php"; else $sigfile=""; //signature page echo ""; //received information echo ""; echo "
".i18n("Registration Item")."".i18n("Status")."
"; echo ""; echo i18n("Student Information"); echo ""; echo ""; //check to see if its complete $statusstudent=studentStatus(); echo outputStatus($statusstudent); echo "
"; if($statusstudent=="complete") echo ""; echo i18n("Emergency Contact Information"); if($statusstudent=="complete") echo ""; echo ""; //check to see if its complete $statusemergencycontact=emergencycontactStatus(); echo outputStatus($statusemergencycontact); echo "
"; if($statusstudent=="complete") echo ""; echo i18n("Project Information"); if($statusstudent=="complete") echo ""; echo ""; //check to see if its complete $statusproject=projectStatus(); echo outputStatus($statusproject); echo "
"; echo ""; echo i18n("Mentor Information"); echo ""; echo ""; //check to see if its complete $statusmentor=mentorStatus(); echo outputStatus($statusmentor); echo "
"; echo ""; echo i18n("Safety Information"); echo ""; echo ""; //check to see if its complete $statussafety=safetyStatus(); echo outputStatus($statussafety); echo "
"; echo ""; echo i18n("Tour Selection"); echo ""; echo ""; //check to see if its complete $statustour=tourStatus(); echo outputStatus($statustour); echo "
"; if($statusstudent=="complete" && $statusproject=="complete" && $statusmentor=="complete" && $statussafety=="complete" && $statusemergencycontact=="complete" && $statustour=="complete") { if($sigfile) echo ""; else echo error(i18n("No PDF generation library detected"),true); } echo i18n("Signature Page"); if($statusstudent=="complete" && $statusproject=="complete" && $statusmentor=="complete" && $statussafety=="complete" && $statusemergencycontact=="complete" && $statustour=="complete") echo ""; else echo "
(".i18n("Available when ALL above sections are \"Complete\"").")"; echo "
"; echo i18n("Print"); //check to see if its complete echo "
".i18n("Signature Page Received").""; if(registrationFormsReceived()) echo outputStatus("complete"); else echo outputStatus("incomplete"); //check to see if its complete echo "
" ; echo "
"; if($config['specialawardnomination']!="none") { echo ""; echo ""; $sp_proj_ok = true; if($statusstudent =="incomplete" || $statusproject == "incomplete") { $sp_proj_ok = false; } $special_awards_open = false; if($config['specialawardnomination_aftersignatures']=="no") { $special_awards_open = true; } else { $special_awards_open = (registrationFormsReceived()) ? true : false; } if($special_awards_open == true) { if($config['specialawardnomination']=="date") { $q=mysql_query("SELECT (NOW()>'".$config['dates']['specawardregopen']."' AND NOW()<'".$config['dates']['specawardregclose']."') AS datecheck"); $r=mysql_fetch_object($q); //this will return 1 if its between the dates, 0 otherwise. if($r->datecheck==1) { echo ""; } else { echo ""; } } else if($config['specialawardnomination']=="registration") { if($sp_proj_ok == false) { echo ""; } else { echo ""; } } $q=mysql_query("SELECT * FROM projects WHERE registrations_id='".$_SESSION['registration_id']."'"); $project=mysql_fetch_object($q); $nominatedawards=getSpecialAwardsNominatedForProject($project->id); $num=count($nominatedawards); $noawards=getNominatedForNoSpecialAwardsForProject($project->id); echo ""; echo ""; } else { echo ""; } echo "
".i18n("Special Award Nominations")."
".i18n("Self-nominate for special awards")."
".error(i18n("Special award self-nomination is only available from %1 to %2",array($config['dates']['specawardregopen'],$config['dates']['specawardregclose'])),"inline")."
(".i18n("Available when your Student Information and Project Information is \"Complete\"").")
".i18n("Self-nominate for special awards")."
"; if($num) { echo happy(i18n("You are nominated for %1 awards",array($num)),"inline"); echo "
"; $c=1; foreach($nominatedawards AS $na) { echo $c.". ".$na['name']."
"; $c++; } } else if($noawards == true) { echo happy(i18n("You are nominated for 0 awards"),"inline"); } else { echo error(i18n("You are nominated for 0 awards"),"inline"); } echo "
".error(i18n("We must receive your signature form before you can nominate yourself for special awards"))."
"; } echo "
"; echo "

"; function regfee_line($item, $unit, $qty, $tot, $extra) { echo "".i18n($item).""; echo "($".sprintf("%.02f", $unit).""; echo "* $qty)"; echo "$".sprintf("%.02f", $tot).""; echo "".i18n($extra).""; echo ""; } if($config['regfee_show_info'] == 'yes') { echo "

".i18n("Registration Fee Information")."

"; $regfee = 0; $q=mysql_query("SELECT * FROM students WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'"); $n_students = mysql_num_rows($q); $n_tshirts = 0; while($s = mysql_fetch_object($q)) { if($s->tshirt != 'none') $n_tshirts++; } echo ""; if($config['regfee_per'] == 'student') { $f = $config['regfee'] * $n_students; regfee_line("Fair Registration (per student)", $config['regfee'], $n_students, $f, ''); $regfee += $f; } else { regfee_line("Fair Registration (per project)", $config['regfee'], 1, $config['regfee'], ''); $regfee += $config['regfee']; } $extra_after = ""; if($config['participant_student_tshirt'] == 'yes') { $tsc = floatval($config['participant_student_tshirt_cost']); if($tsc != 0.0) { $f = $n_tshirts * $tsc; $regfee += $f; if($n_tshirts != 0) { $ex = "*"; $extra_after = "* If you do not wish to order a T-Shirt, please select your T-Shirt size as 'None' on the Student Information Page"; regfee_line("T-Shirts", $tsc, $n_tshirts, $f, $ex); } } } echo ""; echo "
".i18n("Total (including all taxes)")."$".sprintf("%.02f", $regfee)."

"; echo i18n($extra_after); echo "
"; echo "
"; echo "
"; } echo "

".i18n("Registration Instructions")."

"; //now get the text of special instructions for the bottom of this page: output_page_text("register_participants_main_instructions"); echo "

"; echo "".i18n("Logout").""; send_footer(); ?>