<< ".i18n("Back to Judges Registration Summary")."
"; echo "
"; if($_POST['action']=="save") { //first delete all their old associations for this year.. mysql_query("DELETE FROM judges_expertise WHERE judges_id='".$_SESSION['judges_id']."' AND year='".$config['FAIRYEAR']."'"); foreach($_POST['division'] AS $key=>$val) { mysql_query("INSERT INTO judges_expertise (judges_id, projectdivisions_id, val, year) VALUES ('".$_SESSION['judges_id']."','$key','$val','".$config['FAIRYEAR']."')"); } echo notice(i18n("Areas of Expertise successfully saved")); } $q=mysql_query("SELECT * FROM judges WHERE email='".$_SESSION['email']."' AND id='".$_SESSION['judges_id']."'"); $judgeinfo=mysql_fetch_object($q); //output the current status $newstatus=expertiseStatus(); if($newstatus!="complete") { echo error(i18n("Areas of Expertise Information Incomplete")); } else { echo happy(i18n("Areas of Expertise Information Complete")); } echo "
\n"; echo "\n"; 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 "
"; $q=mysql_query("SELECT * FROM judges_expertise WHERE judges_id='".$_SESSION['judges_id']."' AND year='".$config['FAIRYEAR']."'"); while($r=mysql_fetch_object($q)) { $expertise[$r->projectdivisions_id]=$r->val; } echo "\n"; echo ""; for($x=1;$x<=5;$x++) echo ""; echo ""; //query all of the categories $q=mysql_query("SELECT * FROM projectdivisions WHERE year='".$config['FAIRYEAR']."' ORDER BY division"); while($r=mysql_fetch_object($q)) { echo ""; for($x=1;$x<=5;$x++) { if($expertise[$r->id]==$x) $sel="checked=\"checked\""; else $sel=""; echo ""; } echo ""; } echo "
Division$x
".i18n($r->division)."id]\" value=\"$x\" />
"; echo "
"; echo "\n"; echo "
"; send_footer(); ?>