Esempio n. 1
0
            ${$m} = " selected";
            eval("\$boards .= \"" . gettemplate("forum.admin.board.bit") . "\";");
        }
        eval("\$inc[boards] .= \"" . gettemplate("forum.admin.listboards") . "\";");
        unset($cats);
        unset($boards);
    }
    $catlistq = $db->query_str("SELECT * FROM {$tab['forum_board']} WHERE is_cat='1'ORDER BY id");
    while ($catl = $db->fetch_array($catlistq)) {
        eval("\$catlist .= \"" . gettemplate("forum.admin.cats.list.select") . "\";");
    }
    eval("\$inc[action] = \"" . gettemplate("forum.admin.boards") . "\";");
}
################
if ($adminaction == "forum_editboard") {
    $board = getboard($boardid);
    if ($board[is_cat]) {
        $ocat = " selected";
    } else {
        $oboard = " selected";
    }
    if (!$board[visible]) {
        $vis = " unchecked";
    } else {
        $vis = " checked";
    }
    $catlistq = $db->query_str("SELECT * FROM {$tab['forum_board']} WHERE is_cat='1'ORDER BY id");
    while ($catl = $db->fetch_array($catlistq)) {
        unset($selected);
        if ($catl[id] == $board[parent_boardid]) {
            $selected = " selected";
Esempio n. 2
0
<?php

if (!preg_match("/index.php/", $REQUEST_URI)) {
    die("Direct Open not allowed.");
}
eval("\$incf[top] = \"" . gettemplate("forum.inc.top") . "\";");
eval("\$incf[bottom] = \"" . gettemplate("forum.inc.bottom") . "\";");
$basicforum = $title;
if ($boardid) {
    $thisboard = getboard($boardid);
}
if ($threadid) {
    $thisthread = getthread($threadid);
}
if (!$boardid && $threadid) {
    $thisboard = getboard($thisthread[parent_boardid]);
}
/////////////////////////////////////////////////
#############################
if ($action) {
    #######
    if ($action == "markallread") {
        if ($login[id]) {
            $query_str = $db->query_str("UPDATE {$tab['user']} SET last_forum_read='" . time() . "' WHERE id='{$login['id']}'");
            $login = checkuser();
        }
    }
    #######
    if ($action == "checkpassword") {
        if (!checkboardpassword($form[boardpassword], $thisboard)) {
            eval("\$failpassword =\"" . gettemplate("forum.boardpassword.wrong") . "\";");
Esempio n. 3
0
    }
    $modsquery = $db->query_str("SELECT * FROM {$tab['right']} ORDER BY is_admin DESC");
    while ($right = $db->fetch_array($modsquery)) {
        $user = getuser($right[userid]);
        if (!$right[is_admin]) {
            $thesection = getsection($right[section]);
            if (!$thesection) {
                $thesection[title] = "invalid";
            }
        } else {
            $thesection[title] = "-----";
        }
        if ($right[boardid] == "0" && $right[section] == $sec[forum][id]) {
            $board = "<i>ALL BOARDS</i>";
        } elseif ($right[boardid]) {
            $board = getboard($right[boardid]);
            $board = $board[board_name];
        } else {
            $board = "-----";
        }
        eval("\$moderators .= \"" . gettemplate("user.admin.rights.listmoderators.bit") . "\";");
    }
    eval("\$inc[action] = \"" . gettemplate("user.admin.rights") . "\";");
}
#######################################
if ($adminaction == "showuser" || $fail_useredit) {
    $fail = $fail_useredit;
    $form = getuser($userid);
    $form[user_gender] - 2 ? $male = " selected" : ($female = " selected");
    $birthday = mkdate($form[user_birth], "d-m-Y");
    eval("\$inc[action] = \"" . gettemplate("user.admin.edituser") . "\";");