showForm() public method

Print the Software form
public showForm ( $ID, $options = [] ) : boolean
$ID integer ID of the item
$options array of possible options: - target filename : where to go when done. - withtemplate boolean : template or basic item
return boolean item found
Esempio n. 1
0
            $soft->redirectToList();
        } else {
            if (isset($_REQUEST["purge"])) {
                $soft->check($_REQUEST["id"], 'd');
                $soft->delete($_REQUEST, 1);
                Event::log($_REQUEST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][24]);
                $soft->redirectToList();
            } else {
                if (isset($_POST["update"])) {
                    $soft->check($_POST["id"], 'w');
                    $soft->update($_POST);
                    Event::log($_POST["id"], "software", 4, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][21]);
                    glpi_header($_SERVER['HTTP_REFERER']);
                } else {
                    if (isset($_POST["mergesoftware"])) {
                        popHeader($LANG['Menu'][4]);
                        if (isset($_POST["id"]) && isset($_POST["item"]) && is_array($_POST["item"]) && count($_POST["item"])) {
                            $soft->check($_POST["id"], 'w');
                            $soft->merge($_POST["item"]);
                        }
                        glpi_header($_SERVER['HTTP_REFERER']);
                    } else {
                        commonHeader($LANG['Menu'][4], $_SERVER['PHP_SELF'], "inventory", "software");
                        $soft->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"]));
                        commonFooter();
                    }
                }
            }
        }
    }
}