本文整理匯總了PHP中Printer::redirectToList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Printer::redirectToList方法的具體用法?PHP Printer::redirectToList怎麽用?PHP Printer::redirectToList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Printer
的用法示例。
在下文中一共展示了Printer::redirectToList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Printer
if (!isset($_GET["withtemplate"])) {
$_GET["withtemplate"] = "";
}
$print = new Printer();
if (isset($_POST["add"])) {
$print->check(-1, 'w', $_POST);
if ($newID = $print->add($_POST)) {
Event::log($newID, "printers", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][20] . " " . $_POST["name"] . ".");
}
glpi_header($_SERVER['HTTP_REFERER']);
} else {
if (isset($_POST["delete"])) {
$print->check($_POST["id"], 'd');
$print->delete($_POST);
Event::log($_POST["id"], "printers", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][22]);
$print->redirectToList();
} else {
if (isset($_POST["restore"])) {
$print->check($_POST["id"], 'd');
$print->restore($_POST);
Event::log($_POST["id"], "printers", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][23]);
$print->redirectToList();
} else {
if (isset($_REQUEST["purge"])) {
$print->check($_REQUEST["id"], 'd');
$print->delete($_REQUEST, 1);
Event::log($_REQUEST["id"], "printers", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][24]);
$print->redirectToList();
} else {
if (isset($_POST["update"])) {
$print->check($_POST["id"], 'w');