forked from science-ation/science-ation
Wow, properly fix the broken winners.php to show multi-year data!
This commit is contained in:
parent
0de2bfeef0
commit
e36f452636
@ -36,6 +36,7 @@ if($_POST['action']) $action=$_POST['action'];
|
||||
if($_GET['year'] && $_GET['type'])
|
||||
{
|
||||
echo "<h2>".i18n("%1 %2 Award Winners",array($_GET['year'],$_GET['type']))."</h2>";
|
||||
$year=$_GET['year'];
|
||||
|
||||
//first, lets make sure someone isnt tryint to see something that they arent allowed to!
|
||||
$q=mysql_query("SELECT (NOW()>'".$config['dates']['postwinners']."') AS test");
|
||||
@ -57,10 +58,10 @@ if($_GET['year'] && $_GET['type'])
|
||||
award_awards,
|
||||
award_types
|
||||
WHERE
|
||||
award_awards.year='".$config['FAIRYEAR']."'
|
||||
award_awards.year='$year'
|
||||
AND award_awards.award_types_id=award_types.id
|
||||
AND award_types.type='".$_GET['type']."'
|
||||
AND award_types.year='".$config['FAIRYEAR']."'
|
||||
AND award_types.year='$year'
|
||||
ORDER BY
|
||||
awards_order");
|
||||
|
||||
@ -90,7 +91,7 @@ if($_GET['year'] && $_GET['type'])
|
||||
LEFT JOIN projects ON projects.id=winners.projects_id
|
||||
WHERE
|
||||
award_awards_id='$r->id'
|
||||
AND award_prizes.year='".$config['FAIRYEAR']."'
|
||||
AND award_prizes.year='$year'
|
||||
ORDER BY
|
||||
`order`");
|
||||
echo mysql_error();
|
||||
@ -236,6 +237,8 @@ else
|
||||
{
|
||||
echo " <a href=\"winners.php?year=$r->year&type=$tr->type\">".i18n("%1 %2 award winners",array($r->year,$tr->type))."</a><br />";
|
||||
}
|
||||
echo "<br />";
|
||||
$first=false;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user