$netdevice->check($_POST["id"], DELETE); $netdevice->delete($_POST); Event::log($_POST["id"], "networkequipment", 4, "inventory", sprintf(__('%s deletes an item'), $_SESSION["glpiname"])); $netdevice->redirectToList(); } else { if (isset($_POST["restore"])) { $netdevice->check($_POST["id"], DELETE); $netdevice->restore($_POST); Event::log($_POST["id"], "networkequipment", 4, "inventory", sprintf(__('%s restores an item'), $_SESSION["glpiname"])); $netdevice->redirectToList(); } else { if (isset($_POST["purge"])) { $netdevice->check($_POST["id"], PURGE); $netdevice->delete($_POST, 1); Event::log($_POST["id"], "networkequipment", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"])); $netdevice->redirectToList(); } else { if (isset($_POST["update"])) { $netdevice->check($_POST["id"], UPDATE); $netdevice->update($_POST); Event::log($_POST["id"], "networkequipment", 4, "inventory", sprintf(__('%s updates an item'), $_SESSION["glpiname"])); Html::back(); } else { Html::header(NetworkEquipment::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "assets", "networkequipment"); $netdevice->display(array('id' => $_GET["id"], 'withtemplate' => $_GET["withtemplate"])); Html::footer(); } } } } }