grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026. -------------------------------------------------------------------------- */ /** @file * @since version 0.84 * @brief */ include ('../inc/includes.php'); header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); Session::checkRight("networking", UPDATE); // Make a select box if (class_exists($_POST["itemtype"])) { $table = getTableForItemType($_POST["itemtype"]); $rand = mt_rand(); $toupdate = array('value_fieldname' => 'item', 'to_update' => "results_item_$rand", 'url' => $CFG_GLPI["root_doc"]."/ajax/dropdownConnectNetworkPort.php", 'moreparams' => array('networkports_id' => $_POST['networkports_id'], 'itemtype' => $_POST['itemtype'], 'myname' => $_POST['myname'], 'instantiation_type' => $_POST['instantiation_type'])); $params = array('rand' => $rand, 'name' => "items", 'entity' => $_POST["entity_restrict"], // Beware: '\n' inside condition is transformed to 'n' in SQL request // so don't cut this SQL request ! 'condition' => "(`id` in (SELECT `items_id`". "FROM `glpi_networkports`". "WHERE `itemtype` = '".$_POST["itemtype"]."'". "AND `instantiation_type`". "= '".$_POST['instantiation_type']."'))", 'toupdate' => $toupdate); Dropdown::show($_POST['itemtype'], $params); echo ""; echo "\n"; } ?>