Esempio n. 1
0
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
if (!isset($_GET["plugin_ideabox_ideaboxes_id"])) {
    $_GET["plugin_ideabox_ideaboxes_id"] = "";
}
$comment = new PluginIdeaboxComment();
if (isset($_POST["add"])) {
    $comment->check(-1, 'w', $_POST);
    $comment->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        $comment->check($_POST['id'], 'w');
        $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");