} } $cID = $_GET['cID']; $profileCategoryObj = new ProfileCategory($mysqli); $profileOptionObj = new ProfileOption($mysqli); $gameObj = new Game($mysqli); $arrGames = $gameObj->getGameList(); $consoleCatSettingObj = new Basic($mysqli, "consolecategory", "consolecategory_id"); $arrSocialMediaInfo = $member->objSocial->get_entries(array(), "ordernum DESC"); // Setup Default Console Category Select Options $arrPrivileges = $memberRank->get_privileges(); $arrConsoleCats = array(); $consoleSettingObj = new ConsoleOption($mysqli); foreach ($arrPrivileges as $consoleOptionID) { $consoleSettingObj->select($consoleOptionID); $consoleCatID = $consoleSettingObj->get_info("consolecategory_id"); if (!in_array($consoleCatID, $arrConsoleCats)) { $consoleCatSettingObj->select($consoleCatID); $consoleCatOrder = $consoleCatSettingObj->get_info("ordernum"); $arrConsoleCats[$consoleCatOrder] = $consoleCatID; } } krsort($arrConsoleCats); foreach ($arrConsoleCats as $value) { $consoleCatSettingObj->select($value); $defaultConsoleOptions[$value] = $consoleCatSettingObj->get_info_filtered("name"); } // Setup Notification Settings Options $notificationOptions = array("Show notification with sound", "Show notification without sound", "Don't show notifications"); // Setup Forum Settings Options $forumPostsPerPage = array(10 => 10, 25 => 25, 50 => 50, 75 => 75, 100 => 100);
while ($arrConsoleOptions = $consoleOptions->fetch_assoc()) { $tempCat = $arrConsoleOptions['consolecategory_id']; $arrFormatOptions[$tempCat][] = $arrConsoleOptions['console_id']; } $countConsoleCats = 0; $consoleJSCode = ""; $consoleCatObj = new Basic($mysqli, "consolecategory", "consolecategory_id"); foreach ($arrFormatOptions as $key => $arrOptions) { $consoleCatObj->select($key); $consoleCatInfo = $consoleCatObj->get_info(); if (count($arrOptions) > 0) { $countConsoleCats++; echo "<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<u><b>" . $consoleCatInfo['name'] . "</b></u> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('category" . $countConsoleCats . "', 1)\">Check All</a> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('category" . $countConsoleCats . "', 0)\">Uncheck All</a><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div id='category" . $countConsoleCats . "'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; foreach ($arrOptions as $consoleOption) { $consoleObj->select($consoleOption); $consoleOptionInfo = $consoleObj->get_info(); $consoleJSCode .= "arrConsoleIDs[" . $consoleOptionInfo['console_id'] . "] = \$('#consoleid_" . $consoleOptionInfo['console_id'] . "').attr('checked'); \n\t\t\t\t\t\t\t\t\t"; if ($consoleOptionInfo['pagetitle'] != "-separator-") { if ($consoleObj->hasAccess($rankInfo['rank_id'])) { $dispSelected = " checked"; } else { $dispSelected = ""; } echo " <input type='checkbox' name='consoleid_" . $consoleOptionInfo['console_id'] . "' value='1'" . $dispSelected . "> " . $consoleOptionInfo['pagetitle'] . "<br>"; } elseif ($consoleOptionInfo['pagetitle'] == "-separator-") { if ($consoleObj->hasAccess($rankInfo['rank_id'])) { $dispSelected = " checked"; } else { $dispSelected = ""; } $dispSeparator = "<div class='dashedLine' style='width: 250px; margin: 6px 1px; padding: 0px; float: left'></div>";
$memberRankID = $memberInfo['rank_id']; $memberRank = new Rank($mysqli); $memberRank->select($memberRankID); $rankPrivileges = $member->get_privileges(); $clickCategory = ""; $strPrivileges = implode(",", $rankPrivileges); $result = $mysqli->query("SELECT * FROM " . $mysqli->get_tablePrefix() . "consolecategory ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $arrConsoleCats[] = $row['consolecategory_id']; } $result->free(); $arrFullySortedConsole = array(); $consoleObj = new ConsoleOption($mysqli); foreach ($rankPrivileges as $consoleoption) { $consoleObj->select($consoleoption); $consoleInfo = $consoleObj->get_info(); if ($member->hasAccess($consoleObj) && $consoleInfo['hide'] == 0) { $sortNum = array_search($consoleInfo['consolecategory_id'], $arrConsoleCats); $arrFullySortedConsole[$sortNum][] = $consoleoption; } } $consoleCatObj = new ConsoleCategory($mysqli); $dispConsoleOptions = ""; $dispConsoleCategories = ""; $counter = 0; $totalConsoleCats = count($arrConsoleCats); foreach ($arrConsoleCats as $key => $categoryID) { $consoleCatObj->select($categoryID); $consoleCatInfo = $consoleCatObj->get_info_filtered(); $arrConsoleOptions = $arrFullySortedConsole[$key]; $categoryCSS = "consoleCategory_clicked";