$ipbanObj = new Basic($mysqli, "ipban", "ipaddress"); if ($ipbanObj->select($IP_ADDRESS, false)) { $ipbanInfo = $ipbanObj->get_info(); if (time() < $ipbanInfo['exptime'] or $ipbanInfo['exptime'] == 0) { die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "banned.php';</script>"); } else { $ipbanObj->delete(); } } // Start Page $PAGE_NAME = "Ranks - "; $dispBreadCrumb = ""; include $prevFolder . "themes/" . $THEME . "/_header.php"; $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) {
exit; } } include_once $prevFolder . "classes/btupload.php"; include_once $prevFolder . "classes/rankcategory.php"; $cID = $_GET['cID']; if (isset($_POST['submit']) && $_POST['submit']) { $countErrors = 0; // Check Rank Name $checkRankName = trim($_POST['rankname']); if ($checkRankName == "") { $countErrors++; $dispError .= " <b>·</b> You may not enter a blank rank name.<br>"; } // Check Rank Category $rankCatObj = new RankCategory($mysqli); if (!$rankCatObj->select($_POST['rankcat'])) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid rank category.<br>"; } // Check Image Height if (!is_numeric($_POST['rankimageheight']) and trim($_POST['rankimageheight']) != "") { $countErrors++; $dispError .= " <b>·</b> The Image Height must be a numeric value.<br>"; } elseif ($_POST['rankimageheight'] <= 0 and is_numeric($_POST['rankimageheight'])) { $countErrors++; $dispError .= " <b>·</b> The Image Height must be a value greater than 0.<br>"; } if ($_FILES['rankimagefile']['name'] == "" and (trim($_POST['rankimageheight']) == "" or $_POST['rankimageheight'] <= 0)) { $countErrors++; $dispError .= " <b>·</b> You must supply an image height for images that aren't uploaded.<br>";
// Start Page $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Private Messages"); $consoleObj->select($cID); $consoleInfo = $consoleObj->get_info_filtered(); $consoleTitle = $consoleInfo['pagetitle']; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $PAGE_NAME = "Compose Message - " . $consoleTitle . " - "; $dispBreadCrumb = "<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>" . $consoleTitle . "</a> > Compose Message"; $EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n\n<style>\n\t.ui-autocomplete {\n\t\tmax-height: 150px;\n\t\toverflow-y: auto;\n\t}\n</style>\n"; $prevFolder = "../../"; include "../../themes/" . $THEME . "/_header.php"; echo "\n<div class='breadCrumbTitle' id='breadCrumbTitle'>Compose Message</div>\n<div class='breadCrumb' id='breadCrumb' style='padding-top: 0px; margin-top: 0px'>\n{$dispBreadCrumb}\n</div>\n"; $pmObj = new BasicOrder($mysqli, "privatemessages", "pm_id"); $rankCatObj = new RankCategory($mysqli); $squadObj = new Squad($mysqli); $tournamentObj = new Tournament($mysqli); $multiMemPMObj = new Basic($mysqli, "privatemessage_members", "pmmember_id"); $pmObj->set_assocTableName("privatemessage_members"); $pmObj->set_assocTableKey("member_id"); // Check Login $LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $memberInfo = $member->get_info_filtered(); $dispError = ""; $countErrors = 0; if ($_POST['submit']) { $pmSessionID = $_POST['pmsessionid']; // Check To $arrReceivers = array();
while ($row = $result->fetch_assoc()) { $arrRanks[] = $row['rank_id']; } $sqlRanks = "('" . implode("','", $arrRanks) . "')"; $result = $mysqli->query("SELECT * FROM " . $dbprefix . "members WHERE rank_id IN " . $sqlRanks . " AND onia = '0'"); while ($row = $result->fetch_assoc()) { $member->select($row['member_id']); $memberListInfo = $member->get_info(); $rankObj->select($row['rank_id']); $memRankListInfo = $rankObj->get_info(); if (floor(time() / 86400) - floor($memberListInfo['datejoined'] / 86400) >= $memRankListInfo['autodisable']) { $member->update(array("disabled", "disableddate"), array(1, $time)); $member->logAction("Disabled for failure to be promoted before " . $memRankListInfo['autodisable'] . " days."); } } $rankCatObj = new RankCategory($mysqli); $gameObj = new Game($mysqli); $breadcrumbObj->setTitle("Members"); $breadcrumbObj->addCrumb("Home", $MAIN_ROOT); $breadcrumbObj->addCrumb("Members"); include $prevFolder . "include/breadcrumb.php"; ?> <div id='tiltPhoneImg' style='display: none'><img src='<?php echo $MAIN_ROOT; ?> images/tiltphone.png'><p align='center'>need more space<br>tilt your phone!</p></div> <table class='formTable' id='membersPageTable'> <?php $maxDSLIntervals = floor($websiteInfo['maxdsl'] / 3); $arrCountDSL[1] = 0; $arrCountDSL[2] = 0;
* * Author: Bluethrust Web Development * E-mail: support@bluethrust.com * Website: http://www.bluethrust.com * * License: http://www.bluethrust.com/license.php * */ include_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/rankcategory.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $rankCatObj = new RankCategory($mysqli); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Rank Categories"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $rankCatObj->select($_POST['rID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $rankCatInfo = $rankCatObj->get_info_filtered(); $arrRanks = $rankCatObj->getAssociateIDs(); if (count($arrRanks) > 0) { echo "<div id='newDeleteMessage' style='display: none'><p align='center'>There are currently ranks under the rank category <b>" . $rankCatInfo['name'] . "</b>. Please change all ranks with this category before deleting it.</p></div>"; echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#deleteMessage').dialog('close');\n\t\t\t\t\t\t\$('#newDeleteMessage').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Manage Rank Categories - Delete',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 9999,\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\twidth: 400,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'OK': 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});\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t"; } elseif (isset($_POST['confirm']) && $_POST['confirm'] == "1") { $rankCatObj->delete();
include_once "../../../../classes/member.php"; include_once "../../../../classes/basicsort.php"; include_once "../../../../classes/forumboard.php"; include_once "../../../../classes/rankcategory.php"; // Start Page $consoleObj = new ConsoleOption($mysqli); $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $cID = $consoleObj->findConsoleIDByName("Add Board"); $consoleObj->select($cID); $checkAccess1 = $member->hasAccess($consoleObj); $cID = $consoleObj->findConsoleIDByName("Manage Boards"); $consoleObj->select($cID); $checkAccess2 = $member->hasAccess($consoleObj); $boardObj = new ForumBoard($mysqli); $rankCatObj = new RankCategory($mysqli); $rankObj = new Rank($mysqli); if ($member->authorizeLogin($_SESSION['btPassword']) && ($checkAccess1 || $checkAccess2)) { // Set Access if (isset($_POST['accessInfo'])) { $arrAccessOptions = array(1, 2); $accessInfo = json_decode($_POST['accessInfo'], true); foreach ($accessInfo as $checkBoxName => $accessType) { $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]); } }
* */ if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") { exit; } else { $memberInfo = $member->get_info_filtered(); $consoleObj->select($_GET['cID']); if (!$member->hasAccess($consoleObj)) { exit; } } include_once $prevFolder . "classes/btupload.php"; include_once $prevFolder . "classes/consolecategory.php"; include_once $prevFolder . "classes/rankcategory.php"; $cID = $_GET['cID']; $rankCatObj = new RankCategory($mysqli); $consoleCatObj = new ConsoleCategory($mysqli); $failbanObj = new Basic($mysqli, "failban", "failban_id"); $intMaxAttempts = 3; if ($_POST['submit']) { $countErrors = 0; // Check Page Title if (trim($_POST['pagetitle']) == "") { $countErrors++; $dispError .= " <b>·</b> You must give the console option a page title.<br>"; } // Check Console Category if (!$consoleCatObj->select($_POST['consolecat'])) { $countErrors++; $dispError .= " <b>·</b> You selected an invalid console category.<br>"; } else {
die("Installer Lock File Exists. Please delete if you wish installation to continue."); } elseif (!file_exists("_config.php") && !file_exists("installer/lock.txt") || file_exists("installer/_installrunning.txt") && file_get_contents("installer/_installrunning.txt") != "done") { file_put_contents("installer/_installrunning.txt", ""); echo "\n\t\t<script type='text/javascript'>\n\t\t\twindow.location = 'installer/index.php'\n\t\t</script>\n\t"; die; } //End Installer Code - Can Be Deleted After Install For Security // Config File $prevFolder = ""; include "_setup.php"; // Start Page $dispBreadCrumb = ""; include "themes/" . $THEME . "/_header.php"; $member = new Member($mysqli); $rankObj = new Rank($mysqli); $rankCatObj = new RankCategory($mysqli); // Update members table to log out inactive members $mysqli->query("UPDATE " . $dbprefix . "members SET loggedin = '0' WHERE loggedin = '1' AND lastseen < '" . (time() - 600) . "'"); $result = $mysqli->query("SELECT member_id FROM " . $dbprefix . "members WHERE loggedin = '1' AND rank_id != '1' AND disabled != '1'"); if ($result->num_rows > $websiteInfo['mostonline']) { $webInfoObj->multiUpdate(array("mostonline", "mostonlinedate"), array($result->num_rows, time())); } $membersOnlineCount = $result->num_rows; $arrMembersOnline = array(); $arrRankCatCount = array(); $arrDispRankCat = array(); $result2 = $mysqli->query("SELECT rankcategory_id FROM " . $dbprefix . "rankcategory WHERE hidecat = '0' ORDER BY ordernum DESC"); while ($row = $result2->fetch_assoc()) { $arrDispRankCat[$row['rankcategory_id']] = ""; $arrRankCatCount[$row['rankcategory_id']] = 0; }
/* * 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_once "../../../../_setup.php"; include_once "../../../../classes/member.php"; include_once "../../../../classes/rank.php"; include_once "../../../../classes/consoleoption.php"; include_once "../../../../classes/rankcategory.php"; $member = new Member($mysqli); $member->select($_SESSION['btUsername']); $rankCatObj = new RankCategory($mysqli); $consoleObj = new ConsoleOption($mysqli); $cID = $consoleObj->findConsoleIDByName("Manage Rank Categories"); $consoleObj->select($cID); $_GET['cID'] = $cID; if ($member->authorizeLogin($_SESSION['btPassword'])) { $memberInfo = $member->get_info_filtered(); if ($member->hasAccess($consoleObj) && $rankCatObj->select($_POST['rID'])) { define('MEMBERRANK_ID', $memberInfo['rank_id']); $rankCatObj->move($_POST['cDir']); include "main.php"; } }
} else { $strCatImageURL = "images/ranks/" . $uploadFile->getUploadedFileName(); } } else { $strCatImageURL = $_POST['catimageurl']; } } if ($strCatImageURL == "") { $_POST['useimage'] = 0; } } if ($countErrors == 0) { // No errors... Add to DB $arrColumns = array("name", "imageurl", "ordernum", "hidecat", "useimage", "description", "imagewidth", "imageheight", "color"); $arrValues = array($_POST['catname'], $strCatImageURL, $intNewCatOrderNum, $_POST['hidecat'], $_POST['useimage'], $_POST['catdesc'], $_POST['catimagewidth'], $_POST['catimageheight'], $_POST['rankcolor']); $newCat = new RankCategory($mysqli); if ($newCat->addNew($arrColumns, $arrValues)) { // Added New Category... Now set the ranks in this category $newCatInfo = $newCat->get_info(); $rankObj = new Rank($mysqli); $result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE rank_id != '1'"); while ($row = $result->fetch_assoc()) { $postVar = "rankid_" . $row['rank_id']; if (isset($_POST[$postVar]) && $_POST[$postVar] == 1) { if ($rankObj->select($row['rank_id'])) { $arrColumn = array("rankcategory_id"); $arrValue = array($newCatInfo['rankcategory_id']); $rankObj->update($arrColumn, $arrValue); } } }