grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026. -------------------------------------------------------------------------- */ /** @file * @brief */ if (strpos($_SERVER['PHP_SELF'],"dropdownTicketCategories.php")) { include ('../inc/includes.php'); header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); } else if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } $opt = array('entity' => $_POST["entity_restrict"]); if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") { $opt['condition'] = "`is_helpdeskvisible`='1' AND "; } else { $opt['condition'] = ''; } $currentcateg = new ItilCategory(); $currentcateg->getFromDB($_POST['value']); if ($_POST["type"]) { switch ($_POST['type']) { case Ticket::INCIDENT_TYPE : $opt['condition'].= " `is_incident`='1'"; if ($currentcateg->getField('is_incident') == 1) { $opt['value'] = $_POST['value']; } break; case Ticket::DEMAND_TYPE: $opt['condition'].= " `is_request`='1'"; if ($currentcateg->getField('is_request') == 1) { $opt['value'] = $_POST['value']; } break; } } ItilCategory::dropdown($opt); ?>