Example #1
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/consolecategory.php";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$cID = $consoleObj->findConsoleIDByName("Manage Console Options");
$consoleObj->select($cID);
$consoleCatObj = new ConsoleCategory($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($member->hasAccess($consoleObj) && $consoleCatObj->select($_POST['catID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $consoleCatObj->move($_POST['cDir']);
        $_GET['cID'] = $cID;
        include "main.php";
    }
}
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
include_once $prevFolder . "classes/consolecategory.php";
$cID = $_GET['cID'];
$consoleCatObj = new ConsoleCategory($mysqli);
if ($_POST['submit']) {
    // Check Category Name
    if (trim($_POST['catname']) == "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must enter a Category Name.<br>";
    }
    // Check Cat Order
    $intNewOrderSpot = "";
    if (!$consoleCatObj->select($_POST['catorder']) and $_POST['catorder'] != "first") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid category order. (category)<br>";
    } elseif ($_POST['catorder'] == "first") {
        // "(no other categories)" selected, check to see if there are actually no other categories
        $result = $mysqli->query("SELECT * FROM " . $dbprefix . "consolecategory WHERE adminoption = '0'");
        $num_rows = $result->num_rows;
        if ($num_rows > 0) {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid category order. (category)<br>";
        } else {
            $intNewOrderSpot = 1;
        }
    } else {
        if ($_POST['beforeafter'] != "before" and $_POST['beforeafter'] != "after") {
            $countErrors++;
Example #3
0
 * License: http://www.bluethrust.com/license.php
 *
 */
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/consolecategory.php";
$cID = $_GET['cID'];
$consoleCatObj = new ConsoleCategory($mysqli);
if (!$consoleCatObj->select($_GET['catID'])) {
    die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>");
}
$consoleCatInfo = $consoleCatObj->get_info_filtered();
echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumb').html(\"<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Manage Console Categories</a> > " . $consoleCatInfo['name'] . "\");\n});\n</script>\n";
if ($_POST['submit']) {
    $resortOrder = false;
    // Check Category Name
    if (trim($_POST['catname']) == "") {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must enter a Category Name.<br>";
    }
    // Check Cat Order
    $intNewOrderSpot = "";
    if (!$consoleCatObj->select($_POST['catorder']) and $_POST['catorder'] != "first") {
        $countErrors++;
Example #4
0
include_once "../../../../classes/member.php";
include_once "../../../../classes/rank.php";
include_once "../../../../classes/consoleoption.php";
include_once "../../../../classes/consolecategory.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$consoleCatObj = new ConsoleCategory($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Console Options");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($member->hasAccess($consoleObj) && $consoleObj->select($_POST['cID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $consoleInfo = $consoleObj->get_info();
        $consoleCatObj->select($consoleInfo['consolecategory_id']);
        $arrAssociates = $consoleCatObj->getAssociateIDs("ORDER BY sortnum");
        array_unshift($arrAssociates, "");
        unset($arrAssociates[0]);
        $intSortNum = $consoleInfo['sortnum'];
        $moveUp = $intSortNum - 1;
        $moveDown = $intSortNum + 1;
        $makeMove = "";
        if ($_POST['cDir'] == "up" and $consoleObj->select($arrAssociates[$moveUp])) {
            $makeMove = "before";
        } elseif ($_POST['cDir'] == "down" and $consoleObj->select($arrAssociates[$moveDown])) {
            $makeMove = "after";
        }
        if ($makeMove != "") {
            $newSpot = $consoleObj->makeRoom($makeMove);
            if (is_numeric($newSpot)) {
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 .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You must give the console option a page title.<br>";
    }
    // Check Console Category
    if (!$consoleCatObj->select($_POST['consolecat'])) {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid console category.<br>";
    } else {
        $arrConsoleIDs = $consoleCatObj->getAssociateIDs();
        if ($_POST['consoleorder'] == "first" && count($arrConsoleIDs) > 0) {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid display order.<br>";
        } elseif (!in_array($_POST['consoleorder'], $arrConsoleIDs) && $_POST['consoleorder'] != "first") {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid display order. (console option/console cat)<br>";
        } elseif (!$consoleObj->select($_POST['consoleorder']) && $_POST['consoleorder'] != "first") {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid display order. (console option)<br>";
        } elseif ($_POST['consoleorder'] == "first") {
            $intNewSortNum = 1;
Example #6
0
 $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";
     if (count($arrConsoleOptions)) {
         $blnShowCategoryList = false;
         $hideoptions = "";
         if ($counter > 0) {
             $hideoptions = "style='display: none'";
             $categoryCSS = "consoleCategory";
         }
         $counter++;
         if (isset($_GET['select']) && $categoryID == $_GET['select']) {
             $clickCategory = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tselectCategory('" . $counter . "');\n\t\t\t\t\t\t</script>\n\t\t\t\t\t";
         } elseif (isset($_SESSION['lastConsoleCategory']) && $_SESSION['lastConsoleCategory']['catID'] == $categoryID && $_SESSION['lastConsoleCategory']['exptime'] > time()) {
             $clickCategory = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tselectCategory('" . $counter . "');\n\t\t\t\t\t\t</script>\n\t\t\t\t\t";