forked from science-ation/science-ation
Update winners list to properly show more than one school if needed
This commit is contained in:
parent
db76fa01f7
commit
64d3d6022f
12
winners.php
12
winners.php
@ -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 "  ";
|
||||
@ -179,7 +183,11 @@ if($_GET['year'] && $_GET['type'])
|
||||
echo "<br />";
|
||||
echo "  ";
|
||||
echo "  ";
|
||||
echo i18n("School").": $school";
|
||||
echo i18n("School").": ";
|
||||
$schoollist="";
|
||||
foreach($schools AS $school) $schoollist.=$school.", ";
|
||||
$schoollist=substr($schoollist,0,-2);
|
||||
echo $schoollist;
|
||||
echo "<br />";
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user