當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Software::display方法代碼示例

本文整理匯總了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();
                }
            }
        }
    }
}
開發者ID:glpi-project,項目名稱:glpi,代碼行數:31,代碼來源:software.form.php

示例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');
開發者ID:ilaro-org,項目名稱:processing-docs,代碼行數:31,代碼來源:test.domit.php


注:本文中的Software::display方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。