$_GET["withtemplate"] = ""; } $database = new PluginDatabasesDatabase(); $database_item = new PluginDatabasesDatabase_Item(); if (isset($_POST["add"])) { $database->check(-1, CREATE, $_POST); $newID = $database->add($_POST); if ($_SESSION['glpibackcreated']) { Html::redirect($web->getFormURL() . "?id=" . $newID); } Html::back(); } else { if (isset($_POST["delete"])) { $database->check($_POST['id'], DELETE); $database->delete($_POST); $database->redirectToList(); } else { if (isset($_POST["restore"])) { $database->check($_POST['id'], PURGE); $database->restore($_POST); $database->redirectToList(); } else { if (isset($_POST["purge"])) { $database->check($_POST['id'], PURGE); $database->delete($_POST, 1); $database->redirectToList(); } else { if (isset($_POST["update"])) { $database->check($_POST['id'], UPDATE); $database->update($_POST); Html::back();