diff --git a/admin/judges_info.php b/admin/judges_info.php new file mode 100644 index 0000000..d893d53 --- /dev/null +++ b/admin/judges_info.php @@ -0,0 +1,210 @@ + + 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. +*/ +?> +firstname,$judgeinfo->lastname))); + + echo "

".i18n("Personal Info")."

"; + 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 ""; + + echo ""; + + echo "\n"; + echo " \n"; + echo "\n"; + + + echo "\n"; + echo " \n"; + echo "\n"; + + echo "\n"; + echo " "; + echo " \n"; + echo "\n"; + + echo "\n"; + echo " "; + echo " \n"; + echo "\n"; + + echo "\n"; + echo " "; + 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 "
".i18n("First Name")."$judgeinfo->firstname".i18n("Last Name")."$judgeinfo->lastname
".i18n("Email Address")."$judgeinfo->email".i18n("City")."$judgeinfo->city
".i18n("Address 1")."$judgeinfo->address".i18n("Province")."$judgeinfo->province"; + echo "
".i18n("Address 2")."$judgeinfo->address2".i18n("Phone (Home)")."$judgeinfo->phonehome
".i18n("Postal Code")."$judgeinfo->postalcode".i18n("Phone (Work)")."$judgeinfo->phonework ext $judgeinfo->phoneworkext
".i18n("Organization")."$judgeinfo->organization".i18n("Phone (Cell)")."$judgeinfo->phonecell

".i18n("Age category preference").""; + echo "$judgeinfo->catpref_name"; + echo "
".i18n("Division preference").""; + echo "$judgeinfo->divpref_name"; + echo "
".i18n("Highest post-secondary degree")."$judgeinfo->highest_psd
".i18n("Other professional qualifications")."$judgeinfo->professional_quals
".i18n("Languages").""; + + $q=mysql_query("SELECT languages_lang FROM judges_languages WHERE judges_id='$judgeinfo->id'"); + while($r=mysql_fetch_object($q)) + { + echo $r->languages_lang; + echo "
"; + } + + echo "
".i18n("Judging experience at school/local level")."$judgeinfo->years_school ".i18n("years")."
".i18n("Judging experience at regional level")."$judgeinfo->years_regional ".i18n("years")."
".i18n("Judging experience at national level")."$judgeinfo->years_national ".i18n("years")."
".i18n("Willing to act as a division chair?")."$judgeinfo->willing_chair"; + echo "
".i18n("Attending lunch?")."$judgeinfo->attending_lunch"; + echo "
"; + + + echo "
"; + echo "
"; + echo "
"; + echo "

Areas of Expertise

"; + echo ""; + + //grab the list of divisions, because the last fields of the table will be the sub-divisions + $q=mysql_query("SELECT * FROM projectdivisions ORDER BY id AND year='".$config['FAIRYEAR']."'"); + $divs=array(); + while($r=mysql_fetch_object($q)) + { + $divs[]=$r->id; + $divnames[$r->id]=$r->division; + } + + $subdivq=mysql_query("SELECT judges_expertise.*, projectsubdivisions.subdivision, projectsubdivisions.projectdivisions_id AS parent_id FROM judges_expertise + LEFT JOIN projectsubdivisions ON judges_expertise.projectsubdivisions_id=projectsubdivisions.id + WHERE judges_id='$judgeinfo->id' AND judges_expertise.year='".$config['FAIRYEAR']."' ORDER BY projectdivisions_id, projectsubdivisions_id"); + $judge_divs=array(); + $judge_subdivs=array(); + $divdata=array(); + + while($subdivr=mysql_fetch_object($subdivq)) + { + if($subdivr->projectdivisions_id) + { + $judge_divs[$subdivr->projectdivisions_id]=$subdivr->val; + } + else + $judge_subdivs[$subdivr->parent_id][]=$subdivr->subdivision; + } + + + foreach($divs as $div) + { + echo ""; + echo " "; + + echo ""; + echo ""; + } + + echo "
".i18n($divnames[$div])."".$judge_divs[$div]."/5"; + if(count($judge_subdivs[$div])) + { + $divdata=implode(",",$judge_subdivs[$div]); + echo "($divdata)"; + } + else + echo " "; + echo "
"; + } + else + { + send_popup_header("Judge Information"); + echo error(i18n("No Judge ID passed to Judges Info")); + } + + + + + + send_popup_footer(); + +?> diff --git a/admin/judges_teams.php b/admin/judges_teams.php index 4c5964f..76db449 100644 --- a/admin/judges_teams.php +++ b/admin/judges_teams.php @@ -50,6 +50,36 @@ function saveteamnamesbuttonclicked() document.forms.judges.submit(); } +function openjudgeinfo(id) +{ + if(id) + currentid=id; + else + currentid=document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value; + + window.open("judges_info.php?id="+currentid,"JudgeInfo","location=no,menubar=no,directories=no,toolbar=no,width=600,height=400"); + return false; + +} +function switchjudgeinfo() +{ + if(document.forms.judges["judgelist[]"].selectedIndex != -1) + { + currentname=document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].text; + currentid=document.forms.judges["judgelist[]"].options[document.forms.judges["judgelist[]"].selectedIndex].value; + + document.forms.judges.judgeinfobutton.disabled=false; + document.forms.judges.judgeinfobutton.value=": "+currentname; + + } + else + { + document.forms.judges.judgeinfobutton.disabled=true; + document.forms.judges.judgeinfobutton.value=""; + } + +} + "; echo ""; echo ""; - echo ""; - echo ""; + echo ""; + echo ""; echo ""; echo ""; } diff --git a/common.inc.php b/common.inc.php index f4cc70d..42b1a6f 100644 --- a/common.inc.php +++ b/common.inc.php @@ -353,6 +353,35 @@ function send_footer() \n"; +?> + + +<?=i18n($title)?> + + + +$title"; +} + +function send_popup_footer() +{ +?> + + +
".i18n("Judges List")."Judge Teams".i18n("Judges List"); + echo "
"; + echo ""; + echo "
".i18n("Judge Teams")."
"; @@ -172,7 +205,7 @@ function saveteamnamesbuttonclicked() $q=mysql_query($querystr); echo mysql_error(); - echo ""; while($r=mysql_fetch_object($q)) { @@ -259,7 +292,9 @@ function saveteamnamesbuttonclicked() echo "
"; echo ""; echo ""; + echo ""; echo $member['firstname']." ".$member['lastname']; + echo ""; echo "