Add salutation field to award contacts

This commit is contained in:
james 2006-10-16 03:36:39 +00:00
parent 671778d5ff
commit 4a5bc27532
3 changed files with 7 additions and 2 deletions

View File

@ -71,6 +71,7 @@
$exec="UPDATE award_contacts SET ".
"salutation='".mysql_escape_string(stripslashes($_POST['salutation']))."', ".
"firstname='".mysql_escape_string(stripslashes($_POST['firstname']))."', ".
"lastname='".mysql_escape_string(stripslashes($_POST['lastname']))."', ".
"position='".mysql_escape_string(stripslashes($_POST['position']))."', ".
@ -121,6 +122,7 @@
echo "<input type=\"hidden\" name=\"id\" value=\"".$_GET['edit']."\">\n";
echo "<table>\n";
echo "<tr><td>".i18n("Salutation")."</td><td><input type=\"text\" name=\"salutation\" value=\"".htmlspecialchars($r->salutation)."\" size=\"4\" maxlength=\"8\" /></td></tr>\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";
@ -159,7 +161,9 @@
while($r=mysql_fetch_object($q))
{
echo "<tr>\n";
echo " <td>$r->firstname $r->lastname</td>\n";
echo " <td>";
if($r->salutation) echo $r->salutation." ";
echo "$r->firstname $r->lastname</td>\n";
echo " <td>";
if($r->email)
{

View File

@ -1 +1 @@
27
28

1
db/db.update.28.sql Normal file
View File

@ -0,0 +1 @@
ALTER TABLE `award_contacts` ADD `salutation` VARCHAR( 8 ) NOT NULL AFTER `award_sponsors_id` ;