Update winners list to properly show more than one school if needed

This commit is contained in:
james 2009-04-14 18:36:34 +00:00
parent db76fa01f7
commit 64d3d6022f

View File

@ -148,6 +148,7 @@ if($_GET['year'] && $_GET['type'])
$studnum=0;
$students="";
$schools=array();
while($studentinfo=mysql_fetch_object($sq))
{
if($studnum>0 && $prev) $students.=", ";
@ -166,7 +167,10 @@ if($_GET['year'] && $_GET['type'])
//we will assume that they are coming from the same school, so lets just grab the last students school
//and use it.
$school=$studentinfo->school;
if(!in_array($studentinfo->school,$schools))
$schools[]=$studentinfo->school;
// $school=$studentinfo->school;
}
echo "<br />";
echo "&nbsp&nbsp;&nbsp;&nbsp;";
@ -179,7 +183,11 @@ if($_GET['year'] && $_GET['type'])
echo "<br />";
echo "&nbsp&nbsp;&nbsp;&nbsp;";
echo "&nbsp&nbsp;&nbsp;&nbsp;";
echo i18n("School").": $school";
echo i18n("School").": ";
$schoollist="";
foreach($schools AS $school) $schoollist.=$school.", ";
$schoollist=substr($schoollist,0,-2);
echo $schoollist;
echo "<br />";
}
else