PluginOcsinventoryngOcsServer::linkComputer($key["ocsid"], $_SESSION["plugin_ocsinventoryng_ocsservers_id"], $key["computers_id"]); Html::redirect($_SERVER['PHP_SELF']); } else { Html::displayProgressBar(400, 100); unset($_SESSION["ocs_link"]); echo "<div class='center b'>" . __('Successful importation') . "<br>"; echo "<a href='" . $_SERVER['PHP_SELF'] . "'>" . __('Back') . "</a></div>"; } } if (!isset($_POST["import_ok"])) { if (!isset($_GET['check'])) { $_GET['check'] = 'all'; } if (!isset($_GET['start'])) { $_GET['start'] = 0; } PluginOcsinventoryngOcsServer::manageDeleted($_SESSION["plugin_ocsinventoryng_ocsservers_id"]); PluginOcsinventoryngOcsServer::showComputersToAdd($_SESSION["plugin_ocsinventoryng_ocsservers_id"], $_SESSION["change_import_mode"], $_GET['check'], $_GET['start'], $_SESSION['glpiactiveentities'], 1); } else { if (isset($_POST['tolink']) && count($_POST['tolink']) > 0) { $_SESSION["ocs_link_count"] = 0; foreach ($_POST['tolink'] as $ocsid => $computers_id) { if ($computers_id > 0) { $_SESSION["ocs_link"][] = array('ocsid' => $ocsid, 'computers_id' => $computers_id); $_SESSION["ocs_link_count"]++; } } } Html::redirect($_SERVER['PHP_SELF']); } Html::footer();