// Original Author of file: Julien Dombre // Purpose of file: // ---------------------------------------------------------------------- define('GLPI_ROOT', '..'); include GLPI_ROOT . "/inc/includes.php"; if (!isset($_GET["tID"])) { $_GET["tID"] = ""; } if (!isset($_GET["cID"])) { $_GET["cID"] = ""; } $cart = new Cartridge(); $cartype = new CartridgeItem(); if (isset($_POST["update_pages"]) || isset($_POST["update_pages_x"])) { $cart->check($_POST["cID"], 'w'); if ($cart->updatePages($_POST['pages'])) { Event::log(0, "cartridges", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][94]); } glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_POST["add_several"])) { $cartype->check($_POST["tID"], 'w'); for ($i = 0; $i < $_POST["to_add"]; $i++) { unset($cart->fields["id"]); $cart->add($_POST); } Event::log($_POST["tID"], "cartridges", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][88] . ": " . $_POST["to_add"]); glpi_header($_SERVER['HTTP_REFERER']); } else { if (isset($_GET["delete"])) { $cartype->check($_GET["tID"], 'w');