. * --------------------------------------------------------------------- */ include ('../inc/includes.php'); if (isset($_GET['full_page_tab'])) { Html::header('Only tab for debug', $_SERVER['PHP_SELF']); } else { header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); } // Not possible to check right for anonymous FAQ //Session::checkLoginUser(); if (!isset($_GET['_glpi_tab'])) { exit(); } if (!isset($_GET['_itemtype']) || empty($_GET['_itemtype'])) { exit(); } if (!isset($_GET["sort"])) { $_GET["sort"] = ""; } if (!isset($_GET["order"])) { $_GET["order"] = ""; } if (!isset($_GET["withtemplate"])) { $_GET["withtemplate"] = ""; } if ($item = getItemForItemtype($_UGET['_itemtype'])) { if ($item->get_item_to_display_tab) { // No id if ruleCollection but check right if ($item instanceof RuleCollection) { if (!$item->canList()) { exit(); } } else if (!isset($_GET["id"])|| $item->isNewID($_GET["id"])) { if (!$item->can(-1, CREATE, $_GET)) { exit(); } } else if (!$item->can($_GET["id"], READ)) { exit(); } } } $notvalidoptions = ['_glpi_tab', '_itemtype', 'sort', 'order', 'withtemplate']; $options = $_GET; foreach ($notvalidoptions as $key) { if (isset($options[$key])) { unset($options[$key]); } } if (isset($options['locked'])) { ObjectLock::setReadOnlyProfile(); } CommonGLPI::displayStandardTab($item, $_UGET['_glpi_tab'], $_GET["withtemplate"], $options); if (isset($_GET['full_page_tab'])) { echo "