From e36f4526363da6d681d7f435220bd7aaf996499f Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Jun 2007 19:52:58 +0000 Subject: [PATCH] Wow, properly fix the broken winners.php to show multi-year data! --- winners.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/winners.php b/winners.php index edbf408..856f3b1 100644 --- a/winners.php +++ b/winners.php @@ -36,6 +36,7 @@ if($_POST['action']) $action=$_POST['action']; if($_GET['year'] && $_GET['type']) { echo "

".i18n("%1 %2 Award Winners",array($_GET['year'],$_GET['type']))."

"; + $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 "  year&type=$tr->type\">".i18n("%1 %2 award winners",array($r->year,$tr->type))."
"; } + echo "
"; + $first=false; } } else