grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026. -------------------------------------------------------------------------- */ /** @file * @brief */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /** * Central class **/ class Central extends CommonGLPI { static function getTypeName($nb=0) { // No plural return __('Standard interface'); } function defineTabs($options=array()) { $ong = array(); $this->addStandardTab(__CLASS__, $ong, $options); return $ong; } function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { if ($item->getType() == __CLASS__) { $tabs[1] = __('Personal View'); $tabs[2] = __('Group View'); $tabs[3] = __('Global View'); $tabs[4] = _n('RSS feed', 'RSS feeds', Session::getPluralNumber()); return $tabs; } return ''; } static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { if ($item->getType() == __CLASS__) { switch ($tabnum) { case 1 : // all $item->showMyView(); break; case 2 : $item->showGroupView(); break; case 3 : $item->showGlobalView(); break; case 4 : $item->showRSSView(); break; } } return true; } /** * Show the central global view **/ static function showGlobalView() { $showticket = Session::haveRight("ticket", Ticket::READALL); $showproblem = Session::haveRight("problem", Problem::READALL); echo "
";
echo "
| ";
if (Session::haveRight("logs", READ)) {
echo ""; //Show last add events Event::showForUser($_SESSION["glpiname"]); echo " | "; } echo "
| "; Html::displayTitle($CFG_GLPI['root_doc']."/pics/warning.png", $message, $message); echo " | |||
|---|---|---|---|
| "; $message = sprintf(__('For security reasons, please remove file: %s'), "install/install.php"); Html::displayTitle($CFG_GLPI['root_doc']."/pics/warning.png", $message, $message); echo " | |||
| "; $message = sprintf(__('SQL strict mode is not fully enabled, recommended for development: %s'), $comment); Html::displayTitle($CFG_GLPI['root_doc']."/pics/warning.png", $message, $message); echo " | |||
| "; $message = __('The following SQL tables are marked as crashed:'); $message.= implode(',', $tables); Html::displayTitle($CFG_GLPI['root_doc']."/pics/warning.png", $message, $message); echo " | |||
| "; Html::displayTitle($CFG_GLPI['root_doc']."/pics/warning.png", __('SQL replica: read only'), __('SQL replica: read only')); echo " | |||
| ";
echo "
| ||
| "; RSSFeed::showListForCentral(); echo " | "; if (RSSFeed::canView()) { RSSFeed::showListForCentral(false); } else { echo " "; } echo " |
| ";
echo "
|