From: Steve Sutton Date: Tue, 9 Feb 2010 16:02:23 +0000 (+0000) Subject: adding contact_type X-Git-Tag: v1.0.0~95 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=28913c68bcf615b348a0c9d7c2e869266ed8e6ba;p=web%2FTroutCreek.git adding contact_type --- diff --git a/admin/Contact/contact_setup.inc b/admin/Contact/contact_setup.inc index 2a79eea..bf131cc 100755 --- a/admin/Contact/contact_setup.inc +++ b/admin/Contact/contact_setup.inc @@ -248,12 +248,21 @@ else $DB_fields[] = array( name => "interest", title => "Interest", type=> "interest"); $DB_fields[] = array( name => "questions", title => "Additional Questions",type => "desc"); $DB_fields[] = array( name => "mail_ok", title => "Mail Ok?", type => "radio"); + $cType = array( + ''=>'', + 1 => 'Reservation Request', + 2 => 'E-News' + ); + $DB_fields[] = array("name" => "contact_type", "title" => "Contact Type", "type" => "drop", "drop" => $cType); //$DB_fields[] = array( name => "contestant",title => "Contestant?", type => "radio"); // $fields are used for building the query page foreach($DB_fields as $key=>$value){ - if($value['type'] == "text" || $value['type'] == "array_drop") + if ($value['type'] == "text" || $value['type'] == "array_drop") { $fields[$value['name']] = $value['title']; + } elseif ( $value['type'] == "drop") { + $dropdowns[$value['name']] = array('title' => $value['title'], 'drop' => $value['drop']); + } } $fields["questions"] = "Questions"; $p_date_from = contact_date_entry("","","","fp_month","fp_day","fp_year"); diff --git a/admin/Contact/edit_contact.phtml b/admin/Contact/edit_contact.phtml index 1a94398..fd77c21 100755 --- a/admin/Contact/edit_contact.phtml +++ b/admin/Contact/edit_contact.phtml @@ -152,6 +152,16 @@ foreach($DB_fields as $key=>$value) { echo ">No"; echo ""; } + elseif ( $value['type'] == 'drop' ) + { + echo ''.$value[title].''; + echo ''; + unset($value['drop']['']); + $val = explode(":",ereg_replace("^:|:$","",trim($row[$value['name']]))); + $date_entry = GLM_TOOLBOX::build_picklist($value['name'].'[]',$value['drop'],$val, 'multiple', 0, null, 5); + echo $date_entry.''; + echo ''; + } elseif($value[type] == "array_drop"){ echo "$value[title]:"; echo ""; diff --git a/admin/Contact/index.phtml b/admin/Contact/index.phtml index 7f9f4ad..df11aad 100755 --- a/admin/Contact/index.phtml +++ b/admin/Contact/index.phtml @@ -202,6 +202,8 @@ else