function dispManageTable($arrBoards, $indent = 0) { global $mysqli, $MAIN_ROOT, $THEME, $cID; $boardObj = new ForumBoard($mysqli); $counter = 0; $x = 0; foreach ($arrBoards as $boardID) { $boardObj->select($boardID); $boardInfo = $boardObj->get_info_filtered(); $dispUpArrow = "<a href='javascript:void(0)' onclick=\"moveBoard('up', '" . $boardInfo['forumboard_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/uparrow.png' width='24' height='24' title='Move Up'></a>"; $dispDownArrow = "<a href='javascript:void(0)' onclick=\"moveBoard('down', '" . $boardInfo['forumboard_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/downarrow.png' width='24' height='24' title='Move Down'></a>"; if ($x == 0) { $dispUpArrow = "<img src='" . $MAIN_ROOT . "images/transparent.png' width='24' height='24'>"; } if ($boardObj->getHighestSortNum() == $boardInfo['sortnum']) { $dispDownArrow = "<img src='" . $MAIN_ROOT . "images/transparent.png' width='24' height='24'>"; } if ($counter == 1) { $addCSS = " alternateBGColor"; $counter = 0; } else { $addCSS = ""; $counter = 1; } echo "\n\t\t\t<tr>\n\t\t\t\t<td class='dottedLine main" . $addCSS . "' style='width: 76%; padding-left: 10px'>" . str_repeat(" ", $indent) . "<b><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&bID=" . $boardInfo['forumboard_id'] . "&action=edit'>" . $boardInfo['name'] . "</a></b></td>\n\t\t\t\t<td class='dottedLine main" . $addCSS . "' style='width: 6%' align='center'>" . $dispUpArrow . "</td>\n\t\t\t\t<td class='dottedLine main" . $addCSS . "' style='width: 6%' align='center'>" . $dispDownArrow . "</td>\n\t\t\t\t<td class='dottedLine main" . $addCSS . "' style='width: 6%' align='center'><a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "&bID=" . $boardInfo['forumboard_id'] . "&action=edit'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/edit.png' width='24' height='24' title='Edit Board'></a></td>\n\t\t\t\t<td class='dottedLine main" . $addCSS . "' style='width: 6%' align='center'><a href='javascript:void(0)' onclick=\"deleteBoard('" . $boardInfo['forumboard_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/delete.png' width='24' height='24' title='Delete Board'></a></td>\n\t\t\t</tr>\n\t\t"; $x++; $arrSubForums = $boardObj->getSubForums(); if (count($arrSubForums) > 0) { dispManageTable($arrSubForums, $indent + 1); } } }
public function delete() { $returnVal = false; if ($this->intTableKeyValue != "") { $arrSubForums = $this->getSubForums(); $result[] = $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "forum_post WHERE forumboard_id = '" . $this->intTableKeyValue . "'"); $result[] = $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "forum_topic WHERE forumboard_id = '" . $this->intTableKeyValue . "'"); $result[] = $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "forum_rankaccess WHERE board_id = '" . $this->intTableKeyValue . "'"); $result[] = $this->MySQL->query("DELETE FROM " . $this->MySQL->get_tablePrefix() . "forum_memberaccess WHERE board_id = '" . $this->intTableKeyValue . "'"); $result[] = parent::delete(); if (count($arrSubForums) > 0) { $subForumObj = new ForumBoard($this->MySQL); $arrColumns = array("sortnum", "subforum_id"); foreach ($arrSubForums as $subForumID) { $subForumObj->select($subForumID); $subForumInfo = $subForumObj->get_info(); $newSortNum = $subForumInfo['sortnum'] + ($this->arrObjInfo['sortnum'] - 1); $arrValues = array($newSortNum, $this->arrObjInfo['subforum_id']); $subForumObj->update($arrColumns, $arrValues); } $subForumObj->resortOrder(); } if (!in_array(false, $result)) { $returnVal = true; } } return $returnVal; }
function listSubForums($forumID, $filterOut, $indent = 1) { global $mysqli; $boardObj = new ForumBoard($mysqli); $boardObj->select($forumID); $arrSubForums = $boardObj->getSubForums(); foreach ($arrSubForums as $value) { if ($filterOut != $value) { $boardObj->select($value); $boardInfo = $boardObj->get_info_filtered(); echo "<option value='" . $boardInfo['forumboard_id'] . "'>" . str_repeat(" ", $indent) . "· " . $boardInfo['name'] . "</option>"; $moreSubForums = $boardObj->getSubForums(); if (count($moreSubForums) > 0) { listSubForums($value, $filterOut, $indent + 1); } } } }
public function getForumActivity($amountToShow = 5) { $forumObj = new ForumBoard($this->MySQL); $arrReturn = array(); $memberInfo = $this->memberObj->get_info(); $result = $this->MySQL->query("SELECT forumpost_id FROM " . $this->MySQL->get_tablePrefix() . "forum_post ORDER BY dateposted DESC"); while (count($arrReturn) < $amountToShow && ($row = $result->fetch_assoc())) { $forumPostID = $row['forumpost_id']; $forumObj->objPost->select($forumPostID); $topicID = $forumObj->objPost->get_info("forumtopic_id"); $forumObj->objTopic->select($topicID); $boardID = $forumObj->objTopic->get_info("forumboard_id"); $forumObj->select($boardID); $boardAccessType = $forumObj->get_info("accesstype"); if (!in_array($forumPostID, $arrReturn) && $boardAccessType == 0) { $arrReturn[] = $forumPostID; } elseif (!in_array($forumPostID, $arrReturn) && $boardAccessType == 1 && $this->blnLoggedIn && $forumObj->memberHasAccess($memberInfo)) { $arrReturn[] = $forumPostID; } } return $arrReturn; }
* E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../classes/forumboard.php"; if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; $intAddBoardCID = $consoleObj->findConsoleIDByName("Add Board"); $intEditCatCID = $consoleObj->findConsoleIDByName("Manage Forum Categories"); $intAddCatCID = $consoleObj->findConsoleIDByName("Add Forum Category"); $boardObj = new ForumBoard($mysqli); $categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id"); $categoryObj->set_assocTableName("forum_board"); $categoryObj->set_assocTableKey("forumboard_id"); if ($boardObj->select($_GET['bID']) && $_GET['action'] == "edit") { include "include/edit_board.php"; } else { echo "\n\t\n\t\t<table class='formTable'>\n\t\t\t<tr>\n\t\t\t\t<td class='main' colspan='2' align='right'>\n\t\t\t\t\t» <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intAddBoardCID . "'>Add Board</a> « » <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intAddCatCID . "'>Add Category</a> «<br><br>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formTitle' style='width: 76%'>Board Name:</td>\n\t\t\t\t<td class='formTitle' style='width: 24%'>Actions:</td>\n\t\t\t</tr>\n\t\t</table>\n\t\n\t\t<div id='loadingSpiral' class='loadingSpiral'>\n\t\t\t<p align='center'>\n\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading\n\t\t\t</p>\n\t\t</div>\n\t\t\n\t\t\n\t\t<div id='boardList'>\n\t\n\t\n\t"; include "include/main_manageboards.php"; echo "\n\t\t</div>\n\t\t<div id='deleteBoardDiv' style='display: none'></div>\n\t\t\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\tfunction moveBoard(strDir, intBoardID) {\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\$('#boardList').fadeOut(250);\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/move_board.php', { bID: intBoardID, bDir: strDir }, function(data) {\n\t\t\t\t\t\t\$('#boardList').html(data);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\$('#boardList').fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\n\t\t\n\t\t\tfunction deleteBoard(intBoardID) {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/delete_board.php', { bID: intBoardID }, function(data) {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#deleteBoardDiv').html(data);\n\t\t\t\t\t\t\$('#deleteBoardDiv').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Delete Board',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\$('#boardList').fadeOut(250);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/delete_board.php', { bID: intBoardID, confirm: 1 }, function(data1) {\n\n\t\t\t\t\t\t\t\t\t\t\$('#boardList').html(data1);\n\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\$('#boardList').fadeIn(250);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\t\t</script>\n\t"; }
$categoryObj->set_assocTableName("forum_board"); $categoryObj->set_assocTableKey("forumboard_id"); $boardObj = new ForumBoard($mysqli); // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { echo "\n\t\n\t\t<table class='formTable' style='margin-bottom: 20px'>\n\t\t\t<tr>\n\t\t\t\t<td class='formTitle' style='width: 50%'>Board:</td>\n\t\t\t\t<td class='formTitle' style='width: 35%'>Date Added:</td>\n\t\t\t\t<td class='formTitle' style='width: 15%'>Actions:</td>\n\t\t\t</tr>\n\t\n\t"; if (isset($_POST['mID']) && $memberModObj->select($_POST['mID'])) { $memberModInfo = $memberModObj->get_info_filtered(); if ($_POST['action'] == "add") { if (substr($_POST['bID'], 0, 4) == "cat_") { $catID = str_replace("cat_", "", $_POST['bID']); if ($categoryObj->select($catID)) { $arrBoards = $categoryObj->getAssociateIDs(); foreach ($arrBoards as $boardID) { $boardObj->select($boardID); $boardObj->addMod($memberModInfo['member_id']); } } } elseif (substr($_POST['bID'], 0, 6) == "board_") { $boardID = str_replace("board_", "", $_POST['bID']); if ($boardObj->select($boardID)) { $boardObj->addMod($memberModInfo['member_id']); } } } elseif ($_POST['action'] == "delete") { if ($boardObj->select($_POST['bID'])) { $boardObj->removeMod($memberModInfo['member_id']); } } $result = $mysqli->query("SELECT * FROM " . $dbprefix . "forum_moderator WHERE member_id = '" . $memberModInfo['member_id'] . "' ORDER BY dateadded DESC");
<?php /* * Bluethrust Clan Scripts v4 * Copyright 2014 * * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/forumboard.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $boardObj = new ForumBoard($mysqli); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Boards"); $consoleObj->select($cID); if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if (($memberInfo['rank_id'] == 1 || $member->hasAccess($consoleObj)) && $boardObj->select($_POST['bID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $boardObj->move($_POST['bDir']); include "main_manageboards.php"; } }
$firstPostInfo = $boardObj->objPost->get_info_filtered(); $boardObj->objTopic->select($firstPostInfo['forumtopic_id']); $lastPostID = $boardObj->objTopic->get_info("lastpost_id"); $boardObj->objPost->select($lastPostID); $lastPostInfo = $boardObj->objPost->get_info_filtered(); $postMemberObj->select($lastPostInfo['member_id']); $dispLastPost = "<div class='boardLastPostTitle'><a href='viewtopic.php?tID=" . $firstPostInfo['forumtopic_id'] . "#" . $lastPostID . "' title='" . $firstPostInfo['title'] . "'>" . $firstPostInfo['title'] . "</a></div>by " . $postMemberObj->getMemberLink() . "<br>" . getPreciseTime($lastPostInfo['dateposted']); } else { $dispLastPost = "<div style='text-align: center'>No Posts</div>"; } $dispTopicCount = $boardObj->countTopics(); $dispPostCount = $boardObj->countPosts(); $arrDispSubForums = array(); $arrSubForums = $boardObj->getSubForums(); foreach ($arrSubForums as $value) { $subForumObj->select($value); $subForumInfo = $subForumObj->get_info_filtered(); $arrDispSubForums[] = "<a href='" . $MAIN_ROOT . "forum/viewboard.php?bID=" . $value . "'>" . $subForumInfo['name'] . "</a>"; } $dispSubForums = ""; if (count($arrDispSubForums) > 0) { $dispSubForums = "<br><br><b>Sub-Forums:</b><br> " . implode(" <b>|</b> ", $arrDispSubForums); } $dispBoards .= "\n\t\t\t\t<tr class='boardRows" . $newTopicBG . "'>\n\t\t\t\t\t<td class='boardName dottedLine" . $newTopicBG . "'><a href='viewboard.php?bID=" . $boardInfo['forumboard_id'] . "'>" . $boardInfo['name'] . "</a>" . $dispNewTopicIMG . "<br><span class='boardDescription'>" . $boardInfo['description'] . $dispSubForums . "</span></td>\n\t\t\t\t\t<td class='dottedLine boardLastPost" . $newTopicBG . "'>" . $dispLastPost . "</td>\n\t\t\t\t\t<td class='dottedLine boardTopicCount" . $newTopicBG . "' align='center'>" . $dispTopicCount . "<span id='forumPageTopicCount' style='display: none'> Topics</span></td>\n\t\t\t\t\t<td class='dottedLine boardTopicCount boardPostCount" . $newTopicBG . "' align='center'>" . $dispPostCount . "<span id='forumPagePostCount' style='display: none'> Posts</span></td>\n\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t"; } } if ($dispBoards != "") { echo "\n\t\t\t<tr>\n\t\t\t\t<td colspan='4' class='boardCategory'>\n\t\t\t\t\t" . $catInfo['name'] . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='boardTitles'>Forum:</td>\n\t\t\t\t<td class='boardTitles forumLastPost'>Last Post:</td>\n\t\t\t\t<td class='boardTitles forumTopicCount'>Topics:</td>\n\t\t\t\t<td class='boardTitles forumTopicCount'>Posts:</td>\n\t\t\t</tr>\n\t\t"; echo $dispBoards; echo "<tr><td colspan='4'><br></td></tr>"; }
$consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $cID = $_GET['cID']; $boardObj = new ForumBoard($mysqli); $categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id"); $categoryObj->set_assocTableName("forum_board"); $categoryObj->set_assocTableKey("forumboard_id"); $memberOptions = "<option value='select'>[SELECT]</option>"; $result = $mysqli->query("SELECT " . $dbprefix . "members.*, " . $dbprefix . "ranks.ordernum FROM " . $dbprefix . "members, " . $dbprefix . "ranks WHERE " . $dbprefix . "members.rank_id != '1' AND " . $dbprefix . "members.rank_id = " . $dbprefix . "ranks.rank_id ORDER BY " . $dbprefix . "ranks.ordernum DESC"); while ($row = $result->fetch_assoc()) { $memberRank->select($row['rank_id']); $dispRankName = $memberRank->get_info_filtered("name"); $memberOptions .= "<option value='" . $row['member_id'] . "'>" . $dispRankName . " " . filterText($row['username']) . "</option>"; } $boardOptions = "<option value='select'>[SELECT]</option>"; $result = $mysqli->query("SELECT forumcategory_id FROM " . $dbprefix . "forum_category ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $categoryObj->select($row['forumcategory_id']); $arrBoards = $categoryObj->getAssociateIDs(" ORDER BY sortnum"); $catInfo = $categoryObj->get_info_filtered(); $boardOptions .= "<option value='cat_" . $catInfo['forumcategory_id'] . "'>" . $catInfo['name'] . "</option>"; foreach ($arrBoards as $boardID) { $boardObj->select($boardID); $boardInfo = $boardObj->get_info_filtered(); $boardOptions .= "<option value='board_" . $boardInfo['forumboard_id'] . "'> " . $boardInfo['name'] . "</option>"; } } echo "\n\t<div class='formDiv'>\n\t\tUse the form below to assign moderators to different boards in your forum.\n\t\t<table class='formTable'>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Member:</td>\n\t\t\t\t<td class='main'><select id='memberModList' class='textBox'>" . $memberOptions . "</select></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='formLabel'>Board:</td>\n\t\t\t\t<td class='main'><select id='boardList' class='textBox'>" . $boardOptions . "</select></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='main' align='center' colspan='2'>\n\t\t\t\t\t<input type='button' class='submitButton' id='assignMod' style='width: 145px; margin: 20px auto' value='Assign as Moderator'>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='main' colspan='2'>\n\t\t\t\t\t<div class='dottedLine' style='padding-bottom: 3px; margin-top: 10px'><b>Board List:</b></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\n\t\t<div id='loadingSpiralPageList' style='display: none'>\n\t\t\t<p align='center' class='main'>\n\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t</p>\n\t\t</div>\n\t\t\n\t\t<div id='moderatorDiv'>\n\t\t\t<table class='formTable'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='formTitle' style='width: 50%'>Board:</td>\n\t\t\t\t\t<td class='formTitle' style='width: 35%'>Date Added:</td>\n\t\t\t\t\t<td class='formTitle' style='width: 15%'>Actions:</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='3' align='center'>\n\t\t\t\t\t\t<div class='shadedBox' style='width: 40%; margin: 20px auto'>\n\t\t\t\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t\t\t\t<i>No member selected!</i>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t\n\t<div id='boardError' style='display: none'>\n\t\t<p class='main' align='center'>\n\t\t\tYou must select a board!\n\t\t</p>\n\t</div>\n\t\n\t<div id='memberError' style='display: none'>\n\t\t<p class='main' align='center'>\n\t\t\tYou must select a member!\n\t\t</p>\n\t</div>\n\t\n\t<script type='text/javascript'>\n\t\n\t\t\$(document).ready(function() {\n\t\t\n\t\t\t\$('#memberModList').change(function() {\n\t\t\t\n\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\$('#moderatorDiv').fadeOut(250);\n\n\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/moderatorlist.php', { mID: \$('#memberModList').val() }, function(data) {\n\t\t\t\t\n\t\t\t\t\t\$('#moderatorDiv').html(data);\n\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\$('#moderatorDiv').fadeIn(250);\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t\$('#assignMod').click(function() {\n\t\t\t\n\t\t\t\tif(\$('#boardList').val() != 'select' && \$('#memberModList').val() != 'select') {\n\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\$('#moderatorDiv').fadeOut(250);\n\t\t\t\n\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/moderatorlist.php', { mID: \$('#memberModList').val(), bID: \$('#boardList').val(), action: 'add' }, function(data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#moderatorDiv').html(data);\n\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\$('#moderatorDiv').fadeIn(250);\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse if(\$('#memberModList').val() == 'select') {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#memberError').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Manage Moderators - Error',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#boardError').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Manage Moderators - Error',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t});\n\t\t\n\t\t});\t\n\t\t\n\t\t\n\t\tfunction deleteMod(boardID, memberID) {\n\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\$('#moderatorDiv').fadeOut(250);\n\t\n\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/moderatorlist.php', { mID: memberID, bID: boardID, action: 'delete' }, function(data) {\n\t\t\t\t\n\t\t\t\t\t\$('#moderatorDiv').html(data);\n\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\$('#moderatorDiv').fadeIn(250);\n\t\t\t\t\n\t\t\t\t});\n\t\t\t});\n\n\t\t}\n\t\n\t</script>\n";
if (count($_POST) > 0) { $breadcrumbObj->popCrumb(); $breadcrumbObj->addCrumb("Search Forum", $MAIN_ROOT . "forum/search.php"); $breadcrumbObj->addCrumb("Search Results"); } include $prevFolder . "include/breadcrumb.php"; $arrMemberList = array(); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "members WHERE disabled = '0' AND rank_id != '1' ORDER BY username"); while ($row = $result->fetch_assoc()) { $arrMemberList[] = array("id" => $row['member_id'], "value" => filterText($row['username'])); } $memberList = json_encode($arrMemberList); $filterBoardOptions[0] = "Search All Boards"; $result = $mysqli->query("SELECT " . $dbprefix . "forum_board.forumboard_id FROM " . $dbprefix . "forum_board, " . $dbprefix . "forum_category WHERE " . $dbprefix . "forum_board.forumcategory_id = " . $dbprefix . "forum_category.forumcategory_id AND " . $dbprefix . "forum_board.subforum_id = '0' ORDER BY " . $dbprefix . "forum_category.ordernum DESC, " . $dbprefix . "forum_board.sortnum"); while ($row = $result->fetch_assoc()) { $boardObj->select($row['forumboard_id']); if ($boardObj->memberHasAccess($memberInfo)) { $filterBoardOptions[$row['forumboard_id']] = $boardObj->get_info_filtered("name"); if (count($boardObj->getSubForums()) > 0) { recurseSubForums(" "); } } } function recurseSubForums($spacing) { global $filterBoardOptions, $boardObj, $memberInfo; $arrSubforums = $boardObj->getSubForums(); foreach ($arrSubforums as $boardID) { $boardObj->select($boardID); if ($boardObj->memberHasAccess($memberInfo)) { $filterBoardOptions[$boardObj->get_info("forumboard_id")] = $spacing . $boardObj->get_info_filtered("name");
if ($NUM_OF_PAGES == 0) { $NUM_OF_PAGES = 1; } if ($_GET['pID'] > $NUM_OF_PAGES) { echo "\n\t<script type='text/javascript'>window.location = 'viewtopic.php?tID=" . $_GET['tID'] . "';</script>\n\t"; exit; } $breadcrumbObj->setTitle($postInfo['title']); $breadcrumbObj->addCrumb("Home", $MAIN_ROOT); $breadcrumbObj->addCrumb("Forum", $MAIN_ROOT . "forum"); if ($boardInfo['subforum_id'] != 0) { $subForumObj = new ForumBoard($mysqli); $subForumID = $boardInfo['subforum_id']; $submForumBC = array(); while ($subForumID != 0) { $subForumObj->select($subForumID); $subForumInfo = $subForumObj->get_info_filtered(); $subForumID = $subForumInfo['subforum_id']; //$dispBreadCrumbChain = "<a href='".$MAIN_ROOT."forum/viewboard.php?bID=".$subForumInfo['forumboard_id']."'>".$subForumInfo['name']."</a> > ".$dispBreadCrumbChain; $subForumBC[] = array("link" => $MAIN_ROOT . "forum/viewboard.php?bID=" . $subForumInfo['forumboard_id'], "value" => $subForumInfo['name']); } krsort($subForumBC); foreach ($subForumBC as $bcInfo) { $breadcrumbObj->addCrumb($bcInfo['value'], $bcInfo['link']); } } $breadcrumbObj->addCrumb($boardInfo['name'], $MAIN_ROOT . "forum/viewboard.php?bID=" . $boardInfo['forumboard_id']); $breadcrumbObj->addCrumb($postInfo['title']); include $prevFolder . "include/breadcrumb.php"; $blnManagePosts = false; $dispManagePosts = "";
* * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/forumboard.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $boardObj = new ForumBoard($mysqli); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Boards"); $consoleObj->select($cID); if ($member->authorizeLogin($_SESSION['btPassword']) && $boardObj->select($_POST['bID'])) { $boardInfo = $boardObj->get_info_filtered(); if (isset($_POST['confirm'])) { $boardObj->delete(); $member->logAction("Deleted Forum Board: " . $boardInfo['name']); include "main_manageboards.php"; } else { $addMessage = ""; if (count($boardObj->getSubForums()) > 0) { $addMessage = "<br><br>All sub-forums will be moved to the parent category/sub-forum."; } echo "\n\t\t\n\t\t\t<p class='main' align='center'>\n\t\t\t\tAre you sure you want to delete the board, <b>" . $boardInfo['name'] . "</b>?<br><br>All posts in this board will also be deleted." . $addMessage . "\n\t\t\t</p>\n\t\t\n\t\t"; } }
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } $boardObj = new ForumBoard($mysqli); if (!$boardObj->objTopic->select($_GET['topicID'])) { echo "\n\t\t<script type='text/javascript'>\n\t\t\twindow.location = '" . $MAIN_ROOT . "members'\n\t\t</script>\n\t"; exit; } $topicInfo = $boardObj->objTopic->get_info_filtered(); $boardObj->select($boardObj->objTopic->get_info("forumboard_id")); $boardInfo = $boardObj->get_info_filtered(); $forumCatObj = new Basic($mysqli, "forum_category", "forumcategory_id"); $boardObj->objPost->select($topicInfo['forumpost_id']); $postInfo = $boardObj->objPost->get_info_filtered(); $boardIDs = $boardObj->getAllBoards(); $catName = ""; $nonSelectableItems = array(); foreach ($boardIDs as $id) { $boardObj->select($id); $forumCatID = $boardObj->get_info("forumcategory_id"); $forumCatObj->select($forumCatID); if ($forumCatObj->get_info_filtered("name") != $catName) { $catName = $forumCatObj->get_info_filtered("name"); $catKey = "category_" . $forumCatID; $forumBoardOptions[$catKey] = "<b>" . $catName . "</b>";
* */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/basicsort.php"; include_once "../../../../classes/forumboard.php"; // Start Page $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Add Board"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $boardObj = new ForumBoard($mysqli); if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { if (isset($_POST['subforum']) && $boardObj->select($_POST['subforum'])) { $arrSubForums = $boardObj->getSubForums(); $arrSelectBoard = ""; if (isset($_POST['bID']) && $boardObj->select($_POST['bID'])) { $arrSelectBoard = $boardObj->findBeforeAfter(); } else { $_POST['bID'] = ""; } foreach ($arrSubForums as $forumID) { if ($forumID != $_POST['bID']) { $boardObj->select($forumID); $boardInfo = $boardObj->get_info_filtered(); $selectBoard = ""; if ($_POST['bID'] != "" && $arrSelectBoard[0] == $boardInfo['forumboard_id']) { $selectBoard = " selected"; }
$selectPage = " selected"; } $pageoptions .= "<option value='" . $i . "'" . $selectPage . ">" . $i . "</option>"; } $dispPageSelectTop = ""; $dispPageSelectBottom = ""; if ($blnPageSelect) { $dispPageSelectTop = "\n\t<p style='margin-top: 0px'><b>Page:</b> <select id='pageSelectTop' class='textBox'>" . $pageoptions . "</select> <input type='button' id='btnPageSelectTop' class='submitButton' value='GO' style='width: 40px'></p>\n\t<p style='margin-top: 0px'>" . $dispPreviousPage . $dispNextPage . "</p>\n\t"; $dispPageSelectBottom = "\n\t<p style='margin-top: 0px'><b>Page:</b> <select id='pageSelectBottom' class='textBox'>" . $pageoptions . "</select> <input type='button' id='btnPageSelectBottom' class='submitButton' value='GO' style='width: 40px'></p>\n\t<p style='margin-top: 0px'>" . $dispPreviousPage . $dispNextPage . "</p>\n\t"; } // Subforums $subForumObj = new ForumBoard($mysqli); $arrSubForums = $boardObj->getSubForums(); $dispSubForums = ""; foreach ($arrSubForums as $boardID) { $subForumObj->select($boardID); if ($subForumObj->memberHasAccess($memberInfo)) { $subForumInfo = $subForumObj->get_info_filtered(); $arrForumTopics = $subForumObj->getForumTopics(); $newTopicBG = ""; $dispNewTopicIMG = ""; if ($LOGGED_IN && $subForumObj->hasNewTopics($memberInfo['member_id'])) { $dispNewTopicIMG = " <img style='margin-left: 5px' src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/forum-new.png' title='New Posts!'>"; $newTopicBG = " boardNewPostBG"; } // Get Last Post Display Info if (count($arrForumTopics) > 0) { $subForumObj->objPost->select($arrForumTopics[0]); $firstPostInfo = $subForumObj->objPost->get_info_filtered(); $subForumObj->objTopic->select($firstPostInfo['forumtopic_id']); $lastPostID = $subForumObj->objTopic->get_info("lastpost_id");
$consoleObj->select($forumAttachmentsCID); $blnCheckForumAttachments = $member->hasAccess($consoleObj); $consoleObj->select($cID); if ($blnCheckForumAttachments) { include_once $prevFolder . "classes/download.php"; include_once $prevFolder . "classes/downloadcategory.php"; $attachmentObj = new Download($mysqli); $downloadCatObj = new DownloadCategory($mysqli); $downloadCatObj->selectBySpecialKey("forumattachments"); $forumAttachmentCatID = $downloadCatObj->get_info("downloadcategory_id"); } $boardObj = new ForumBoard($mysqli); $categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id"); $categoryObj->set_assocTableName("forum_board"); $categoryObj->set_assocTableKey("forumboard_id"); if (!$boardObj->select($_GET['bID']) || $boardObj->select($_GET['bID']) && !$boardObj->memberHasAccess($memberInfo)) { echo "<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members'</script>"; exit; } $boardInfo = $boardObj->get_info_filtered(); $blnPostReply = false; $addToForm = ""; if (isset($_GET['tID']) && $boardObj->objTopic->select($_GET['tID'])) { $blnPostReply = true; $topicInfo = $boardObj->objTopic->get_info(); // Check if topic is actually in the selected board if ($topicInfo['forumboard_id'] != $boardInfo['forumboard_id']) { echo "<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members'</script>"; exit; } elseif ($topicInfo['lockstatus'] == 1) { echo "\n\t\t\t<div id='lockedMessage' style='display: none'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tThis topic is locked!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#lockedMessage').dialog({\n\t\t\t\t\t\ttitle: 'Post Reply - Locked!',\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tzIndex: 999999,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclose: function(event, ui) {\n\t\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "forum/viewtopic.php?tID=" . $topicInfo['forumtopic_id'] . "'\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\n\t\t\t\t});\n\t\t\t</script>\n\t\t";
$arrSpecialMenuItems['newmembers'] .= "</div>"; } $arrSpecialMenuItems['newmembers'] .= "<div style='clear: both'></div></div>"; // LATEST FORUM ACTIVITY $forumActivityObj = new ForumBoard($mysqli); $arrSpecialMenuItems['forumactivity'] = "<div style='margin-left: 3px; margin-right: 3px; margin-top: 5px; margin-bottom: 20px'>"; $counter = 0; $postCount = 0; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "forum_post ORDER BY dateposted DESC"); while ($row = $result->fetch_assoc()) { $blnShowPost = false; $forumActivityObj->objTopic->select($row['forumtopic_id']); $menuTopicInfo = $forumActivityObj->objTopic->get_info_filtered(); $forumActivityObj->objPost->select($menuTopicInfo['forumpost_id']); $menuTopicPostInfo = $forumActivityObj->objPost->get_info_filtered(); $forumActivityObj->select($menuTopicInfo['forumboard_id']); $menuBoardInfo = $forumActivityObj->get_info_filtered(); if ($menuBoardInfo['accesstype'] == 0) { $blnShowPost = true; $postCount++; } elseif ($menuBoardInfo['accesstype'] == 1 && LOGGED_IN && $forumActivityObj->memberHasAccess($memberInfo)) { $blnShowPost = true; $postCount++; } if ($blnShowPost) { $addCSS = ""; if ($counter == 0) { $addCSS = " alternateBGColor"; $counter = 1; } else { $counter = 0;
$rankCatObj = new RankCategory($mysqli); $rankObj = new Rank($mysqli); $tempMemObj = new Member($mysqli); if ($_POST['submit']) { // Check Board Name if (trim($_POST['boardname']) == "") { $dispError .= " <b>·</b> Board name may not be blank.<br>"; $countErrors++; } // Check Category if (!$categoryObj->select($_POST['forumcat'])) { $dispError .= " <b>·</b> You selected an invalid forum category.<br>"; $countErrors++; } // Check Subforum if ($_POST['subforum'] == 1 && $boardObj->select($_POST['subforumboard'])) { $setSubForum = $_POST['subforumboard']; } else { $setSubForum = 0; } $boardObj = new ForumBoard($mysqli); // Reset boardObj $boardObj->setSubForumID($setSubForum); // Check Order $boardObj->setCategoryKeyValue($categoryObj->get_info("forumcategory_id")); $intNewOrderSpot = $boardObj->validateOrder($_POST['displayorder'], $_POST['beforeafter']); if ($intNewOrderSpot === false) { $dispError .= " <b>·</b> You selected an invalid display order.<br>"; $countErrors++; } // Forum Access