_helper->layout->setLayout('admin'); $this->_authService = new App_Service_Auth(); $this->_genericModel = new Application_Model_Generic(); $this->_configs = new App_Service_ConfigManager(); $this->_ipManager = new App_Service_IpManager(); $this->_parametriSito = new App_Service_JsonConfiguration('parametri_sito'); $this->_datiAziendali = new App_Service_JsonConfiguration('dati_aziendali'); $this->_MENUITEM = 'dashboard'; $this->_PAGETITLE = 'DashBoard'; $this->_ICONTITLE = 'fa-dashboard'; $this->_SECONDLEVEL = null; $this->_SECONDLEVEL_ACTION = null; $this->_EVENTLOADER = FALSE; } public function preDispatch() { $this->view->moduleName = 'monitoring'; if ($this->_getParam('update')) { $this->view->update = $this->_getParam('update'); } else { $this->view->update = '0'; } if ($this->_getParam('err')) { $this->view->error = $this->_getParam('err'); } else { $this->view->error = '0'; } //Controllo delle notifiche $nNot = $this->_genericModel->countFiltered('Errorlog', array('state = ?' => 1)); $this->view->notification = $nNot; if ($nNot > 0) { $this->view->notificationlist = $this->_genericModel->customQuery("SELECT COUNT(*) as tot, section, state FROM `error_log` WHERE state = '1' GROUP BY section"); } $this->_SIDEBAR_COLLAPSED = $_COOKIE['ui_sidebar_collapsed']; $this->view->enableTestSdk = $this->_ipManager->controllaAbilitazioneTestSdk(); } public function postDispatch() { $this->view->action = $this->getRequest()->getActionName(); $this->view->menu = $this->_MENUITEM; $this->view->pageTitle = $this->_PAGETITLE; $this->view->iconTitle = $this->_ICONTITLE; $this->view->secondLevel = $this->_SECONDLEVEL; $this->view->secondLevelAction = $this->_SECONDLEVEL_ACTION; $this->view->sideBarCollapsed = $this->_SIDEBAR_COLLAPSED; $this->view->eventLoader = $this->_EVENTLOADER; $this->view->parametriSito = $this->_parametriSito->getAllParams(); $this->view->datiAziendali = $this->_datiAziendali->getAllParams(); } public function logoutAction() { $this->_authService->clear(); return $this->_helper->redirector('index', 'index', 'default'); } public function indexAction() { } /*=============================================================================================== * =========================== FUNZIONI PRIVATE DEL CONTROLLER ========================= * =============================================================================================*/ public function getMainModel() { return $this->_genericModel; } } //Close Class