$soft = new Software(); if (isset($_POST["add"])) { $soft->check(-1, 'w', $_POST); $newID = $soft->add($_POST); Event::log($newID, "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][20] . " " . $_POST["name"] . "."); glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_POST["delete"])) { $soft->check($_POST["id"], 'd'); $soft->delete($_POST); Event::log($_POST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][22]); $soft->redirectToList(); } else { if (isset($_POST["restore"])) { $soft->check($_POST["id"], 'd'); $soft->restore($_POST); Event::log($_POST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][23]); $soft->redirectToList(); } else { if (isset($_REQUEST["purge"])) { $soft->check($_REQUEST["id"], 'd'); $soft->delete($_REQUEST, 1); Event::log($_REQUEST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][24]); $soft->redirectToList(); } else { if (isset($_POST["update"])) { $soft->check($_POST["id"], 'w'); $soft->update($_POST); Event::log($_POST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][21]); glpi_header($_SERVER['HTTP_REFERER']); } else {