$member = new Member($mysqli); $rankObj = new Rank($mysqli); $rankCatObj = new RankCategory($mysqli); $breadcrumbObj->setTitle("Ranks"); $breadcrumbObj->addCrumb("Home", $MAIN_ROOT); $breadcrumbObj->addCrumb("Ranks"); include $prevFolder . "include/breadcrumb.php"; ?> <table id='rankPageTable' class='formTable' style='width: 75%; margin-left: auto; margin-right: auto'> <?php $result = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory WHERE hidecat = '0' ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $rankCatObj->select($row['rankcategory_id']); $rankCatInfo = $rankCatObj->get_info_filtered(); if ($rankCatInfo['useimage'] == 1 && $rankCatInfo['imageurl'] != "") { if ($rankCatInfo['imagewidth'] == 0) { $imageURL = $rankCatObj->getLocalImageURL(); $imageSize = getimagesize($imageURL); $rankCatInfo['imagewidth'] = $imageSize[0]; } if ($rankCatInfo['imageheight'] == 0) { $imageURL = $rankCatObj->getLocalImageURL(); $imageSize = getimagesize($imageURL); $rankCatInfo['imageheight'] = $imageSize[1]; } echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main' align='center' colspan='2'><img src='" . $rankCatInfo['imageurl'] . "' width='" . $rankCatInfo['imagewidth'] . "' height='" . $rankCatInfo['imageheight'] . "' onmouseover=\"showToolTip('<b>" . $rankCatInfo['name'] . "</b><br>" . $rankCatInfo['description'] . "')\" onmouseout='hideToolTip()'></td>\n\t\t\t</tr>\n\t\t"; } else { $dispCatDesc = ""; if ($rankCatInfo['description'] != "") {
if (isset($_GET['replyall'])) { $pmObj->set_assocTableKey("pmmember_id"); $arrPMMID = $pmObj->getAssociateIDs(); $arrGroups['list'] = array(); $arrGroups['rank'] = array(); $arrGroups['squad'] = array(); $arrGroups['tournament'] = array(); $arrGroups['rankcategory'] = array(); foreach ($arrPMMID as $pmmID) { $multiMemPMObj->select($pmmID); $multiMemPMInfo = $multiMemPMObj->get_info(); if ($multiMemPMInfo['grouptype'] != "" && !in_array($multiMemPMInfo['group_id'], $arrGroups[$multiMemPMInfo['grouptype']])) { $arrGroups[$multiMemPMInfo['grouptype']][] = $multiMemPMInfo['group_id']; switch ($multiMemPMInfo['grouptype']) { case "rankcategory": $dispName = $rankCatObj->select($multiMemPMInfo['group_id']) ? $rankCatObj->get_info_filtered("name") . " - Category" : ""; $_SESSION['btComposeList'][$pmSessionID]['rankcategory'][] = $multiMemPMInfo['group_id']; $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t"; break; case "rank": $dispName = $member->objRank->select($multiMemPMInfo['group_id']) ? $member->objRank->get_info_filtered("name") . " - Rank" : ""; $_SESSION['btComposeList'][$pmSessionID]['rank'][] = $multiMemPMInfo['group_id']; $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rank_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rank_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t"; break; case "squad": $dispName = $squadObj->select($multiMemPMInfo['group_id']) ? $squadObj->get_info_filtered("name") . " Members" : ""; $_SESSION['btComposeList'][$pmSessionID]['squad'][] = $multiMemPMInfo['group_id']; $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'squad_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'squad_" . $multiMemPMInfo['group_id'] . "'>×</div></div>\");\n\t\t\t\t\t\t\t\t\t"; break; case "tournament": $dispName = $tournamentObj->select($multiMemPMInfo['group_id']) ? $tournamentObj->get_info_filtered("name") . " Players" : "";
$_SESSION['btAccessRules'] = array(); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "consolecategory WHERE adminoption != '1' ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $consoleCatOptions .= "<option value='" . $row['consolecategory_id'] . "'>" . filterText($row['name']) . "</option>"; } $result = $mysqli->query("SELECT * FROM " . $dbprefix . "rankcategory ORDER BY ordernum DESC"); $counter = 1; while ($row = $result->fetch_assoc()) { $arrRankCats[] = $row['rankcategory_id']; } foreach ($arrRankCats as $rankCat) { $rankCatObj->select($rankCat); $arrRanks = $rankCatObj->getAssociateIDs(); if (count($arrRanks) > 0) { $sqlRanks = "('" . implode("','", $arrRanks) . "')"; $rankOptions .= "<span style='font-weight: bold; text-decoration: underline'>" . $rankCatObj->get_info_filtered("name") . "</span> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('ranksection_" . $rankCat . "', 1)\">Check All</a> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('ranksection_" . $rankCat . "', 0)\">Uncheck All</a><br>"; $rankOptions .= "<div id='ranksection_" . $rankCat . "'>"; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE rank_id != '1' AND rank_id IN " . $sqlRanks . " ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $rankOptions .= "<input type='checkbox' name='rankaccess_" . $row['rank_id'] . "' value='1' class='textBox'> " . filterText($row['name']) . "<br>"; $counter++; } $rankOptions .= "</div><br>"; } } $rankOptionsHeight = $counter * 20; if ($rankOptionsHeight > 300) { $rankOptionsHeight = 300; } $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 AND " . $dbprefix . "members.disabled = '0' ORDER BY " . $dbprefix . "ranks.ordernum DESC");
$rankID = str_replace("rankaccess_", "", $checkBoxName); if (in_array($accessType, $arrAccessOptions) && $rankObj->select($rankID)) { $_SESSION['btRankAccessCache'][$checkBoxName] = $accessType; } elseif ($accessType == 0 && $rankObj->select($rankID)) { $_SESSION['btRankAccessCache'][$checkBoxName] = 0; unset($_SESSION['btRankAccessCache'][$checkBoxName]); } } } // Display List $rankoptions = ""; $result1 = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory ORDER BY ordernum DESC"); while ($row = $result1->fetch_assoc()) { $rankCatObj->select($row['rankcategory_id']); $arrRanks = $rankCatObj->getRanks(); $rankCatName = $rankCatObj->get_info_filtered("name"); if (count($arrRanks) > 0) { $rankoptions .= "<b><u>" . $rankCatName . "</u></b> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('rankcat_" . $row['rankcategory_id'] . "', 1)\">Check All</a> - <a href='javascript:void(0)' onclick=\"selectAllCheckboxes('rankcat_" . $row['rankcategory_id'] . "', 0)\">Uncheck All</a><br>"; $rankoptions .= "<div id='rankcat_" . $row['rankcategory_id'] . "'>"; foreach ($arrRanks as $rankID) { $dispRankAccess = ""; if ($_SESSION['btRankAccessCache']["rankaccess_" . $rankID] == 1) { $dispRankAccess = " - <span class='allowText' style='font-style: italic'>Read-Only</span>"; } elseif ($_SESSION['btRankAccessCache']["rankaccess_" . $rankID] == 2) { $dispRankAccess = " - <span class='pendingFont' style='font-style: italic'>Full Access</span>"; } $rankObj->select($rankID); $rankName = $rankObj->get_info_filtered("name"); $rankoptions .= "<input type='checkbox' name='rankaccess_" . $rankID . "' value='1' data-rankaccess='1'> " . $rankName . $dispRankAccess . "<br>"; $rankCounter++; }
$dispHPNews .= "\t\t\n\t\t\t<div class='newsDiv' id='newsDiv_" . $newsInfo['news_id'] . "'>\n\t\t\t\t<div class='postInfo'>\n\t\t\t\t\t<div id='newsPostAvatar' style='float: left'><img src='" . $posterInfo['avatar'] . "' class='avatarImg'></div>\n\t\t\t\t\t<div id='newsPostInfo' style='float: left; margin-left: 15px'>posted by " . $member->getMemberLink() . " - " . getPreciseTime($newsInfo['dateposted']) . $dispNewsType . "<br>\n\t\t\t\t\t<span class='subjectText'>" . $newsInfo['postsubject'] . "</span></div>\n\t\t\t\t</div>\n\t\t\t\t<br>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px'></div>\n\t\t\t\t<div class='postMessage'>\n\t\t\t\t\t" . $dispNews . "\n\t\t\t\t</div>\n\t\t\t\t<div class='dottedLine' style='margin-top: 5px; margin-bottom: 5px'></div>\n\t\t\t\t<div class='main' style='margin-top: 0px; margin-bottom: 10px; padding-left: 5px'>" . $dispLastEdit . "</div>\n\t\t\t\t<p style='padding: 0px; margin: 0px' align='right'><b><a href='" . $MAIN_ROOT . "news/viewpost.php?nID=" . $newsInfo['news_id'] . "#comments'>Comments (" . $newsObj->countComments() . ")</a></b></p>\n\t\t\t</div>\n\t\t\n\t\t\n\t\t"; } } if ($dispAnnouncements != "") { echo "<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Announcements</p>"; echo $dispAnnouncements; if ($dispHPNews != "") { echo "<br>"; } } if ($dispHPNews != "") { echo "<p class='main' style='font-size: 18px; font-weight: bold; padding-left: 15px'>Latest News</p>"; echo $dispHPNews; } echo "\n<div>\n\n<table class='formTable' style='width: 65%; margin-left: auto; margin-right: auto; border-spacing: 0px' align='center'>\n\t<tr>\n\t\t<td class='formTitle' align='center'>Members Online Statistics</td>\n\t</tr>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n\t\t\t<b>Members Online:</b> " . $membersOnlineCount . "<br>\n\t\t\t<p>\n\t\t\t\t"; if (constant('LOGGED_IN')) { echo $membersOnlineList; } else { echo "You must be logged in to view members online"; } echo "\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n"; foreach ($arrRankCatCount as $key => $value) { $rankCatObj->select($key); $rankCatColor = $rankCatObj->get_info_filtered("color"); $rankCatName = $rankCatObj->get_info_filtered("name"); $arrDispRankCat[$key] = "<span style='color: " . $rankCatColor . "'><b>" . $value . "</b> " . $rankCatName . "</span>"; } $dispRankCatCount = implode(", ", $arrDispRankCat); echo "<p>" . $dispRankCatCount . "</p>\n\t\t</td>\n\t</tr>\n</table>\n<table class='formTable' style='width: 65%; margin-left: auto; margin-right: auto; border-spacing: 0px' align='center'>\n\t<tr>\n\t\t<td class='formTitle' align='center'>Website Statistics</td>\n\t<tr>\n\t\t<td class='main solidBox' style='border-top-width: 0px' align='center'>\n\t\t\t<p>\n\t\t\t\t<b>Most Members Online:</b> " . $websiteInfo['mostonline'] . " - " . getPreciseTime($websiteInfo['mostonlinedate']) . "<br><br>\n\t\t\t\t<b>Total Page Views:</b> " . $totalPageViews[0] . "<br>\n\t\t\t\t<b>Total Unique Views:</b> " . $totalUniqueViews->num_rows . "<br><br>\n\t\t\t\tYou have viewed this site <b>" . $totalYourViews['totalhits'] . "</b> times.<br><br>\n\t\t\t\t" . $dispLastVisitDate . "\n\t\t\t</p>\n\t\t</td>\n\t</tr>\n</table>\n\n</div>\n<br><br>\n\n\t"; echo "<!-- " . phpversion() . " -->"; include "themes/" . $THEME . "/_footer.php";