public function indexAction() { try { $cMapper = new Gyuser_Model_ClientTypesDataMapper(); $cList = $cMapper->fetchAll(); $adminObj = new Gyuser_Model_Admin(); $adminObj->setId(1); $adminMapper = new Gyuser_Model_AdminDataMapper(); $adminObj = $adminMapper->find($adminObj); $userType = new Gyuser_Model_UserType(); $this->view->admin = $adminObj; $this->view->authDetail = $this->authDetail; } catch (Exception $e) { echo $e; } }
public function indexAction() { try { $sessionNamespace = new Zend_Session_Namespace(); if ($sessionNamespace->loginAuth == true) { $request = $this->getRequest(); //$userType = new Gyuser_Model_UserType (); $uMapper = new Gyuser_Model_UserDataMapper(); if (!is_null($request->filter)) { $filter = $request->filter; if ($request->filter == 'activos' || $request->filter == 'cobranza' || $request->filter == 'potenciales' || $request->filter == 'todos') { $personArr = $uMapper->getClientsByType($request->filter); } } else { $filter = 'activos'; $personArr = $uMapper->getClientsByType('activos'); } $this->view->filter = $filter; $this->view->pArr = $personArr; $cMapper = new Gyuser_Model_ClientTypesDataMapper(); $cList = $cMapper->fetchAll(); $this->view->cList = $cList; $contactMapper = new Gyuser_Model_ContactPointDataMapper(); $contactResult = $contactMapper->fetchAll(); $this->view->contact = $contactResult; $oMapper = new Gyuser_Model_OperatorDataMapper(); $opeObj = $oMapper->fetchAll(); $this->view->opeArr = $opeObj; $stateBDMapper = new Gyuser_Model_StateBDDataMapper(); $stateBD = $stateBDMapper->fetchAll(); $this->view->stateBD = $stateBD; //$caveMapper = new Gyuser_Model_OtherCavesDataMapper (); //$cave = $caveMapper->fetchAll(); //$provMapper = new Gyuser_Model_ProvidersDataMapper(); //$providers = $provMapper->getProviders(); $adminObj = new Gyuser_Model_Admin(); $adminObj->setId(1); $adminMapper = new Gyuser_Model_AdminDataMapper(); $adminObj = $adminMapper->find($adminObj); $this->view->admin = $adminObj; $colMapper = new Gyuser_Model_ColegasDataMapper(); $this->view->colegas = $colMapper->fetchAll(); $oprStMapper = new Gyuser_Model_OperationsStateDataMapper(); $this->view->operationsState = $oprStMapper->fetchAll(); $plansMapper = new Gyuser_Model_PlansDataMapper(); $this->view->plans = $plansMapper->fetchAll(); $interestsMapper = new Gyuser_Model_InterestsDataMapper(); $this->view->interestsList = $interestsMapper->fetchAll(); $tasasMapper = new Gyuser_Model_TasasDataMapper(); $this->view->tasasList = $tasasMapper->fetchAll(); //$this->view->cave = $cave; //$this->view->providers = $providers; } else { $this->_helper->redirector('login', 'index', 'gyuser'); } } catch (Exception $e) { echo $e; } }