forked from science-ation/science-ation
Add a prize value field to award prizes, also add editor the the value, as well add editor for the contact position
This commit is contained in:
parent
474c000377
commit
952047cc11
@ -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 "<table>\n";
|
||||
echo "<tr><td>".i18n("First Name")."</td><td><input type=\"text\" name=\"firstname\" value=\"".htmlspecialchars($r->firstname)."\" size=\"32\" maxlength=\"32\" /></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname\" value=\"".htmlspecialchars($r->lastname)."\" size=\"32\" maxlength=\"32\" /></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Position")."</td><td><input type=\"text\" name=\"position\" value=\"".htmlspecialchars($r->position)."\" size=\"32\" maxlength=\"32\" /></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Phone (Work)")."</td><td><input type=\"text\" name=\"phonework\" value=\"".htmlspecialchars($r->phonework)."\" size=\"16\" maxlength=\"16\" /></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Phone (Cell)")."</td><td><input type=\"text\" name=\"phonecell\" value=\"".htmlspecialchars($r->phonecell)."\" size=\"16\" maxlength=\"16\" /></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Phone (Home)")."</td><td><input type=\"text\" name=\"phonehome\" value=\"".htmlspecialchars($r->phonehome)."\" size=\"16\" maxlength=\"16\" /></td></tr>\n";
|
||||
|
@ -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 "<tr><td>".i18n("Prize Description")."</td><td></td><td><input type=\"text\" id=\"prize\" name=\"prize\" value=\"".htmlspecialchars($r->prize)."\" size=\"40\" maxlength=\"128\" /><script type=\"text/javascript\">translateButton('prize');</script></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Cash Amount")."</td><td>\$</td><td><input type=\"text\" name=\"cash\" value=\"".htmlspecialchars($r->cash)."\" 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("Prize Value")."</td><td>\$</td><td><input type=\"text\" name=\"value\" value=\"".htmlspecialchars($r->value)."\" 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("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\">";
|
||||
@ -171,8 +173,9 @@
|
||||
echo "<tr>";
|
||||
echo " <th>".i18n("Order")."</th>";
|
||||
echo " <th>".i18n("Prize Description")."</th>";
|
||||
echo " <th>".i18n("Cash Amount")."</th>";
|
||||
echo " <th>".i18n("Scholarship Amount")."</th>";
|
||||
echo " <th>".i18n("Cash")."</th>";
|
||||
echo " <th>".i18n("Scholarship")."</th>";
|
||||
echo " <th>".i18n("Value")."</th>";
|
||||
echo " <th>".i18n("# of Prizes")."</th>";
|
||||
echo " <th>Actions</th>";
|
||||
echo "</tr>\n";
|
||||
@ -191,6 +194,10 @@
|
||||
if($r->scholarship) echo "\$$r->scholarship";
|
||||
else echo " ";
|
||||
echo " </td>";
|
||||
echo " <td align=\"right\">";
|
||||
if($r->value) echo "\$$r->value";
|
||||
else echo " ";
|
||||
echo " </td>";
|
||||
echo " <td align=\"center\">$r->number</td>\n";
|
||||
echo " <td align=\"center\">";
|
||||
echo "<a href=\"award_prizes.php?award_awards_id=$award_awards_id&action=edit&edit=$r->id\"><img border=\"0\" src=\"".$config['SFIABDIRECTORY']."/images/16/edit.".$config['icon_extension']."\"></a>";
|
||||
|
@ -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`;
|
||||
|
Loading…
Reference in New Issue
Block a user