From f9b6ef4ab09fd70db3cbdf0eab39e2fe6ecc976f Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 6 Mar 2015 16:54:33 -0500 Subject: [PATCH] Contact updates for search in admin --- Toolkit/LeadManager/Contact.php | 28 ++++++++++- admin/Contact/contact_setup.inc | 83 ++++++++++++++++--------------- admin/Contact/index.phtml | 16 ++++++ admin/Contact/query_contact.phtml | 6 +++ 4 files changed, 92 insertions(+), 41 deletions(-) diff --git a/Toolkit/LeadManager/Contact.php b/Toolkit/LeadManager/Contact.php index 7e00306..a7e5f4c 100644 --- a/Toolkit/LeadManager/Contact.php +++ b/Toolkit/LeadManager/Contact.php @@ -47,6 +47,8 @@ class Toolkit_LeadManager_Contact private $_eclub; private $_big_giveaway; private $_golfvacation; + private $_gender; + private $_handicap; /** * Contructor for class Contact Objects @@ -69,7 +71,9 @@ class Toolkit_LeadManager_Contact ->setGiveaway($giveaway) ->setGolfvacation($golfvacation) ->setEclub($eclub) - ->setBig_giveaway($big_giveaway); + ->setBig_giveaway($big_giveaway) + ->setGender($gender) + ->setHandicap($handicap); if ($id) { $this->setId($id); } @@ -364,5 +368,27 @@ class Toolkit_LeadManager_Contact return $this; } + function getGender() + { + return $this->_gender; + } + + function getHandicap() + { + return $this->_handicap; + } + + function setGender($gender) + { + $this->_gender = $gender; + return $this; + } + + function setHandicap($handicap) + { + $this->_handicap = $handicap; + return $this; + } + } diff --git a/admin/Contact/contact_setup.inc b/admin/Contact/contact_setup.inc index 29f7502..97001b3 100755 --- a/admin/Contact/contact_setup.inc +++ b/admin/Contact/contact_setup.inc @@ -2,11 +2,11 @@ /** * contact_setup.phtml -* -* Config setting for the admin contact application -* +* +* Config setting for the admin contact application +* * PHP versions 4 and 5 -* +* * @category Toolkit * @package Contacts * @author Steve Sutton @@ -16,7 +16,7 @@ * @link <> */ extract($_REQUEST); -// The Contact Type array is now is one location and is used by the +// The Contact Type array is now is one location and is used by the // Toolkit_Contacts_Admin_EditContact class $conf = new Config; $contactRoot =& $conf->parseConfig( @@ -67,7 +67,7 @@ $DB = new GLM_DB(); if (!defined("HTML_EMAIL")) { /** - * HTML_EMAIL = ON or OFF + * HTML_EMAIL = ON or OFF */ define("HTML_EMAIL", "ON"); } @@ -83,18 +83,18 @@ if (!defined("NEWSLETTER")) { /** * NEWSLETTER 1 or true will allow newsletters */ - define("NEWSLETTER", 1); //bool- does the contact database mail out a newsletter? + define("NEWSLETTER", 1); //bool- does the contact database mail out a newsletter? } if (!function_exists("template_read")) { /** * Short description for function - * + * * Long description (if any) ... - * + * * @param unknown $template Parameter description (if any) ... - * + * * @return string Return description (if any) ... */ function template_read($template) @@ -116,12 +116,12 @@ if (!function_exists("template_read")) { * insert an array into another array after position. * You can specify an associative array key or index key * to dictact the positioning of the new array -* +* * @param array &$array array to be used * @param unknown $position position to add array * @param unknown $insert_array array to be inserted -* -* @return void +* +* @return void */ function array_insert(&$array, $position, $insert_array) { @@ -144,12 +144,12 @@ if (!function_exists("explode_template")) { /** * Short description for function - * + * * Long description (if any) ... - * + * * @param unknown $template Parameter description (if any) ... * @param unknown $data Parameter description (if any) ... - * + * * @return unknown Return description (if any) ... */ function explode_template($template, $data) @@ -167,12 +167,12 @@ if (!function_exists("template_replacement")) { /** * Short description for function - * + * * Long description (if any) ... - * + * * @param unknown $template Parameter description (if any) ... * @param array $fieldarr Parameter description (if any) ... - * + * * @return unknown Return description (if any) ... */ function template_replacement($template, $fieldarr) @@ -191,12 +191,12 @@ if (!function_exists("add_image")) { /** * Short description for function - * + * * Long description (if any) ... - * + * * @param string $image Parameter description (if any) ... * @param string $align Parameter description (if any) ... - * + * * @return string Return description (if any) ... */ function add_image($image, $align) @@ -225,7 +225,7 @@ if (is_array($cData)) { $int_array[$value['id']] = $value['header']; } } -$contactTypesSetup = +$contactTypesSetup = $contactRoot->getItem('section', 'contact_types') ->toArray(); $cType = $contactTypesSetup['contact_types']; @@ -233,20 +233,20 @@ $cType = $contactTypesSetup['contact_types']; /** * Short description for function -* +* * Long description (if any) ... -* +* * @param string $name Parameter description (if any) ... * @param string $search_where Parameter description (if any) ... -* +* * @return string Return description (if any) ... */ function search_where($name, $search_where) { $out = ' '; return $out; @@ -256,19 +256,19 @@ function search_where($name, $search_where) /** * Short description for function -* +* * Long description (if any) ... -* +* * @param string $name Parameter description (if any) ... * @param string $search_type Parameter description (if any) ... -* +* * @return string Return description (if any) ... */ function search_type($name, $search_type) { $out = ' '; @@ -279,19 +279,19 @@ function search_type($name, $search_type) /** * Short description for function -* +* * Long description (if any) ... -* +* * @param string $name Parameter description (if any) ... * @param string $search_type Parameter description (if any) ... -* +* * @return string Return description (if any) ... */ function search_bool($name, $search_type) { $out = ' '; @@ -302,11 +302,11 @@ function search_bool($name, $search_type) /** * Short description for function -* +* * Long description (if any) ... -* +* * @param unknown $field Parameter description (if any) ... -* +* * @return boolean Return description (if any) ... */ function interest($field) @@ -427,7 +427,9 @@ $sequence = $contactRoot->getItem('section', 'conf') * Description for define */ define("SEQUENCE", $sequence); - +$config = parse_ini_file(BASE .'Toolkit/Contacts/config.ini', true); +$gender_sel = $config['gender']; +$handicap_sel = $config['handicap']; /** * Description for define */ @@ -452,6 +454,7 @@ $DB_fields[] = array("name" => "phone", "title" => "Phone", "typ $DB_fields[] = array("name" => "fax", "title" => "Fax", "type" => "text"); $DB_fields[] = array("name" => "email", "title" => "Email", "type" => "text"); $DB_fields[] = array("name" => "mail_ok", "title" => "Mail Ok?", "type" => "radio"); +$DB_fields[] = array("name" => "golfvacation", "title" => "Golf Vacation Planners?", "type" => "radio"); $DB_fields[] = array("name" => "interest", "title" => "Interest", "type" => "interest"); $DB_fields[] = array("name" => "contact_type", "title" => "Contact Type", "type" => "drop", "drop" => $cType); diff --git a/admin/Contact/index.phtml b/admin/Contact/index.phtml index 871b9c9..0428884 100755 --- a/admin/Contact/index.phtml +++ b/admin/Contact/index.phtml @@ -195,6 +195,22 @@ GLM_TOOLBOX::html_nav_table($nav,$navWidth);