// ---------------------------------------------------------------------- // Original Author of file: // Purpose of file: // ---------------------------------------------------------------------- define('GLPI_ROOT', '..'); include GLPI_ROOT . "/inc/includes.php"; checkRight("ocsng", "w"); $ocs = new OcsServer(); if (!isset($_GET["id"])) { $_GET["id"] = ""; } commonHeader($LANG['ocsng'][0], $_SERVER['PHP_SELF'], "config", "ocsng"); //Delete template or server if (isset($_POST["delete"])) { $ocs->delete($_POST); $ocs->redirectToList(); //Update server } else { if (isset($_POST["update"])) { $ocs->update($_POST); glpi_header($_SERVER["HTTP_REFERER"]); //Update server } else { if (isset($_POST["update_server"])) { $ocs->update($_POST); glpi_header($_SERVER["HTTP_REFERER"]); //Add new server } else { if (isset($_POST["add"])) { $newid = $ocs->add($_POST); glpi_header($_SERVER["HTTP_REFERER"]);