Show inactive judges list - this will probably be replaced soon with the new

editor interface.  Fixes Bug #0000064
This commit is contained in:
james 2006-10-16 17:50:28 +00:00
parent f395e7480b
commit b8f2e52401

View File

@ -57,19 +57,22 @@ function openjudgeinfo(id)
echo happy(i18n("Successfully removed judge from this year's fair"));
}
echo "<h3>".i18n("Judges list")."</h3>";
echo "<h3>".i18n("Active Judges list for %1",array($config['FAIRYEAR']))."</h3>";
echo "<table class=\"viewtable\">";
$querystr="SELECT
judges.id,
judges.firstname,
judges.lastname,
judges.complete
judges.complete,
judges_years.year
FROM
judges,
judges_years
judges
LEFT JOIN judges_years ON judges.id=judges_years.judges_id
WHERE
judges_years.year='".$config['FAIRYEAR']."' AND
judges.id=judges_years.judges_id
(judges_years.year='".$config['FAIRYEAR']."'
OR
judges_years.year IS NULL)
ORDER BY
lastname,
firstname";
@ -81,6 +84,7 @@ function openjudgeinfo(id)
echo mysql_error();
echo "<tr>";
echo " <th>".i18n("Judge Name")."</th>";
echo " <th>".i18n("Active")."</th>";
echo " <th>".i18n("Complete")."</th>";
echo " <th>".i18n("Actions")."</th>";
echo "</tr>";
@ -91,19 +95,28 @@ function openjudgeinfo(id)
echo "<tr><td>";
echo "<a href=\"\" onclick=\"return openjudgeinfo($r->id)\">$r->firstname $r->lastname</a>";
echo "</td>";
if($r->complete=="yes")
if($r->year)
{
$cl="happy";
echo "<td class=\"happy\" align=\"center\">".i18n("yes")."</td>";
$active++;
}
else
{
echo "<td class=\"error\" align=\"center\">".i18n("no")."</td>";
$inactive++;
}
if($r->complete=="yes" && $r->year)
{
echo "<td class=\"happy\" align=\"center\">".i18n("yes")."</td>";
$completeyes++;
}
else
{
echo "<td class=\"error\" align=\"center\">".i18n("no")."</td>";
$cl="error";
$completeno++;
}
echo "<td class=\"$cl\" align=\"center\">";
echo $r->complete;
echo "</td>";
echo "<td align=\"center\">";
echo "<a onclick=\"return confirmClick('Are you sure you want to remove this judge from this years fair?')\" href=\"judges_judges.php?action=remove&remove=$r->id\"><img border=0 src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\"></a>";
echo "</td>";
@ -112,7 +125,7 @@ function openjudgeinfo(id)
echo "</table>";
echo "<br />";
echo i18n("There are %1 total judges.",array($num),array("the number of judges"));
echo i18n("There are %1 total judges, %2 of which are active for this year, %3 are inactive.",array($num,$active,$inactive),array("the number of judges","number of active judges","number of inactive judges"));
echo "<br />";
echo i18n("There are %1 complete judges.",array($completeyes),array("the number of judges"));
echo "<br />";