Exemple #1
0
            if ($_SESSION['btRankAccessCache'][$checkboxName] == "1") {
                $arrRanks[$row['rank_id']] = 1;
            } elseif ($_SESSION['btRankAccessCache'][$checkboxName] == "2") {
                $arrRanks[$row['rank_id']] = 0;
            }
        }
        foreach ($_SESSION['btMemberAccessCache'] as $memID => $accessRule) {
            if ($accessRule != "" && $tempMemObj->select($memID)) {
                $arrMembers[$memID] = $accessRule;
            }
        }
    }
    if ($countErrors == 0) {
        $arrColumns = array("forumcategory_id", "name", "description", "sortnum", "accesstype", "subforum_id");
        $arrValues = array($_POST['forumcat'], $_POST['boardname'], $_POST['boarddesc'], $intNewOrderSpot, $_POST['accesstype'], $setSubForum);
        if ($boardObj->addNew($arrColumns, $arrValues) && $boardObj->secureBoard($arrRanks, $arrMembers)) {
            $boardInfo = $boardObj->get_info_filtered();
            echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\tSuccessfully Added New Board: <b>" . $boardInfo['name'] . "</b>!\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tpopupDialog('Add Board', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t</script>\n\t\t\t";
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to the database.  Please contact the website administrator.<br>";
        }
    }
    if ($countErrors > 0) {
        $_POST = filterArray($_POST);
        $_POST['submit'] = false;
    }
}
if (!$_POST['submit']) {
    if ($dispError != "") {
        $dispError = "\n\t\t<div class='errorDiv'>\n\t\t<strong>Unable to add new board because the following errors occurred:</strong><br><br>\n\t\t{$dispError}\n\t\t</div>\n\t\t";