예제 #1
0
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"]);
                //Other
            } else {
                $ocs->showForm($_GET["id"]);
            }
        }
    }
}
commonFooter();