if (isset($_GET["delete"])) { $constype->check($_GET["tID"], 'w'); if ($con->delete($_GET)) { Event::log($_GET["tID"], "consumables", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][91]); } glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_POST["give"])) { $constype->check($_POST["tID"], 'w'); if ($_POST["users_id"] > 0) { if (isset($_POST["out"])) { foreach ($_POST["out"] as $key => $val) { $con->out($key, $_POST["users_id"]); } } Event::log($_POST["tID"], "consumables", 5, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][97] . " " . $_POST["users_id"]); } glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_GET["restore"])) { $constype->check($_GET["tID"], 'w'); if ($con->restore($_GET)) { Event::log($_GET["tID"], "consumables", 5, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][93]); } glpi_header($_SERVER['HTTP_REFERER']); } else { glpi_header($_SERVER['HTTP_REFERER']); } } } }