From b375b4ae0d71a6a83462ac2aa19bd8f4052dbc94 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 1 Feb 2006 05:06:48 +0000 Subject: [PATCH] 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) --- admin/award_awards.php | 11 ++++++++--- admin/award_prizes.php | 5 +++++ admin/reports_acscript.php | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/admin/award_awards.php b/admin/award_awards.php index 56ad732..5628c34 100644 --- a/admin/award_awards.php +++ b/admin/award_awards.php @@ -65,6 +65,7 @@ "award_sponsors_id='".mysql_escape_string(stripslashes($_POST['award_sponsors_id']))."', ". "award_types_id='".mysql_escape_string(stripslashes($_POST['award_types_id']))."', ". "presenter='".mysql_escape_string(stripslashes($_POST['presenter']))."', ". + "excludefromac='".mysql_escape_string(stripslashes($_POST['excludefromac']))."', ". "criteria='".mysql_escape_string(stripslashes($_POST['criteria']))."' ". "WHERE id='$id'"; @@ -138,6 +139,7 @@ award_awards.criteria, award_awards.order, award_awards.presenter, + award_awards.excludefromac, award_types.id AS award_types_id, award_types.type, award_sponsors.id AS award_sponsors_id, @@ -166,6 +168,7 @@ echo mysql_error(); $award_sponsors_id=$r->award_sponsors_id; $award_sponsor=$r->organization; $award_awards_presenter=$r->presenter; + $award_awards_excludefromac=$r->excludefromac; //select the current categories that this award is linked to $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['eligibledivisions']) $currentdivisions=$_POST['eligibledivisions']; if($_POST['presenter']) $award_awards_presenter=$_POST['presenter']; + if($_POST['excludefromac']) $award_awards_excludefromac=$_POST['excludefromac']; echo "
\n"; @@ -280,14 +284,15 @@ echo mysql_error(); echo "id\" />".i18n($dr->division)."
"; } - echo ""; echo ""; echo ""; echo ""; - - echo ""; + echo ""; + if($award_awards_excludefromac==1) $ch="checked=\"checked\""; else $ch=""; + echo "".i18n("Exclude this award from the award ceremony script").""; + echo "\n"; echo "\n"; diff --git a/admin/award_prizes.php b/admin/award_prizes.php index ea703d5..b1d48e0 100644 --- a/admin/award_prizes.php +++ b/admin/award_prizes.php @@ -70,6 +70,7 @@ "cash='".mysql_escape_string(stripslashes($_POST['cash']))."', ". "scholarship='".mysql_escape_string(stripslashes($_POST['scholarship']))."', ". "number='".mysql_escape_string(stripslashes($_POST['number']))."', ". + "excludefromac='".mysql_escape_string(stripslashes($_POST['excludefromac']))."', ". "`order`='".mysql_escape_string(stripslashes($_POST['order']))."' ". "WHERE id='$id'"; mysql_query($exec); @@ -132,6 +133,10 @@ echo "".i18n("Scholarship Amount")."\$scholarship)."\" size=\"10\" maxlength=\"10\" />\n"; echo "".i18n("Number")."number)."\" size=\"3\" maxlength=\"5\" />\n"; echo "".i18n("Order")."order)."\" size=\"3\" maxlength=\"5\" />\n"; + echo ""; + if($r->excludefromac==1) $ch="checked=\"checked\""; else $ch=""; + echo "".i18n("Exclude this prize from the award ceremony script").""; + echo "\n"; diff --git a/admin/reports_acscript.php b/admin/reports_acscript.php index 0f89eba..14bacbb 100644 --- a/admin/reports_acscript.php +++ b/admin/reports_acscript.php @@ -33,6 +33,7 @@ WHERE award_awards.year='".$config['FAIRYEAR']."' AND award_awards.award_types_id=award_types.id + AND award_awards.excludefromac='0' ORDER BY awards_order"); echo mysql_error(); @@ -60,6 +61,7 @@ WHERE award_awards_id='$r->id' AND award_prizes.year='".$config['FAIRYEAR']."' + AND award_prizes.excludefromac='0' ORDER BY `order`"); echo mysql_error();