Ejemplo n.º 1
0
    /**
     * show edit forum page
     *	@param $forum_id	forum id
     *	@param $cat_id		category id
     *	@param return		forum edit window xml 
     */
    function editForum($forum_id, $cat_id)
    {
        $db = new DbAdmin();
        $fdb = new DbForum();
        if ($forum_id) {
            $a = $db->getForum((int) $forum_id);
        } else {
            $a['cat_id'] = $cat_id;
        }
        $c = $fdb->getCat($a['cat_id']);
        $a['cat_uri'] = $c['cat_uri'];
        $cu = $this->getUrlsXml();
        encode_post_text($a['forum_title'], 0);
        encode_post_text($a['forum_desc'], 0);
        return <<<OES
<root>
{$cu}
<forum forum_id="{$forum_id}">
    <cat_id>{$a['cat_id']}</cat_id>\t
    <cat_uri>{$a['cat_uri']}</cat_uri>
\t<title>{$a['forum_title']}</title>\t
\t<desc>{$a['forum_desc']}</desc>\t
\t<type>{$a['forum_type']}</type>\t
    <order>{$a['forum_order']}</order>\t
</forum>
</root>
OES;
    }