Implement Bug #0000001 - Have option to exclude awards and/or prizes from the awards ceremony script.

(An example could be honourable mentions that you dont call up on stage at the awards ceremony)
This commit is contained in:
james 2006-02-01 05:06:48 +00:00
parent 1833a63b15
commit b375b4ae0d
3 changed files with 15 additions and 3 deletions

View File

@ -65,6 +65,7 @@
"award_sponsors_id='".mysql_escape_string(stripslashes($_POST['award_sponsors_id']))."', ". "award_sponsors_id='".mysql_escape_string(stripslashes($_POST['award_sponsors_id']))."', ".
"award_types_id='".mysql_escape_string(stripslashes($_POST['award_types_id']))."', ". "award_types_id='".mysql_escape_string(stripslashes($_POST['award_types_id']))."', ".
"presenter='".mysql_escape_string(stripslashes($_POST['presenter']))."', ". "presenter='".mysql_escape_string(stripslashes($_POST['presenter']))."', ".
"excludefromac='".mysql_escape_string(stripslashes($_POST['excludefromac']))."', ".
"criteria='".mysql_escape_string(stripslashes($_POST['criteria']))."' ". "criteria='".mysql_escape_string(stripslashes($_POST['criteria']))."' ".
"WHERE id='$id'"; "WHERE id='$id'";
@ -138,6 +139,7 @@
award_awards.criteria, award_awards.criteria,
award_awards.order, award_awards.order,
award_awards.presenter, award_awards.presenter,
award_awards.excludefromac,
award_types.id AS award_types_id, award_types.id AS award_types_id,
award_types.type, award_types.type,
award_sponsors.id AS award_sponsors_id, award_sponsors.id AS award_sponsors_id,
@ -166,6 +168,7 @@ echo mysql_error();
$award_sponsors_id=$r->award_sponsors_id; $award_sponsors_id=$r->award_sponsors_id;
$award_sponsor=$r->organization; $award_sponsor=$r->organization;
$award_awards_presenter=$r->presenter; $award_awards_presenter=$r->presenter;
$award_awards_excludefromac=$r->excludefromac;
//select the current categories that this award is linked to //select the current categories that this award is linked to
$ccq=mysql_query("SELECT * FROM award_awards_projectcategories WHERE award_awards_id='$r->id'"); $ccq=mysql_query("SELECT * FROM award_awards_projectcategories WHERE award_awards_id='$r->id'");
@ -199,6 +202,7 @@ echo mysql_error();
if($_POST['eligiblecategories']) $currentcategories=$_POST['eligiblecategories']; if($_POST['eligiblecategories']) $currentcategories=$_POST['eligiblecategories'];
if($_POST['eligibledivisions']) $currentdivisions=$_POST['eligibledivisions']; if($_POST['eligibledivisions']) $currentdivisions=$_POST['eligibledivisions'];
if($_POST['presenter']) $award_awards_presenter=$_POST['presenter']; if($_POST['presenter']) $award_awards_presenter=$_POST['presenter'];
if($_POST['excludefromac']) $award_awards_excludefromac=$_POST['excludefromac'];
echo "<form method=\"post\" action=\"award_awards.php\">\n"; echo "<form method=\"post\" action=\"award_awards.php\">\n";
@ -280,14 +284,15 @@ echo mysql_error();
echo "<input $ch type=\"checkbox\" name=\"eligibledivisions[]\" value=\"$dr->id\" />".i18n($dr->division)."<br />"; echo "<input $ch type=\"checkbox\" name=\"eligibledivisions[]\" value=\"$dr->id\" />".i18n($dr->division)."<br />";
} }
echo "</select>";
echo "</td>"; echo "</td>";
echo "</tr>"; echo "</tr>";
echo "</table>"; echo "</table>";
echo "</td></tr>"; echo "</td></tr>";
echo "<tr><td align=\"right\">";
if($award_awards_excludefromac==1) $ch="checked=\"checked\""; else $ch="";
echo "<input $ch type=\"checkbox\" name=\"excludefromac\" value=\"1\"></td><td>".i18n("Exclude this award from the award ceremony script")."</td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"$buttontext\" /></td></tr>\n"; echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"$buttontext\" /></td></tr>\n";
echo "</table>\n"; echo "</table>\n";

