* Tab status */ $hostState = array("UP", "DOWN", "UNREACHABLE", "UNREACHABLE", "UNREACHABLE"); $hgState = array("OK", "NON-OK"); $serviceState = array("OK", "WARNING", "CRITICAL", "UNKNOWN", "PENDDING"); $tabColorHosts = array("green", "red", "orange"); $tabColorHostGroup = array("green", "red"); $tabColorServices = array("green", "orange", "red", "grey", "grey"); /* * Call DB connector */ $pearDB = new CentreonDB(); /* * Init Centreon-broker obj */ $brokerObj = new CentreonBroker($pearDB); if ($brokerObj->getBroker() == "ndo") { $pearDBndo = new CentreonDB("ndo"); $ndo_prefix = getNDOPrefix(); $gmapObj = new centreonGmapNDO($pearDB, $pearDBndo, $ndo_prefix); $gmapObj->init(); } else { $pearDBC = new centreonDB("centstorage"); $gmapObj = new centreonGmapBroker($pearDB, $pearDBC); $gmapObj->init(); } /* * Analyse User Profile */ $session = htmlentities($_GET["session_id"], ENT_QUOTES); $DBRESULT = $gmapObj->_db->query("SELECT user_id FROM session WHERE session_id = '{$session}'");
/** * Restart Centreon broker */ protected function restartCentreonBroker() { if (file_exists($this->centreon_path . "/www/class/centreonBroker.class.php")) { require_once $this->centreon_path . "/www/class/centreonBroker.class.php"; $brk = new CentreonBroker($this->_DB); if ($brk->getBroker() == 'broker') { $brk->reload(); } } }