// -1 Redundant  ;)
    } else {
        $bBlog->assign('showmessage', TRUE);
        $bBlog->assign('message_title', 'Are you sure you want to delete it?');
        $bBlog->assign('message_content', "\n            <form action='index.php' method='POST'>\n            <input type='hidden' name='b' value='archives'>\n            <input type='hidden' name='confirm' value='cd" . $_POST['delete'] . "'>\n            <input type='hidden' name='delete' value='" . $_POST['delete'] . "'>\n            <center><input type='submit' class='bf' name='submit' value='Delete it'></center>\n            </form>");
    }
}
if (isset($_POST['edit']) && is_numeric($_POST['edit'])) {
    $epost = $ph->get_post($_POST['edit'], true, true);
    $bBlog->assign('title_text', htmlspecialchars($epost['title']));
    $bBlog->assign('body_text', htmlspecialchars($epost['body']));
    $bBlog->assign('selected_modifier', $epost['modifier']);
    $bBlog->assign('editpost', TRUE);
    $bBlog->assign('showarchives', 'no');
    $bBlog->assign('postid', $_POST['edit']);
    $bBlog->assign('timestampform', timestAmpform($epost['posttime']));
    // to hide a post from the homepage
    if ($epost['hidefromhome'] == 1) {
        $bBlog->assign('hidefromhomevalue', " checked ");
    }
    // to disable comments either now or in the future
    if ($epost['allowcomments'] == 'timed') {
        $bBlog->assign('commentstimedvalue', " checked ");
    } elseif ($epost['allowcomments'] == 'disallow') {
        $bBlog->assign('commentsdisallowvalue', " checked ");
    } else {
        $bBlog->assign('commentsallowvalue', " checked='checked' ");
    }
    if ($epost['status'] == 'draft') {
        $bBlog->assign('statusdraft', 'checked');
    } else {
예제 #2
0
        // -1 Redundant  ;)
    } else {
        $bBlog->assign('showmessage', TRUE);
        $bBlog->assign('message_title', 'Are you sure you want to delete it?');
        $bBlog->assign('message_content', "\n            <form action='index.php' method='POST'>\n            <input type='hidden' name='b' value='archives'>\n            <input type='hidden' name='confirm' value='cd" . $_POST['delete'] . "'>\n            <input type='hidden' name='delete' value='" . $_POST['delete'] . "'>\n            <center><input type='submit' class='bf' name='submit' value='Delete it'></center>\n            </form>\n        ");
    }
}
if (isset($_POST['edit']) && is_numeric($_POST['edit'])) {
    $epost = $bBlog->get_post($_POST['edit'], TRUE, TRUE);
    $bBlog->assign('title_text', htmlspecialchars($epost->title));
    $bBlog->assign('body_text', htmlspecialchars($epost->body));
    $bBlog->assign('selected_modifier', $epost->modifier);
    $bBlog->assign('editpost', TRUE);
    $bBlog->assign('showarchives', 'no');
    $bBlog->assign('postid', $_POST['edit']);
    $bBlog->assign('timestampform', timestAmpform($epost->posttime));
    // to hide a post from the homepage
    if ($epost->hidefromhome == 1) {
        $bBlog->assign('hidefromhomevalue', " checked='checked' ");
    }
    // to disable comments either now or in the future
    if ($epost->allowcomments == 'timed') {
        $bBlog->assign('commentstimedvalue', " checked='checked' ");
    } elseif ($epost->allowcomments == 'disallow') {
        $bBlog->assign('commentsdisallowvalue', " checked='checked' ");
    } else {
        $bBlog->assign('commentsallowvalue', " checked='checked' ");
    }
    if ($epost->status == 'draft') {
        $bBlog->assign('statusdraft', 'checked="checked"');
    } else {