user = $auth->getIdentity(); $this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all'); if($this->getRequest()->getActionName() != 'search' and isset($_SESSION['recherche']['giant']['page'])) unset($_SESSION['recherche']['giant']['page']); } public function indexAction() { $rechercheParams = new RechercheHistorique(); if (count($rechercheParams->liste()) > 0) { $recherche = $rechercheParams->item(0); $type = $recherche['type']; $params = $recherche['params']; } $siret = $params['siret']; if(empty($siret)) $this->_forward('search'); else $this->_forward('identite'); } public function searchAction() { $rechercheParams = new RechercheHistorique(); if (count($rechercheParams->liste()) > 0) { $recherche = $rechercheParams->item(0); $type = $recherche['type']; $params = $recherche['params']; } $search = new GiantRechercheController($params['pays']); $result = $search->Liste($params, $this->getRequest()->getParam('page')); $this->view->label = $search->Search->getLabelDesc(); $this->view->labelResults = $search->Search->getLabelResults; $this->view->pays = $params['pays']; $this->view->currentPage = $search->Search->getCurrentPage(); $this->view->userMaxResult = $this->user->nbReponses; $this->view->resultats = $result; $this->view->referer = $search->Search->getQuery(); } public function identiteAction() { $rechercheParams = new RechercheHistorique(); if (count($rechercheParams->liste()) > 0) { $recherche = $rechercheParams->item(0); $type = $recherche['type']; $params = $recherche['params']; } $identite = new GiantRechercheController($params['pays']); $result = $identite->Identite($this->getRequest()->getParam('companyId'), $this->getRequest()->getParam('pays')); $ListeRapport = $identite->ListeRapport($this->getRequest()->getParam('companyId')); $this->view->resultats = $result; $this->view->listeRapport = $ListeRapport; } public function __destruct() { unset($_SESSION['recherche']['giant']); } }