From 952047cc117402796514ffc77d592133c59435c9 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 20 Sep 2006 16:24:52 +0000 Subject: [PATCH] Add a prize value field to award prizes, also add editor the the value, as well add editor for the contact position --- admin/award_contacts.php | 2 ++ admin/award_prizes.php | 11 +++++++++-- db/db.update.25.sql | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/admin/award_contacts.php b/admin/award_contacts.php index 1998035..63e2628 100644 --- a/admin/award_contacts.php +++ b/admin/award_contacts.php @@ -73,6 +73,7 @@ $exec="UPDATE award_contacts SET ". "firstname='".mysql_escape_string(stripslashes($_POST['firstname']))."', ". "lastname='".mysql_escape_string(stripslashes($_POST['lastname']))."', ". + "position='".mysql_escape_string(stripslashes($_POST['position']))."', ". "phonework='".mysql_escape_string(stripslashes($_POST['phonework']))."', ". "phonecell='".mysql_escape_string(stripslashes($_POST['phonecell']))."', ". "phonehome='".mysql_escape_string(stripslashes($_POST['phonehome']))."', ". @@ -122,6 +123,7 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/admin/award_prizes.php b/admin/award_prizes.php index 2ca73f3..40a74a2 100644 --- a/admin/award_prizes.php +++ b/admin/award_prizes.php @@ -69,6 +69,7 @@ "prize='".mysql_escape_string(stripslashes($_POST['prize']))."', ". "cash='".mysql_escape_string(stripslashes($_POST['cash']))."', ". "scholarship='".mysql_escape_string(stripslashes($_POST['scholarship']))."', ". + "value='".mysql_escape_string(stripslashes($_POST['value']))."', ". "number='".mysql_escape_string(stripslashes($_POST['number']))."', ". "excludefromac='".mysql_escape_string(stripslashes($_POST['excludefromac']))."', ". "`order`='".mysql_escape_string(stripslashes($_POST['order']))."' ". @@ -131,6 +132,7 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo ""; echo " "; echo " "; - echo " "; - echo " "; + echo " "; + echo " "; + echo " "; echo " "; echo " "; echo "\n"; @@ -191,6 +194,10 @@ if($r->scholarship) echo "\$$r->scholarship"; else echo " "; echo " "; + echo " "; echo " \n"; echo "
".i18n("First Name")."firstname)."\" size=\"32\" maxlength=\"32\" />
".i18n("Last Name")."lastname)."\" size=\"32\" maxlength=\"32\" />
".i18n("Position")."position)."\" size=\"32\" maxlength=\"32\" />
".i18n("Phone (Work)")."phonework)."\" size=\"16\" maxlength=\"16\" />
".i18n("Phone (Cell)")."phonecell)."\" size=\"16\" maxlength=\"16\" />
".i18n("Phone (Home)")."phonehome)."\" size=\"16\" maxlength=\"16\" />
".i18n("Prize Description")."prize)."\" size=\"40\" maxlength=\"128\" />
".i18n("Cash Amount")."\$cash)."\" size=\"10\" maxlength=\"10\" />
".i18n("Scholarship Amount")."\$scholarship)."\" size=\"10\" maxlength=\"10\" />
".i18n("Prize Value")."\$value)."\" size=\"10\" maxlength=\"10\" />
".i18n("Number")."number)."\" size=\"3\" maxlength=\"5\" />
".i18n("Order")."order)."\" size=\"3\" maxlength=\"5\" />
"; @@ -171,8 +173,9 @@ echo "
".i18n("Order")."".i18n("Prize Description")."".i18n("Cash Amount")."".i18n("Scholarship Amount")."".i18n("Cash")."".i18n("Scholarship")."".i18n("Value")."".i18n("# of Prizes")."Actions
"; + if($r->value) echo "\$$r->value"; + else echo " "; + echo " $r->number"; echo "id\">"; diff --git a/db/db.update.25.sql b/db/db.update.25.sql index 982ea73..1cb4e8e 100644 --- a/db/db.update.25.sql +++ b/db/db.update.25.sql @@ -1 +1,3 @@ ALTER TABLE `award_contacts` ADD `position` VARCHAR( 64 ) NOT NULL AFTER `lastname` ; +ALTER TABLE `award_prizes` ADD `value` INT NOT NULL AFTER `scholarship` ; +UPDATE `award_prizes` SET `value` = `cash` + `scholarship`;