Esempio n. 1
0
 function forum_admin_selectcats($id, $stufe, $sel)
 {
     $q = "SELECT * FROM prefix_forumcats WHERE cid = " . $id . " ORDER BY pos";
     $erg = db_query($q);
     if (db_num_rows($erg) > 0) {
         while ($row = db_fetch_object($erg)) {
             echo '<option style="font-weight:bold;" value="cat">' . stufe($stufe, 'c') . ' ' . $row->name . '</option>';
             forum_admin_selectcats($row->id, $stufe + 1, $sel);
             $sql = db_query("SELECT id, name FROM prefix_forums WHERE cid = {$row->id}");
             while ($row2 = db_fetch_object($sql)) {
                 if (!forum_user_is_mod($row2->id)) {
                     continue;
                 }
                 echo '<option value="' . $row2->id . '"' . ($sel == $row2->id ? ' selected="selected"' : '') . '>' . stufe($stufe + 1) . ' ' . $row2->name . '</option>';
             }
         }
     }
 }
Esempio n. 2
0
        //Unterkategorien
        $topcid = $aktForumRow['topcid'];
        $catsnr = 1;
        $aktForumRow['kat'] = array();
        while ($topcid != 0) {
            $tmpsql = db_fetch_object(db_query("SELECT id,cid,name FROM `prefix_forumcats` WHERE id = " . $topcid));
            $topcid = $tmpsql->cid;
            $aktForumRow['kat'][$catsnr] = array();
            $aktForumRow['kat'][$catsnr]['id'] = $tmpsql->id;
            $aktForumRow['kat'][$catsnr]['name'] = $tmpsql->name;
            $catsnr++;
        }
        $aktForumRow['kat'][0]['id'] = $aktForumRow['cid'];
        $aktForumRow['kat'][0]['name'] = $aktForumRow['cat'];
        //Unterkategorien - Ende
        $forum_rights = array('start' => has_right($aktForumRow['start']), 'reply' => has_right(array($aktForumRow['reply'], $aktForumRow['start'])), 'view' => has_right(array($aktForumRow['view'], $aktForumRow['reply'], $aktForumRow['start'])), 'mods' => forum_user_is_mod($fid));
        if ($forum_rights['view'] == false) {
            $forum_failure[] = $lang['forumidnotfound'];
        }
    } else {
        $forum_failure[] = $lang['forumidnotfound'];
    }
}
switch ($menu->get(1)) {
    default:
        $incdatei = 'show_forum.php';
        break;
    case 'showtopics':
        $incdatei = 'show_topic.php';
        break;
    case 'editforum':