- Fix the total count on the cat/div summary. Several fairs have emailed me to

say the count is wrong.  It's not wrong, it's just not printing the number
  they expect.  This fixes that.

- Make it more obvious what status the stats are being displayed for.
This commit is contained in:
dave 2008-02-26 08:19:38 +00:00
parent 343d777aab
commit 10bf90f0db

View File

@ -65,22 +65,19 @@ function openstudentinfo(id)
echo "<form name=\"statuschangerform\" method=\"get\" action=\"registration_list.php\">";
echo "<select name=\"showstatus\" onchange=\"document.forms.statuschangerform.submit()\">";
if($_GET['showstatus']=="") $sel="selected=\"selected\""; else $sel="";
echo "<option $sel value=\"\">".i18n("Any Status")."</option>\n";
if($_GET['showstatus']=="complete") $sel="selected=\"selected\""; else $sel="";
echo "<option $sel value=\"complete\">".i18n("Complete")."</option>\n";
$status_str = array();
$status_str[''] = i18n("Any Status");
$status_str['complete'] = i18n("Complete");
//if there is no reg fee, then we dont need to show this status, because nobody will ever be in this status
if($config['regfee']>0)
{
if($_GET['showstatus']=="paymentpending") $sel="selected=\"selected\""; else $sel="";
echo "<option $sel value=\"paymentpending\">".i18n("Payment Pending")."</option>\n";
}
if($_GET['showstatus']=="open") $sel="selected=\"selected\""; else $sel="";
echo "<option $sel value=\"open\">".i18n("Open")."</option>\n";
if($_GET['showstatus']=="new") $sel="selected=\"selected\""; else $sel="";
echo "<option $sel value=\"new\">".i18n("New")."</option>\n";
if($config['regfee']>0) $status_str['paymentpending'] = i18n("Payment Pending");
$status_str['open'] = i18n("Open");
$status_str['new'] = i18n("New");
$showstatus = ($_GET['showstatus'] == '') ? '' : $_GET['showstatus'] ;
foreach($status_str as $s=>$str) {
$sel = ($showstatus==$s) ? "selected=\"selected\"" : '';
echo "<option $sel value=\"$s\">$str</option>\n";
}
echo "</select>";
echo "</form>";
@ -222,7 +219,7 @@ else $wherestatus="";
echo "<br />";
echo "<table style=\"margin-left: 50px;\">";
echo "<tr><td colspan=\"2\"><h3>".i18n("Students / projects per age category / division")."</h3></td></tr>";
echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - ".i18n("Students / projects per age category / division")."</h3></td></tr>";
echo "<tr><td colspan=\"2\">";
echo "<table class=\"tableview\" width=\"100%\">";
echo "<tr><td width=\"50%\"></td>";
@ -256,17 +253,21 @@ else $wherestatus="";
echo "</tr>";
}
echo "<tr><td><b>".i18n("Total")."</b></td>";
$tstud=0;
$tproj=0;
foreach($cats AS $c=>$cn) {
echo "<td align=\"center\"><b>";
echo ($tstudcat[$c]?$tstudcat[$c]:0);
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo ($tprojcat[$c]?$tprojcat[$c]:0);
echo "</b></td>";
$tstud+=$tstudcat[$c];
$tproj+=$tprojcat[$c];
}
echo "<td align=\"center\"><b>";
echo ($stats_totalstudents?$stats_totalstudents:0);
echo ($tstud);
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo ($stats_totalprojects?$stats_totalprojects:0);
echo ($tproj);
echo "</b></td>";
echo "</tr>";
@ -274,7 +275,7 @@ else $wherestatus="";
echo "</td></tr>";
echo "<tr><td colspan=\"2\"><br /></td></tr>";
echo "<tr><td colspan=\"2\"><h3>".i18n("Students / projects per age category / school")."</h3></td></tr>";
echo "<tr><td colspan=\"2\"><h3>{$status_str[$showstatus]} - ".i18n("Students / projects per age category / school")."</h3></td></tr>";
echo "<tr><td colspan=\"2\">";
echo "<table class=\"tableview\" width=\"100%\">";
echo "<tr><td width=\"50%\"></td>";