";
- echo "\n";
- echo " ".i18n("First Name")." firstname\" />".REQUIREDFIELD." \n";
- echo " ".i18n("Last Name")." lastname\" />".REQUIREDFIELD." \n";
- echo " \n";
+ echo "\n";
-if($config['participant_student_personal']=="yes")
-{
- echo "\n";
- echo " ".i18n("Gender")." ";
- echo "";
- echo "".i18n("Select")." \n";
- if($studentinfo->sex=="male") $sel="selected=\"selected\""; else $sel="";
- echo "".i18n("Male")." \n";
- if($studentinfo->sex=="female") $sel="selected=\"selected\""; else $sel="";
- echo "".i18n("Female")." \n";
- echo " ".REQUIREDFIELD;
-}
- echo " \n";
- echo " \n";
- echo " \n";
+ if($config['participant_student_personal']=="yes")
+ {
+ echo "\n";
+ echo " ".i18n("Address")." address\" />".REQUIREDFIELD." \n";
+ echo " ".i18n($config['provincestate'])." ";
+ emit_province_selector("province[$x]",$studentinfo->province);
+ echo REQUIREDFIELD." \n";
+ echo " \n";
+ echo "\n";
+ echo " ".i18n($config['postalzip'])." postalcode\" />".REQUIREDFIELD." \n";
+ echo " ".i18n("Phone")." phone\" />".REQUIREDFIELD." \n";
+ echo " \n";
- echo "\n";
- echo " ".i18n("Email Address")." email\" />".REQUIREDFIELD." \n";
+ echo " \n";
+ echo " ".i18n("Date of Birth")." \n";
+ list($year,$month,$day)=split("-",$studentinfo->dateofbirth);
+ echo "";
+ emit_day_selector("day[$x]",$day);
+ echo " \n";
+ emit_month_selector("month[$x]",$month);
+ echo " \n";
-if($config['participant_student_personal']=="yes")
-{
- echo " ".i18n("City")." city\" />".REQUIREDFIELD." \n";
-}
-else
-{
- echo " ";
-}
-
- echo " \n";
-
-if($config['participant_student_personal']=="yes")
-{
- echo "\n";
- echo " ".i18n("Address")." address\" />".REQUIREDFIELD." \n";
- echo " ".i18n($config['provincestate'])." ";
- emit_province_selector("province[$x]",$studentinfo->province);
- echo REQUIREDFIELD." \n";
- echo " \n";
- echo "\n";
- echo " ".i18n($config['postalzip'])." postalcode\" />".REQUIREDFIELD." \n";
- echo " ".i18n("Phone")." phone\" />".REQUIREDFIELD." \n";
- echo " \n";
-
- echo "\n";
- echo " ".i18n("Date of Birth")." \n";
- list($year,$month,$day)=split("-",$studentinfo->dateofbirth);
- echo "";
- emit_day_selector("day[$x]",$day);
- echo " \n";
- emit_month_selector("month[$x]",$month);
- echo " \n";
-
- //the year selector should be based on the min/max grades possible
- //assume min age of 3 for grade=0 (kindergarden)
- //assume max age of 18 for grade=12
- $minyearselect=$config['FAIRYEAR'] - 6 - $config['maxgrade'];
- $maxyearselect=$config['FAIRYEAR'] - 3 - $config['mingrade'];
+ //the year selector should be based on the min/max grades possible
+ //assume min age of 3 for grade=0 (kindergarden)
+ //assume max age of 18 for grade=12
+ $minyearselect=$config['FAIRYEAR'] - 6 - $config['maxgrade'];
+ $maxyearselect=$config['FAIRYEAR'] - 3 - $config['mingrade'];
emit_year_selector("year[$x]",$year,$minyearselect,$maxyearselect);
- echo " ".REQUIREDFIELD."
\n";
- echo " \n";
-}
-else
- echo " ";
+ echo "".REQUIREDFIELD."
\n";
+ echo " \n";
+ }
+ else
+ echo " ";
- echo " ".i18n("Grade")." \n";
+ echo " ".i18n("Grade")." \n";
echo "\n";
echo "".i18n("Grade")." \n";
@@ -279,106 +276,106 @@ else
}
echo " \n";
- echo REQUIREDFIELD." ";
- echo " ";
-
- if($config['participant_student_tshirt']=="yes")
- {
- echo "\n";
- echo " ".i18n("T-Shirt Size")." ";
- echo " \n";
- if($studentinfo->tshirt=="none") $sel="selected=\"selected\""; else $sel="";
- echo " ".i18n("None")." ";
- if($studentinfo->tshirt=="small") $sel="selected=\"selected\""; else $sel="";
- echo " ".i18n("Small")." ";
- if($studentinfo->tshirt=="medium") $sel="selected=\"selected\""; else $sel="";
- echo " ".i18n("Medium")." ";
- if($studentinfo->tshirt=="large") $sel="selected=\"selected\""; else $sel="";
- echo " ".i18n("Large")." ";
- if($studentinfo->tshirt=="xlarge") $sel="selected=\"selected\""; else $sel="";
- echo " ".i18n("X-Large")." ";
- echo " ";
- echo " \n";
+ echo REQUIREDFIELD."";
echo " ";
- }
-if($config['participant_student_personal']=="yes")
-{
- echo "\n";
- echo "".i18n("Medical Alert Info")." ";
- echo " medicalalert\" />";
- echo " ";
- echo " \n";
-}
-
- if($config['participant_student_foodreq']=="yes")
- {
- echo "\n";
- echo "".i18n("Special Food Requirements")." ";
- echo " foodreq\" />";
- echo " ";
- echo " \n";
- }
-
- echo "\n";
- echo " ".i18n("School")." ";
- if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || ($studentinfo && !$studentinfo->schools_id) )
- {
- $schoolq=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by city,school");
- echo "\n";
- echo "".i18n("Choose School")." \n";
- while($r=mysql_fetch_object($schoolq))
+ if($config['participant_student_tshirt']=="yes")
{
- if($studentinfo->schools_id==$r->id) $sel="selected=\"selected\""; else $sel="";
- echo "id\">".htmlspecialchars($r->city).' - '.htmlspecialchars($r->school)." \n";
-
+ echo "\n";
+ echo " ".i18n("T-Shirt Size")." ";
+ echo " \n";
+ if($studentinfo->tshirt=="none") $sel="selected=\"selected\""; else $sel="";
+ echo " ".i18n("None")." ";
+ if($studentinfo->tshirt=="small") $sel="selected=\"selected\""; else $sel="";
+ echo " ".i18n("Small")." ";
+ if($studentinfo->tshirt=="medium") $sel="selected=\"selected\""; else $sel="";
+ echo " ".i18n("Medium")." ";
+ if($studentinfo->tshirt=="large") $sel="selected=\"selected\""; else $sel="";
+ echo " ".i18n("Large")." ";
+ if($studentinfo->tshirt=="xlarge") $sel="selected=\"selected\""; else $sel="";
+ echo " ".i18n("X-Large")." ";
+ echo " ";
+ echo " \n";
+ echo " ";
}
- echo " ".REQUIREDFIELD;
+
+ if($config['participant_student_personal']=="yes")
+ {
+ echo " \n";
+ echo "".i18n("Medical Alert Info")." ";
+ echo " medicalalert\" />";
+ echo " ";
+ echo " \n";
+ }
+
+ if($config['participant_student_foodreq']=="yes")
+ {
+ echo "\n";
+ echo "".i18n("Special Food Requirements")." ";
+ echo " foodreq\" />";
+ echo " ";
+ echo " \n";
+ }
+
+ echo "\n";
+ echo " ".i18n("School")." ";
+ if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || ($studentinfo && !$studentinfo->schools_id) )
+ {
+ $schoolq=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by city,school");
+ echo "\n";
+ echo "".i18n("Choose School")." \n";
+ while($r=mysql_fetch_object($schoolq))
+ {
+ if($studentinfo->schools_id==$r->id) $sel="selected=\"selected\""; else $sel="";
+ echo "id\">".htmlspecialchars($r->city).' - '.htmlspecialchars($r->school)." \n";
+
+ }
+ echo " ".REQUIREDFIELD;
+ }
+ else
+ {
+ $schoolq=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."' AND id='$studentinfo->schools_id'");
+ $r=mysql_fetch_object($schoolq);
+ echo $r->school;
+ }
+
+ echo " \n";
+ echo " \n";
+
+ echo "\n";
+ echo " ".i18n("Teacher Name")." teachername\" /> \n";
+ echo " ".i18n("Teacher Email")." teacheremail\" /> \n";
+ echo " \n";
+
+
+
+
+ echo "
";
+
+ if($numfound>$config['minstudentsperproject'] && $studentinfo->id)
+ {
+ /* Create a hidden with same id as the button and some extra, so we can find it inside
+ * the button even with: this.id"+_studebts_id" */
+ echo "