id'"); if(mysql_error()) echo error(i18n("An Error occured trying to save the school information")); else echo happy(i18n("School information successfully updated")); //and reselect it $q=mysql_query("SELECT * FROM schools WHERE id='".$_SESSION['schoolid']."' AND accesscode='".$_SESSION['schoolaccesscode']."' AND year='".$config['FAIRYEAR']."'"); echo mysql_error(); $school=mysql_fetch_object($q); } /* if($_POST['action']=="numbers") { mysql_query("UPDATE schools SET junior='".$_POST['junior']."', intermediate='".$_POST['intermediate']."', senior='".$_POST['senior']."' WHERE id='$school->id'"); echo mysql_error(); $q=mysql_query("SELECT * FROM schools WHERE id='".$_SESSION['schoolid']."' AND accesscode='".$_SESSION['schoolaccesscode']."'"); echo "Participation Information Successfully Updated
\n"; $school=mysql_fetch_object($q); } */ if($_POST['action']=="feedback") { $body=""; $body.=$_SERVER['REMOTE_ADDR']." (".$_SERVER['REMOTE_HOST'].")\n"; $body.=date("r")."\n"; $body.="School ID: $school->id\n"; $body.="School Name: $school->school\n"; $body.="Feedback:\n".$_POST['feedbacktext']."\n"; echo "mailing ".$config['fairmanageremail']; mail($config['fairmanageremail'],"School Feedback",$body,"From: webpage@".$_SERVER['SERVER_NAME']); echo happy(i18n("Thanks for your feedback!")); } if($_POST['action']=="invite") { if($_POST['firstname'] && $_POST['lastname'] && $_POST['email']) { $regnum=0; //now create the new registration record, and assign a random/unique registration number to then. do { //random number between //100000 and 999999 (six digit integer) $regnum=rand(100000,999999); $q=mysql_query("SELECT * FROM registrations WHERE num='$regnum' AND year=".$config['FAIRYEAR']); }while(mysql_num_rows($q)>0); //actually insert it mysql_query("INSERT INTO registrations (num,email,start,status,year) VALUES (". "'$regnum',". "'".$_POST['email']."',". "NOW(),". "'open',". $config['FAIRYEAR']. ")"); $regid=mysql_insert_id(); mysql_query("INSERT INTO students (registrations_id,email,firstname,lastname,schools_id,year) VALUES ( '$regid', '".mysql_escape_string($_POST['email'])."', '".mysql_escape_string($_POST['firstname'])."', '".mysql_escape_string($_POST['lastname'])."', '".mysql_escape_string($_SESSION['schoolid'])."', '".$config['FAIRYEAR']."')"); email_send("new_participant",$_POST['email'],array("FAIRNAME"=>i18n($config['fairname'])),array("REGNUM"=>"$regnum")); echo happy(i18n("The participant has been successfully invited")); } } echo "

$school->school

"; echo "

School Information

"; echo "Please make sure your school contact information is correct, make any necessary changes:"; echo "
"; echo ""; echo ""; echo ""; // echo ""; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
School Nameschool\" type=text name=school size=40>
Registration Passwordregistration_password\" type=text name=\"registration_password\" size=\"20\">
Addressaddress\" type=text name=address size=40>
Citycity\" type=text name=city size=30>
".i18n("Province").""; emit_province_selector("province_code",$school->province_code); echo "
Postalcodepostalcode\" type=text name=postalcode size=10>
Phone Numberphone\" type=text name=phone size=30>
Fax Numberfax\" type=text name=fax size=30>
Science Teachersciencehead\" type=text name=sciencehead size=40>
Science Teacher Emailscienceheademail\" type=text name=scienceheademail size=40>
Science Teacher Phone
(If different than above)
scienceheadphone\" type=text name=scienceheadphone size=30>
"; echo ""; echo "
"; echo "
"; if($config['participant_registration_type']=="schoolpassword") { echo "

".i18n("Participant Registration Password")."

"; echo i18n("In order for your school's students to register for the fair, they will need to know your specific school registration password"); echo "
"; echo "
"; echo i18n("Registration Password: %1",array($school->registration_password)); echo "
"; echo "
"; } else if($config['participant_registration_type']=="invite") { $q=mysql_query("SELECT (NOW()>'".$config['dates']['regopen']."' AND NOW()<'".$config['dates']['regclose']."') AS datecheck"); $datecheck=mysql_fetch_object($q); if($datecheck!=0) { echo "

".i18n("Participant Registration Invitations")."

"; echo i18n("In order for your school's students to register for the fair, you will need to invite them to register. Simply enter their email address below to invite them to register. Important: for group projects, only add one of the participants, that participant will then add the other group member(s) to the project"); echo "
"; echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
".i18n("Email Address")."
".i18n("First Name")."
".i18n("Last Name")."
"; echo ""; echo "
"; } echo "
"; echo "

".i18n("Invited participants from your school")."

"; $q=mysql_query("SELECT * FROM students WHERE schools_id='".$school->id."' AND year='".$config['FAIRYEAR']."' ORDER BY lastname,firstname"); echo ""; echo ""; while($r=mysql_fetch_object($q)) { echo ""; } echo "
".i18n("Last Name")."".i18n("First Name")."".i18n("Email Address")."
$r->lastname$r->firstname$r->email
"; } /* //the participation section needs to be updated to handle the age categories as specified //in the categories table and the numbers from configuration, for now, lets just not do it. //this code is copied from the ORSF schoolaccess page, thats why its here, but just commented out. echo "

Participation Information

"; echo "Please select the number of projects you anticipate on sending to the fair in each of the age categories"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Junior (Grades 7-8)"; echo ""; echo "
Intermediate (Grades 9-10)"; echo ""; echo "
Senior (Grades 11-12)"; echo ""; echo "
"; echo ""; echo "
Please note, these numbers are only an estimate to help us plan the fair. Choosing small numbers here in no way limits your actual participation.
\n"; echo "
"; */ echo "
"; echo "

School Feedback / Questions

"; echo "
"; echo ""; echo "We are always welcome to any feedback (both positive and constructive crisicism!), or any questions you may have. Please use the following box to communicate with us!"; echo "

"; echo ""; echo "
"; } else { echo "Invalid School ID or Access Code (2)"; } } else { if($errormsg) echo "$errormsg"; echo "
\n"; echo i18n("Welcome to the School Access Page. This page allows your school to provide several key pieces of information for the fair, as well as feedback about the schools experience with/at the fair."); echo "

\n"; echo i18n("Please login below by selecting your school and entering your school Access Code that you received in your package"); ?>

:
:
">