Exemple #1
0
    } else {
        // deal with options.
        $c['bb'] = empty($c['bb']) ? 1 : 0;
        $c['html'] = empty($c['html']) ? 1 : 0;
        $c['smiles'] = empty($c['smiles']) ? 1 : 0;
        badHtmlSecond($c['body']);
        // make the updates
        $update = new nlb_blog($db);
        $update->fetchFromDB($_GET['id']);
        foreach (array('subject', 'custom', 'body', 'bb', 'html', 'smiles', 'access') as $item) {
            $update->setItem($item, $c[$item]);
        }
        // deal with comments.
        if (empty($c['comments'])) {
            // comments are allowed
            $update->recountComments();
        } else {
            // no comments
            $update->setItem('comments', -1);
        }
        // deal with blog count
        $user->recountBlogs();
        // set it in stone
        $update->updateToDB();
        $user->updateDB();
        $ets->page_body = $l['goodedit'];
    }
}
if (empty($_POST) || $baddata) {
    /**
     *		Build input