forked from science-ation/science-ation
modify to only show awards actually given out
This commit is contained in:
parent
f6a68bc53a
commit
8b4dfb23c5
26
winners.php
26
winners.php
@ -35,6 +35,9 @@ if($_POST['action']) $action=$_POST['action'];
|
||||
|
||||
if($_GET['year'] && $_GET['type'])
|
||||
{
|
||||
$show_unawarded_awards="no";
|
||||
$show_unawarded_prizes="no";
|
||||
|
||||
echo "<h2>".i18n("%1 %2 Award Winners",array($_GET['year'],$_GET['type']))."</h2>";
|
||||
$year=$_GET['year'];
|
||||
|
||||
@ -78,8 +81,6 @@ if($_GET['year'] && $_GET['type'])
|
||||
echo "<br />";
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
echo "<h3>".i18n($r->name)."</h3> \n";
|
||||
|
||||
$pq=mysql_query("SELECT
|
||||
award_prizes.prize,
|
||||
award_prizes.number,
|
||||
@ -100,9 +101,30 @@ if($_GET['year'] && $_GET['type'])
|
||||
ORDER BY
|
||||
`order`");
|
||||
echo mysql_error();
|
||||
$awarded_count = 0;
|
||||
if($show_unawarded_awards=="no")
|
||||
{
|
||||
while($pr=mysql_fetch_object($pq))
|
||||
{
|
||||
if($pr->projectnumber)
|
||||
{
|
||||
$awarded_count++;
|
||||
}
|
||||
}
|
||||
mysql_data_seek($pq, 0);
|
||||
}
|
||||
if($show_unawarded_awards=="yes" || $awarded_count > 0)
|
||||
{
|
||||
echo "<h3>".i18n($r->name)."</h3> \n";
|
||||
}
|
||||
|
||||
$prevprizeid=-1;
|
||||
while($pr=mysql_fetch_object($pq))
|
||||
{
|
||||
if(!($pr->projectnumber) && $show_unawarded_prizes=="no")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($prevprizeid!=$pr->id)
|
||||
{
|
||||
echo " ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user