View File

@ -70,6 +70,7 @@
"cash='".mysql_escape_string(stripslashes($_POST['cash']))."', ". "cash='".mysql_escape_string(stripslashes($_POST['cash']))."', ".
"scholarship='".mysql_escape_string(stripslashes($_POST['scholarship']))."', ". "scholarship='".mysql_escape_string(stripslashes($_POST['scholarship']))."', ".
"number='".mysql_escape_string(stripslashes($_POST['number']))."', ". "number='".mysql_escape_string(stripslashes($_POST['number']))."', ".
"excludefromac='".mysql_escape_string(stripslashes($_POST['excludefromac']))."', ".
"`order`='".mysql_escape_string(stripslashes($_POST['order']))."' ". "`order`='".mysql_escape_string(stripslashes($_POST['order']))."' ".
"WHERE id='$id'"; "WHERE id='$id'";
mysql_query($exec); mysql_query($exec);
@ -132,6 +133,10 @@
echo "<tr><td>".i18n("Scholarship Amount")."</td><td>\$</td><td><input type=\"text\" name=\"scholarship\" value=\"".htmlspecialchars($r->scholarship)."\" size=\"10\" maxlength=\"10\" /></td></tr>\n"; echo "<tr><td>".i18n("Scholarship Amount")."</td><td>\$</td><td><input type=\"text\" name=\"scholarship\" value=\"".htmlspecialchars($r->scholarship)."\" size=\"10\" maxlength=\"10\" /></td></tr>\n";
echo "<tr><td>".i18n("Number")."</td><td></td><td><input type=\"text\" name=\"number\" value=\"".htmlspecialchars($r->number)."\" size=\"3\" maxlength=\"5\" /></td></tr>\n"; echo "<tr><td>".i18n("Number")."</td><td></td><td><input type=\"text\" name=\"number\" value=\"".htmlspecialchars($r->number)."\" size=\"3\" maxlength=\"5\" /></td></tr>\n";
echo "<tr><td>".i18n("Order")."</td><td></td><td><input type=\"text\" name=\"order\" value=\"".htmlspecialchars($r->order)."\" size=\"3\" maxlength=\"5\" /></td></tr>\n"; echo "<tr><td>".i18n("Order")."</td><td></td><td><input type=\"text\" name=\"order\" value=\"".htmlspecialchars($r->order)."\" size=\"3\" maxlength=\"5\" /></td></tr>\n";
echo "<tr><td align=\"right\" colspan=\"2\">";
if($r->excludefromac==1) $ch="checked=\"checked\""; else $ch="";
echo "<input $ch type=\"checkbox\" name=\"excludefromac\" value=\"1\"></td><td>".i18n("Exclude this prize from the award ceremony script")."</td></tr>";
echo "<tr><td colspan=\"3\" align=\"center\"><input type=\"submit\" value=\"$buttontext\" /></td></tr>\n"; echo "<tr><td colspan=\"3\" align=\"center\"><input type=\"submit\" value=\"$buttontext\" /></td></tr>\n";

View File

@ -33,6 +33,7 @@
WHERE WHERE
award_awards.year='".$config['FAIRYEAR']."' award_awards.year='".$config['FAIRYEAR']."'
AND award_awards.award_types_id=award_types.id AND award_awards.award_types_id=award_types.id
AND award_awards.excludefromac='0'
ORDER BY awards_order"); ORDER BY awards_order");
echo mysql_error(); echo mysql_error();
@ -60,6 +61,7 @@
WHERE WHERE
award_awards_id='$r->id' award_awards_id='$r->id'
AND award_prizes.year='".$config['FAIRYEAR']."' AND award_prizes.year='".$config['FAIRYEAR']."'
AND award_prizes.excludefromac='0'
ORDER BY ORDER BY
`order`"); `order`");
echo mysql_error(); echo mysql_error();