- Fix printing the judge languages beside each judge

This commit is contained in:
dave 2009-04-01 23:24:54 +00:00
parent 411361e351
commit 241d9ad1c1

View File

@ -253,27 +253,27 @@ function switchjudgeinfo()
$judgelist[$i['users_id']]['teams_links'][] = $i;
}
if($_SESSION['viewstate']['judges_teams_list_show']=='unassigned')
{
$jlist = array();
if($_SESSION['viewstate']['judges_teams_list_show']=='unassigned') {
/* Remove all judges that have a link */
foreach($judgelist as $j) {
if(count($j['teams_links']) > 0) {
unset($judgelist[$j['id']]);
}
if(count($j['teams_links']) == 0) $jlist[] = $j['id'];
}
}
echo "<center>";
echo i18n("Listing %1 judges",array(count($judgelist)));
echo i18n("Listing %1 judges",array(count($jlist)));
echo "<br />";
echo "</center>";
echo mysql_error();
echo "<select name=\"judgelist[]\" onchange=\"switchjudgeinfo()\" multiple=\"multiple\" style=\"width: 250px; height: 600px;\">";
foreach($judgelist AS $id=>$u) {
foreach($jlist as $jid) {
$u = &$judgelist[$jid];
if($u['firstname'] && $u['lastname'])
echo "<option value=\"$id\">{$u['firstname']} {$u['lastname']}</option>\n";
}
unset($u);
echo "</select>";
echo "</td>";
@ -281,8 +281,7 @@ function switchjudgeinfo()
$teams=getJudgingTeams();
foreach($teams AS $team)
{
foreach($teams AS $team) {
echo "<hr>";
echo "<table width=\"100%\">";
@ -299,6 +298,7 @@ function switchjudgeinfo()
{
foreach($team['members'] AS $member)
{
$j = &$judgelist[$member['id']];
echo "<tr><td>";
echo "<a onclick=\"return confirmClick('Are you sure you want to remove this judge from this team?')\" href=\"judges_teams_members.php?action=del&team_id=".$team['id']."&team_num=".$team['num']."&users_id=".$member['id']."&team_name=".rawurlencode($team['name'])."\"><img border=0 src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\"></a>";
echo "</td><td width=\"100%\">";
@ -318,7 +318,10 @@ function switchjudgeinfo()
}
echo "<a href=\"\" onclick=\"return openjudgeinfo(".$member['id'].");\">";
echo $member['firstname']." ".$member['lastname'];
echo "</a> (".$member['languages'].")";
if(is_array($j['languages']))
$l = is_array($j['languages']) ? join(' ',$j['languages']) : '';
echo "</a> (<font size=-1>$l</font>)";
echo "</td></tr>";
}