view->headLink()->appendStylesheet('/themes/default/styles/dashboard.css', 'all'); $this->view->headScript()->appendFile('/themes/default/scripts/dashboard.js', 'text/javascript'); } public function indexAction() { $object = new Object_Dashboard(); $this->view->comptages = $object->index(); } public function menuAction() { // action body } public function ciblagesAction() { $object = new Object_Dashboard(); $request = $this->getRequest(); $assigns = $object->ciblage($request->getParam('page', 1)); $this->view->ciblages = $assigns['ciblages']; $this->view->nbCiblage = $assigns['nbCiblage']; } public function ciblagedetailAction() { $object = new Object_Dashboard(); $request = $this->getRequest(); $comptage = $object->ciblagedetail($request->getParam('id')); $this->view->criteres = $comptage['criteres']; $this->view->comptages = $comptage['comptages']; } public function rcomptageAction() { $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $request = $this->getRequest(); $q = $request->getParam('q'); $auth = Zend_Auth::getInstance(); $user = $auth->getIdentity(); $criteresM = new Table_Criteres(); $sql = $criteresM->select() ->from($criteresM, array('id', 'reference', "DATE_FORMAT(dateAjout, '%d/%m/%Y') as date")) ->where("idClient = ?", $user->idClient) ->where("login = ?", $user->username) ->where("reference LIKE ?", $q.'%'); $rows = $criteresM->fetchAll($sql); if (count($rows)>0){ $separator = " , "; foreach ($rows as $item) { $output[] = array( 'label' => $item->reference . $separator . $item->date, 'value' => $item->reference, 'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblagedetail', 'id'=>$item->id)), ); } } echo json_encode($output); } public function configurationAction() { // action body } /** * Liste des enrichissements */ public function enrichissementsAction() { } /** * Détail d'un enrichissment */ public function enrichissementAction() { } }