本文整理汇总了PHP中Software::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Software::display方法的具体用法?PHP Software::display怎么用?PHP Software::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Software
的用法示例。
在下文中一共展示了Software::display方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
$soft->check($_POST["id"], DELETE);
$soft->delete($_POST);
Event::log($_POST["id"], "software", 4, "inventory", sprintf(__('%s deletes an item'), $_SESSION["glpiname"]));
$soft->redirectToList();
} else {
if (isset($_POST["restore"])) {
$soft->check($_POST["id"], DELETE);
$soft->restore($_POST);
Event::log($_POST["id"], "software", 4, "inventory", sprintf(__('%s restores an item'), $_SESSION["glpiname"]));
$soft->redirectToList();
} else {
if (isset($_POST["purge"])) {
$soft->check($_POST["id"], PURGE);
$soft->delete($_POST, 1);
Event::log($_POST["id"], "software", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
$soft->redirectToList();
} else {
if (isset($_POST["update"])) {
$soft->check($_POST["id"], UPDATE);
$soft->update($_POST);
Event::log($_POST["id"], "software", 4, "inventory", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
Html::back();
} else {
Html::header(Software::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "assets", "software");
$soft->display(array('id' => $_GET["id"], 'withtemplate' => $_GET["withtemplate"]));
Html::footer();
}
}
}
}
}
示例2: array
<?php
include 'domit/xml_domit_include.php';
$doc =& new DOMIT_Document();
$success = $doc->loadXML('content/test.xml');
$curated = $doc->documentElement;
$softwares = $curated->childNodes;
$softwareObjs = array();
foreach ($softwares as $software) {
$s = new Software($software);
$s->display();
}
class Software
{
var $name;
var $by;
var $scroll;
var $resize;
var $width;
var $height;
var $image;
var $description;
var $location;
var $links = array();
function Software($xml)
{
$this->name = $xml->getAttribute('name');
$this->by = $xml->getAttribute('by');
$this->scroll = $xml->getAttribute('scroll');
$this->width = $xml->getAttribute('width');
$this->height = $xml->getAttribute('height');