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. */ ?> $val) $u['div_prefs'][$key] = $val; $u['div_prefs_sub'] = array(); foreach($_POST['subdivision'] AS $key=>$val) $u['div_prefs_sub'][$key] = $val; if($_POST['expertise_other']) $u['expertise_other'] = stripslashes($_POST['expertise_other']); else $u['expertise_other'] = NULL; $u['cat_prefs'] = array(); if(is_array($_POST['catpref'])) { foreach($_POST['catpref'] AS $k=>$v) { if($v == '') continue; $u['cat_prefs'][$k] = $v; } } user_save($u); happy_("Preferences successfully saved"); //reload the user record because we dont know if we saved or didnt save above, we just want //to know what the user looks like _now_ $u = user_load($eid); $newstatus=judge_status_expertise($u); echo "\n"; exit; } // if($_SESSION['embed'] == true) { echo "

".i18n("Judging Expertise")."

"; display_messages(); /* } else { //send the header send_header('Category and Division Preferences', array('Judge Registration' => 'judge_main.php') ); }*/ $newstatus=judge_status_expertise($u); ?> \n"; if($u['special_award_only'] == 'yes') { echo i18n("You have specified that you are a judge for a specific special award. Divisional Judging preferences have been disabled because they do not apply to you."); echo "
"; send_footer(); exit; } echo "
\n"; echo "\n"; $q=mysql_query("SELECT * FROM projectcategories WHERE conferences_id='{$conference['id']}' ORDER BY mingrade"); echo "

".i18n("Age Category Preferences")."


"; echo ""; while($r=mysql_fetch_object($q)) { echo ""; echo ""; echo ""; } echo "
"; echo i18n("%1 (Grades %2-%3)",array(i18n($r->category),$r->mingrade,$r->maxgrade)); echo ":"; echo "".REQUIREDFIELD; echo "
"; echo "
"; echo "
"; echo "

".i18n("Division Expertise")."


"; echo i18n("Please rank the following divisions according to the amount of knowledge you have of each subject. A '1' indicates very little knowledge, and a '5' indicates you are very knowledgeable of the subject"); echo "
"; echo "
"; echo i18n("Once you save, any division that you specified as 3 or more might offer sub-divisions for you to choose from."); echo "
"; echo "
"; echo "\n"; //query all of the categories $q=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']}' ORDER BY division"); $first = true; while($r=mysql_fetch_object($q)) { $trclass = ($trclass == 'odd') ? 'even' : 'odd'; if($first == true) { echo ""; echo ""; for($x=1;$x<=5;$x++) echo ""; echo ""; echo ""; $first = false; } echo ""; for($x=1;$x<=5;$x++) { if(!$u['div_prefs'][$r->id]) $u['div_prefs'][$r->id]=1; $sel = ($u['div_prefs'][$r->id]==$x) ? "checked=\"checked\"" : ''; echo ""; } echo ""; // echo ""; echo ""; //only show the sub-divisions if the 'main' division is scored >=3 if($u['div_prefs'][$r->id]>=3) { $subq=mysql_query("SELECT * FROM projectsubdivisions WHERE projectdivisions_id='$r->id' AND conferences_id='".$conference['id']."' ORDER BY subdivision"); while($subr=mysql_fetch_object($subq)) { echo ""; echo ""; $ch = ($u['div_prefs_sub'][$subr->id]) ? "checked=\"checked\"" : ''; echo ""; echo ""; echo ""; } } } ?>
".i18n("Novice")."".i18n("Expert")."
$x
".i18n($r->division)."id]\" value=\"$x\" />" . REQUIREDFIELD . "
 id]\" value=\"1\" />"; echo "$subr->subdivision"; echo "



" />