Event::log($newID, "simcard", 4, "inventory", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $_POST["name"])); } Html::back(); // delete a simcard } else { if (isset($_POST["delete"])) { $simcard->check($_POST['id'], DELETE); $ok = $simcard->delete($_POST); if ($ok) { Event::log($_POST["id"], "simcard", 4, "inventory", sprintf(__('%s deletes an item'), $_SESSION["glpiname"])); } $simcard->redirectToList(); } else { if (isset($_POST["restore"])) { $simcard->check($_POST['id'], PURGE); if ($simcard->restore($_POST)) { Event::log($_POST["id"], "simcard", 4, "inventory", sprintf(__('%s restores the item'), $_SESSION["glpiname"])); } $simcard->redirectToList(); } else { if (isset($_REQUEST["purge"])) { $simcard->check($_REQUEST['id'], PURGE); if ($simcard->delete($_REQUEST, 1)) { Event::log($_POST["id"], "simcard", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"])); } $simcard->redirectToList(); //update a simcard } else { if (isset($_POST["update"])) { $simcard->check($_POST['id'], UPDATE); $simcard->update($_POST);