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. */ ?> << ".i18n("Back to Judges Registration Summary")."
"; echo "
"; if($_POST['action']=="save") { mysql_query("UPDATE judges SET ". "firstname='".mysql_escape_string(stripslashes($_POST['firstname']))."', ". "lastname='".mysql_escape_string(stripslashes($_POST['lastname']))."', ". "email='".mysql_escape_string(stripslashes($_POST['email']))."', ". "address='".mysql_escape_string(stripslashes($_POST['address']))."', ". "address2='".mysql_escape_string(stripslashes($_POST['address2']))."', ". "city='".mysql_escape_string(stripslashes($_POST['city']))."', ". "province='".mysql_escape_string(stripslashes($_POST['province']))."', ". "postalcode='".mysql_escape_string(stripslashes($_POST['postalcode']))."', ". "phonehome='".mysql_escape_string(stripslashes($_POST['phonehome']))."', ". "phonework='".mysql_escape_string(stripslashes($_POST['phonework']))."', ". "phoneworkext='".mysql_escape_string(stripslashes($_POST['phoneworkext']))."', ". "phonecell='".mysql_escape_string(stripslashes($_POST['phonecell']))."', ". "organization='".mysql_escape_string(stripslashes($_POST['organization']))."', ". "highest_psd='".mysql_escape_string(stripslashes($_POST['highest_psd']))."', ". "professional_quals='".mysql_escape_string(stripslashes($_POST['professional_quals']))."', ". "typepref='".mysql_escape_string(stripslashes($_POST['typepref']))."' ". "WHERE id='".$_SESSION['judges_id']."'"); echo mysql_error(); //first we clear out their old languages mysql_query("DELETE FROM judges_languages WHERE judges_id='".$_SESSION['judges_id']."'"); if(count($_POST['languages'])) { //and now we add back any selected languages foreach($_POST['languages'] AS $l) { mysql_query("INSERT INTO judges_languages (judges_id,languages_lang) VALUES ('".$_SESSION['judges_id']."','$l')"); } } /* Parse the ansers to the questions, and save them */ $ans = questions_parse_from_http_headers('questions'); questions_save_answers('judgereg', $_SESSION['judges_id'], $config['FAIRYEAR'], $ans); echo notice(i18n("%1 %2 successfully updated",array($_POST['firstname'],$_POST['lastname']))); } $q=mysql_query("SELECT * FROM judges WHERE email='".$_SESSION['email']."' AND id='".$_SESSION['judges_id']."'"); $judgeinfo=mysql_fetch_object($q); updateJudgeCompleteStatus($judgeinfo); //output the current status $newstatus=personalStatus(); if($newstatus!="complete") { echo error(i18n("Personal Information Incomplete")); } else { echo happy(i18n("Personal Information Complete")); } 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 " \n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo ""; echo "\n"; echo " \n"; echo " \n"; echo ""; if($config['judges_specialaward_only_enable'] == 'yes') { echo ""; echo "\n"; echo " "; if($judgeinfo->typepref == "speconly") $ch = "checked=checked"; else $ch=""; echo " "; echo "\n"; } echo ""; echo "\n"; echo " "; echo " \n"; echo "\n"; echo "\n"; echo " "; echo " \n"; echo "\n"; echo "\n"; echo " "; echo " \n"; echo "\n"; questions_print_answer_editor('judgereg', $_SESSION['judges_id'], $config['FAIRYEAR'], 'questions'); echo "
".i18n("First Name")."firstname\" />".REQUIREDFIELD."".i18n("Last Name")."lastname\" />".REQUIREDFIELD."
".i18n("Email Address")."email\" />".REQUIREDFIELD."".i18n("City")."city\" />".REQUIREDFIELD."
".i18n("Address 1")."address\" />".REQUIREDFIELD."".i18n($config['provincestate']).""; emit_province_selector("province",$judgeinfo->province,"onchange=\"fieldChanged()\""); echo REQUIREDFIELD."
".i18n("Address 2")."address2\" />".i18n("Phone (Home)")."phonehome\" />".REQUIREDFIELD."
".i18n($config['postalzip'])."postalcode\" />".REQUIREDFIELD."".i18n("Phone (Work)")."phonework\" /> extphoneworkext\" />
".i18n("Organization")."organization\" />".i18n("Phone (Cell)")."phonecell\" />

".i18n("I am a judge for a specific special award")."
(".i18n("Check this box if you are supposed to judge a specific special award, and please select that award on the Special Award Preferences page.").")
"; echo "

".i18n("Highest post-secondary degree")."highest_psd\" />
".i18n("Other professional qualifications")."professional_quals\" />
".i18n("I can judge in the following languages")." ".REQUIREDFIELD.""; //grab the current languages that are selected $currentlanguages=array(); $q=mysql_query("SELECT languages_lang FROM judges_languages WHERE judges_id='".$_SESSION['judges_id']."'"); while($r=mysql_fetch_object($q)) { $currentlanguages[]=$r->languages_lang; } $q=mysql_query("SELECT * FROM languages WHERE active='Y' ORDER BY langname"); while($r=mysql_fetch_object($q)) { if(in_array($r->lang,$currentlanguages)) $ch="checked=\"checked\""; else $ch=""; echo "lang\" /> $r->langname
"; } echo "
"; echo "\n"; echo "
"; echo "
"; echo "<< ".i18n("Back to Judges Registration Summary")."
"; send_footer(); ?>