Пример #1
0
        }
        ?>





<?php 
        // affichage du formulaire
        require_once ROOT . '/class/html_form.class.php';
        $discussion = $thinkedit->newRecord('discussion');
        $form = new html_form();
        $form->url->set('refresh', 1);
        include ROOT . '/lib/securimage/securimage.php';
        $img = new securimage();
        if ($form->isSent()) {
            $discussion->setArray($_POST);
            //if ($img->check($_POST['code']))
            //{
            $discussion->setArray($_POST);
            $discussion->insert();
            $new_node = $forum->add($discussion);
            $new_node->moveBottom();
            $new_node->set('publish', 1);
            $new_node->save();
            $new_node->rebuild();
            $thinkedit->outputcache->end();
            if ($thinkedit->outputcache->get($cache_id)) {
                $thinkedit->outputcache->remove($cache_id);
            }
            if ($new_node) {