Fix a few queries to handle multi-year data properly

Add link to edit the generic prize template
This commit is contained in:
james 2006-01-03 02:01:20 +00:00
parent 56a16916e2
commit 335098e5a7

View File

@ -228,7 +228,7 @@ echo mysql_error();
echo "<tr><td>".i18n("Presenter")."</td><td><input type=\"text\" name=\"presenter\" value=\"".htmlspecialchars($award_awards_presenter)."\" size=\"50\" maxlength=\"128\" /></td></tr>\n";
echo "<tr><td>".i18n("Type")."</td><td>";
$tq=mysql_query("SELECT id,type FROM award_types ORDER BY type");
$tq=mysql_query("SELECT id,type FROM award_types WHERE year='{$config['FAIRYEAR']}' ORDER BY type");
echo "<select name=\"award_types_id\">";
//only show the "choose a type" option if we are adding,if we are editing, then they must have already chosen one.
echo $firsttype;
@ -319,7 +319,7 @@ echo mysql_error();
echo "</select>";
echo "</td><td>";
$q=mysql_query("SELECT id,type FROM award_types ORDER BY type");
$q=mysql_query("SELECT id,type FROM award_types WHERE year='{$config['FAIRYEAR']}' ORDER BY type");
echo "<select name=\"award_types_id\" onchange=\"document.forms.filterchange.submit()\">";
echo "<option value=\"\">".i18n("All Award Types")."</option>";
while($r=mysql_fetch_object($q))
@ -366,6 +366,7 @@ echo mysql_error();
$where_ati
AND award_awards.award_sponsors_id=award_sponsors.id
AND award_awards.award_types_id=award_types.id
AND award_types.year='".$config['FAIRYEAR']."'
ORDER BY `$orderby`");
echo mysql_error();
@ -417,6 +418,9 @@ echo mysql_error();
echo "<input type=\"submit\" value=\"".i18n("Re-order awards")."\" />";
echo "</form>";
}
echo "<br />";
echo "<a href=\"award_prizes.php?award_awards_id=-1\">Edit prizes for the generic prize template</a>";
}
send_footer();