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. */ ?> id' AND year='{$config['FAIRYEAR']}'"); } $notice = 'makeaccess'; } if($_GET['action']=="edit" || $_GET['action']=="add") { send_header(($_GET['action']=='edit') ? "Edit School" : "Add New School", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php', 'School Management' => 'admin/schools.php'), "schools_management" ); if($_GET['action']=="edit") { $buttontext="Save School"; $q=mysql_query("SELECT * FROM schools WHERE id='".$_GET['edit']."'"); $r=mysql_fetch_object($q); } else if($_GET['action']=="add") { $buttontext="Add School"; } $buttontext=i18n($buttontext); echo "
\n"; echo "\n"; if($_GET['action']=="edit") echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; if($config['participant_registration_type']=="schoolpassword") { echo ""; echo "\n"; } echo ""; if($config['participant_registration_type']=="invite") { echo ""; echo "\n"; } else { echo ""; } echo ""; $ch = ($r->atrisk) == 'yes' ? 'checked="checked"' : ''; echo "\n"; echo ""; echo "\n"; echo "
".i18n("School Name")."school)."\" size=\"60\" maxlength=\"64\" />
".i18n("School Language").""; echo ""; echo "
".i18n("School Designation").""; $des = array('' => 'Choose', 'public' => 'Public', 'independent' => 'Independent/Private', 'home' => 'Home School'); echo "
".i18n("School Level")."schoollevel)."\" size=\"32\" maxlength=\"32\" />
".i18n("School Board")."board)."\" size=\"60\" maxlength=\"64\" />
".i18n("School District")."district)."\" size=\"60\" maxlength=\"64\" />
".i18n("Address")."address)."\" size=\"60\" maxlength=\"64\" />
".i18n("City")."city)."\" size=\"32\" maxlength=\"32\" />
".i18n($config['provincestate']).""; emit_province_selector("province_code",$r->province_code); echo "
".i18n($config['postalzip'])."postalcode\" size=\"8\" maxlength=\"7\" />
".i18n("Phone")."phone)."\" size=\"16\" maxlength=\"16\" />
".i18n("Fax")."fax)."\" size=\"16\" maxlength=\"16\" />
".i18n("Principal")."principal)."\" size=\"60\" maxlength=\"64\" />
".i18n("School Email")."schoolemail)."\" size=\"60\" maxlength=\"128\" />
".i18n("Access Code")."accesscode)."\" size=\"32\" maxlength=\"32\" />

".i18n("Science head/teacher or science fair contact at school")."
".i18n("Name")."sciencehead)."\" size=\"60\" maxlength=\"64\" />
".i18n("Phone")."scienceheadphone)."\" size=\"16\" maxlength=\"16\" />
".i18n("Email")."scienceheademail)."\" size=\"60\" maxlength=\"128\" />

".i18n("Participant Registration Password")."
".i18n("Password")."registration_password)."\" size=\"32\" maxlength=\"32\" />

".i18n("Participant Registration Limits")."
".i18n("Set to 0 to have no registration limit")."
".i18n("Maximum of")." "; echo "projectlimit)."\" size=\"4\" maxlength=\"4\" />"; echo " "; echo i18n("projects"); echo " "; echo ""; echo "
".i18n("Participant registration limits are currently disabled. In order to use participant registration limits for schools, the participant registration type must be set to 'invite' in Configuration / Configuration Variables")."

".i18n("Demographic Information")."
".i18n("Inner City or At-Risk school")."
 
\n"; echo "
\n"; } else { send_header("School Management", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php'), "schools_management" ); switch($notice) { case 'added': echo happy("School successfully added"); break; case 'saved': echo happy("Successfully saved changes to school"); break; case 'deleted': echo happy("School successfully deleted"); break; case 'clearaccess': echo happy("Access Codes successfully cleared from all schools"); break; case 'makeaccess': echo happy("Access Codes successfully set for schools that didn't have one"); break; } echo "
"; echo "".i18n("Add new school")."\n"; echo "
"; echo "".i18n("Import schools from CSV")."\n"; echo "
"; echo "".i18n("Create Access Code for any school without one")."\n"; echo "
"; echo "".i18n("Remove Access Codes from all schools")."\n"; echo "
"; echo ""; echo ""; echo " "; echo " "; echo " "; echo " "; if($config['participant_registration_type']=="schoolpassword") echo " "; echo " "; echo " "; echo "\n"; $q=mysql_query("SELECT * FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY school"); while($r=mysql_fetch_object($q)) { echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; if($config['participant_registration_type']=="schoolpassword") echo " \n"; echo " \n"; echo " \n"; echo "\n"; } echo "
".i18n("School")."".i18n("Address")."".i18n("Phone")."".i18n("Contact")."".i18n("Reg Pass")."".i18n("Access Code")."".i18n("Action")."
$r->school$r->address, $r->city, $r->postalcode$r->phone$r->sciencehead$r->registration_password$r->accesscode"; echo "id\">"; echo " "; echo "id\">"; echo "
\n"; } send_footer(); ?>