showFull() public method

Print out (html) show item : question and answer
public showFull ( $options = [] ) : nothing
$options array of options
return nothing (display item : question and answer)
Esempio n. 1
0
                 break;
         }
         if (!is_null($item)) {
             $item->add($_POST);
             Event::log($_POST["knowbaseitems_id"], "knowbaseitem", 4, "tools", sprintf(__('%s adds a target'), $_SESSION["glpiname"]));
         }
     }
     Html::back();
 } else {
     if (isset($_GET["id"])) {
         if (isset($_GET["_in_modal"])) {
             Html::popHeader(__('Knowledge base'), $_SERVER['PHP_SELF']);
             $kb = new KnowbaseItem();
             if ($_GET['id']) {
                 $kb->check($_GET["id"], READ);
                 $kb->showFull();
             } else {
                 // New item
                 $kb->showForm($_GET["id"], $_GET);
             }
             Html::popFooter();
         } else {
             // modifier un item dans la base de connaissance
             $kb->check($_GET["id"], READ);
             if (Session::getLoginUserID()) {
                 if ($_SESSION["glpiactiveprofile"]["interface"] == "central") {
                     Html::header(KnowbaseItem::getTypeName(1), $_SERVER['PHP_SELF'], "tools", "knowbaseitem");
                 } else {
                     Html::helpHeader(__('FAQ'), $_SERVER['PHP_SELF']);
                 }
                 Html::helpHeader(__('FAQ'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
Esempio n. 2
0
            $_GET["action"] = "edit";
            include "bookmark.php";
            break;
        case "edit_user_notification":
            popHeader($LANG['Menu'][40], $_SERVER['PHP_SELF']);
            include "ticket_user.form.php";
            break;
        case "add_ldapuser":
            popHeader($LANG['ldap'][35], $_SERVER['PHP_SELF']);
            include "ldap.import.php";
            break;
        case "add_ruleparameter":
            popHeader($LANG['ldap'][35], $_SERVER['PHP_SELF']);
            include strtolower($_GET['sub_type'] . "Parameter.php");
            break;
        case "list_notificationtags":
            popHeader($LANG['mailing'][138], $_SERVER['PHP_SELF']);
            include "notification.tags.php";
            break;
        case "show_kb":
            popHeader($LANG['title'][5], $_SERVER['PHP_SELF']);
            $kb = new KnowbaseItem();
            $kb->check($_GET["id"], 'r');
            $kb->showFull(true);
            popHeader($LANG['mailing'][138], $_SERVER['PHP_SELF']);
            break;
    }
    echo "<div class='center'><br><a href='javascript:window.close()'>" . $LANG['buttons'][60] . "</a>";
    echo "</div>";
    popFooter();
}
Esempio n. 3
0
// Affichage Module FAQ
//******************
$name = "";
checkFaqAccess();
if (getLoginUserID()) {
    helpHeader($LANG['Menu'][20], $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
} else {
    $_SESSION["glpilanguage"] = $CFG_GLPI['language'];
    // Anonymous FAQ
    simpleHeader($LANG['Menu'][20], array($LANG['Menu'][20] => $_SERVER['PHP_SELF']));
}
if (!isset($_GET["contains"])) {
    $_GET["contains"] = "";
}
if (!isset($_GET["knowbaseitemcategories_id"])) {
    $_GET["knowbaseitemcategories_id"] = 0;
}
if (isset($_GET["id"])) {
    $kb = new KnowbaseItem();
    if ($kb->getFromDB($_GET["id"])) {
        $kb->showFull(false);
    }
} else {
    KnowbaseItem::searchForm($_GET, 1);
    KnowbaseItemCategory::showFirstLevel($_GET, 1);
    KnowbaseItem::showList($_GET, 1);
    if (!$_GET["knowbaseitemcategories_id"] && strlen($_GET["contains"]) == 0) {
        KnowbaseItem::showViewGlobal($_SERVER['PHP_SELF'], 1);
    }
}
helpFooter();