Пример #1
0
        $comment->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            $comment->check($_POST['id'], 'w');
            $comment->delete($_POST, 1);
            Html::redirect(Toolbox::getItemTypeFormURL('PluginIdeaboxIdeabox') . "?id=" . $_POST["plugin_ideabox_ideaboxes_id"]);
        } else {
            if (isset($_POST["delete_comment"])) {
                foreach ($_POST["check"] as $ID => $value) {
                    $comment->check($ID, 'w');
                    $comment->delete(array("id" => $ID), 1);
                }
                Html::back();
            } else {
                $comment->checkGlobal("r");
                if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
                    Html::header(PluginIdeaboxIdeabox::getTypeName(2), '', "plugins", "ideabox");
                } else {
                    Html::helpHeader(PluginIdeaboxIdeabox::getTypeName(2));
                }
                $comment->showForm($_GET["id"], array('plugin_ideabox_ideaboxes_id' => $_GET["plugin_ideabox_ideaboxes_id"]));
                if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
                    Html::footer();
                } else {
                    Html::helpFooter();
                }
            }
        }
    }
}