'doList'); var $types = array('mncar', 'affiliate'); var $type = null; function MemberRosterAffiliate(&$Doc, &$DBObj) { $this->MemberRoster($Doc, $DBObj, 'affiliate'); } function doList() { $this->_saveBackUrl(); $this->DBObj->_filterFields = array("CONCAT(Member.last_name, ', ', Member.first_name, Member.middle_initial, IF(Member.middle_initial = '', '.', ''))", 'Company.name', 'Member.primary_phone'); $this->DBObj->filter['search_type'] = 'individual'; $filterForm = $this->getFilterForm(); $this->DBObj->setFilter($filterForm->getElementValue('query')); $filterForm->exec(); require_once 'app/Member/Roster/RosterList.php'; $DB_List = new RosterList($this->Doc, $this->DBObj, $this->functionalFields, $this->type); $DB_List->businessTypes = $_REQUEST['type_of_business_id']; $this->_doListBind($DB_List); $DB_List->exec(); return true; } function getFilterForm() { $form = $this->_getBaseForm('get'); $form->tpl = BASE_PATH . '/tpl/Member/Roster/Affiliate/filter.tpl'; $form->setRendType(FORM_RENDERER_ARRAY_SMARTY); $form->addElement('text', 'query', '', array('class' => 'inp_search', 'style' => 'width: 300px;')); $form->addElement('submit', 'submit_btn', 'Search', array( 'class' => 'btn') ); $form->addElement('button', 'cancel_btn', 'Reset', array( 'class' => 'btn' , 'onclick' => "document.location.href='".Constant::get('BASE_URL').'/'.CURR_PAGE."'" )); $elements = array(); $separators = array(); $typeOfBusinessList = $this->DBObj->getDTypeOfBusiness4Select( 'sorter', "id IN ( SELECT DISTINCT type_of_business_id FROM {$this->DBObj->db->tblMember2TypeOfBusiness} m2tb INNER JOIN {$this->DBObj->db->tblMember} m ON m2tb.member_id = m.id WHERE 1 AND m.id_mncar_l_type IN (2, 3, 4) AND m.id_mncar_l_status IN (1, 3) )" ); $otherExist = $this->DBObj->db->query( "SELECT COUNT(*) FROM {$this->DBObj->db->tblMember} m WHERE other_type_of_business<>'' AND m.id_mncar_l_type IN (2, 3, 4) AND m.id_mncar_l_status IN (1, 3) " )->fetchOne(); if ($otherExist) { $typeOfBusinessList[-1] = 'Other'; } if (count($typeOfBusinessList)) { $itemPerColumn = ceil((count($typeOfBusinessList))/3); for ($i = 0; $i < 3; $i++) { $height = ceil(19.5 * $itemPerColumn - 5.5); $checkboxList = array_slice($typeOfBusinessList, $itemPerColumn*$i, $itemPerColumn, true); if (count($checkboxList)) { $elements[] = $form->createElement('static', 'static_area_start' . $i, '', '