本文整理匯總了PHP中Computer::display方法的典型用法代碼示例。如果您正苦於以下問題:PHP Computer::display方法的具體用法?PHP Computer::display怎麽用?PHP Computer::display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Computer
的用法示例。
在下文中一共展示了Computer::display方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sprintf
$computer->check($_POST['id'], DELETE);
if ($computer->restore($_POST)) {
Event::log($_POST["id"], "computers", 4, "inventory", sprintf(__('%s restores an item'), $_SESSION["glpiname"]));
}
$computer->redirectToList();
} else {
if (isset($_POST["purge"])) {
$computer->check($_POST['id'], PURGE);
if ($computer->delete($_POST, 1)) {
Event::log($_POST["id"], "computers", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
}
$computer->redirectToList();
//update a computer
} else {
if (isset($_POST["update"])) {
$computer->check($_POST['id'], UPDATE);
$computer->update($_POST);
Event::log($_POST["id"], "computers", 4, "inventory", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
Html::back();
// Disconnect a computer from a printer/monitor/phone/peripheral
} else {
//print computer information
Html::header(Computer::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "assets", "computer");
//show computer form to add
$computer->display(array('id' => $_GET["id"], 'withtemplate' => $_GET["withtemplate"]));
Html::footer();
}
}
}
}
}