public function select($intIDNum, $numericIDOnly = true)
 {
     $returnVal = parent::select($intIDNum, $numericIDOnly);
     if ($returnVal) {
         $this->arrSelectValues = $this->getAssociateIDs("ORDER BY componentvalue");
     }
     return $returnVal;
 }
    include_once "../../../../classes/member.php";
    include_once "../../../../classes/basicorder.php";
    $consoleObj = new ConsoleOption($mysqli);
    $member = new Member($mysqli);
    $member->select($_SESSION['btUsername']);
    $cID = $consoleObj->findConsoleIDByName("Member Application");
    $consoleObj->select($cID);
    if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) {
        exit;
    }
}
echo "\n\n\t\t<table class='formTable' style='width: 90%; margin-top: 0px'>\n\t\t\t<tr>\n\t\t\t\t<td class='main' style='width: 50%'>Username</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%'>Input</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%; height: 24px'>N/A</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='main' style='width: 50%'>Password</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%'>Input</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%; height: 24px'>N/A</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='main' style='width: 50%'>E-mail Address</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%'>Input</td>\n\t\t\t\t<td class='main' align='center' style='width: 25%; height: 24px'>N/A</td>\n\t\t\t</tr>\n\t\t\t";
$objAppComponent = new BasicOrder($mysqli, "app_components", "appcomponent_id");
$result = $mysqli->query("SELECT appcomponent_id FROM " . $dbprefix . "app_components ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $objAppComponent->select($row['appcomponent_id']);
    $appComponentInfo = $objAppComponent->get_info_filtered();
    $dispUpArrow = "<a href='javascript:void(0)' onclick=\"moveAppComponent('up', '" . $row['appcomponent_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=\"moveAppComponent('down', '" . $row['appcomponent_id'] . "')\"><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/buttons/downarrow.png' width='24' height='24' title='Move Down'></a>";
    if ($appComponentInfo['ordernum'] == 1) {
        $dispDownArrow = "<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/transparent.png' width='24' height='24'>";
    }
    if ($appComponentInfo['ordernum'] == $objAppComponent->getHighestOrderNum()) {
        $dispUpArrow = "<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/transparent.png' width='24' height='24'>";
    }
    switch ($appComponentInfo['componenttype']) {
        case "multiselect":
            $appComponentInfo['componenttype'] = "Multi-Select";
            break;
        case "largeinput":
            $appComponentInfo['componenttype'] = "Large-Input";
Exemple #3
0
<?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
 *
 */
$diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id");
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php" || !$diplomacyStatusObj->select($_GET['sID'])) {
    echo "hi";
    exit;
}
$diplomacyStatusInfo = $diplomacyStatusObj->get_info_filtered();
if ($_POST['submit']) {
    // Check Name
    if (trim($_POST['statusname']) == "") {
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Status name may not be blank.<br>";
        $countErrors++;
    }
    // Check Display Order
    $intNewOrderNum = $diplomacyStatusObj->validateOrder($_POST['displayorder'], $_POST['beforeafter'], true, $diplomacyStatusInfo['ordernum']);
    if ($intNewOrderNum === false) {
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid display order.<br>";
        $countErrors++;
    }
$member->select($_SESSION['btUsername']);
$memberModObj = new Member($mysqli);
$categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id");
$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']);
<?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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id");
$categoryObj->set_assocTableName("forum_board");
$categoryObj->set_assocTableKey("forumboard_id");
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Forum Categories");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if (($memberInfo['rank_id'] == 1 || $member->hasAccess($consoleObj)) && $categoryObj->select($_POST['catID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $categoryObj->move($_POST['cDir']);
        include "main_managecategory.php";
    }
}
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
$prevFolder = "../../../../";
include_once $prevFolder . "_setup.php";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$cID = $consoleObj->findConsoleIDByName("Member Application");
$consoleObj->select($cID);
$appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    if ($appComponentObj->select($_POST['appCompID'])) {
        $appCompInfo = $appComponentObj->get_info_filtered();
        $appComponentObj->set_assocTableName("app_selectvalues");
        $appComponentObj->set_assocTableKey("appselectvalue_id");
        include BASE_DIRECTORY . "members/include/membermanagement/include/appcomponent_form.php";
        if ($_POST['saveComponent']) {
            // Check Component Name
            if (trim($_POST['saveComponentName']) == "") {
                $addAppForm->errors[] = "You can't have a blank component name.<br>";
            }
            if (!in_array($_POST['saveComponentType'], array_keys($typeOptions))) {
                $addAppForm->errors[] .= "You selected an invalid component type.<br>";
            }
            if (count($addAppForm->errors) == 0) {
                if ($_POST['saveComponentRequired'] != 0) {
                    $_POST['saveComponentRequired'] = 1;
 * 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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$manageStatusCID = $consoleObj->findConsoleIDByName("Manage Diplomacy Statuses");
$consoleObj->select($manageStatusCID);
$diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id");
$diplomacyStatusObj->set_assocTableName("diplomacy");
$diplomacyStatusObj->set_assocTableKey("diplomacy_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyStatusObj->select($_POST['sID']) && $member->hasAccess($consoleObj)) {
    $statusName = $diplomacyStatusObj->get_info_filtered("name");
    $arrAssociates = $diplomacyStatusObj->getAssociateIDs();
    if (count($arrAssociates) > 0) {
        echo "\n\t\t\t\n\t\t\t<div id='deleteDialogBox' style='display: none'>\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tThere are currently clans on the diplomacy page with the " . $statusName . " status.  You must change their status before deleting.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#deleteDialogBox').dialog({\n\t\t\t\t\t\ttitle: 'Delete Diplomacy Status',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\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');\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\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\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t";
    } elseif (count($arrAssociates) == 0 && !isset($_POST['confirmDelete'])) {
        echo "\n\t\t\t\n\t\t\t<div id='deleteDialogBox' style='display: none'>\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tAre you sure you want to delete the <b>" . $statusName . "</b> diplomacy status?\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#deleteDialogBox').dialog({\n\t\t\t\t\t\ttitle: 'Delete Diplomacy Status',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tbuttons: {\n\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\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#statusListDiv').hide();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/diplomacy/include/deletestatus.php', { sID: '" . $_POST['sID'] . "', confirmDelete: 1 }, function(data1) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#statusListDiv').html(data1);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#statusListDiv').fadeIn(250);\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\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\t},\n\t\t\t\t\t\t\t'Cancel': 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\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t";
    } elseif (count($arrAssociates) == 0 && isset($_POST['confirmDelete'])) {
        $diplomacyStatusObj->set_assocTableName("");
        $diplomacyStatusObj->delete();
        $member->logAction("Deleted the " . $statusName . " diplomacy status.");
        include "main_managestatuses.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
 *
 */
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'];
$intAddCategoryCID = $consoleObj->findConsoleIDByName("Add Forum Category");
$categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id");
$categoryObj->set_assocTableName("forum_board");
$categoryObj->set_assocTableKey("forumboard_id");
if ($categoryObj->select($_GET['catID']) && $_GET['action'] == "edit") {
    include "include/edit_category.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&raquo; <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intAddCategoryCID . "'>Add Forum Category</a> &laquo;<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%'>Category 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='categoryList'>\n\t";
    include "include/main_managecategory.php";
    echo "\n\t\t</div>\n\t\t<div id='deleteCatDiv' style='display: none'></div>\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\tfunction moveCat(strDir, intCatID) {\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\$('#categoryList').fadeOut(250);\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/move_category.php', { catID: intCatID, cDir: strDir }, function(data) {\n\t\t\t\t\t\t\$('#categoryList').html(data);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\$('#categoryList').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 deleteCat(intCatID) {\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_category.php', { catID: intCatID }, function(data) {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#deleteCatDiv').html(data);\n\t\t\t\t\t\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\t\n\t";
}
 *
 * 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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id");
$categoryObj->set_assocTableName("forum_board");
$categoryObj->set_assocTableKey("forumboard_id");
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Forum Categories");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword']) && $categoryObj->select($_POST['catID'])) {
    $categoryInfo = $categoryObj->get_info_filtered();
    $arrBoards = $categoryObj->getAssociateIDs();
    if (count($arrBoards) > 0) {
        echo "\n\t\t\n\t\t\t<div id='deleteMessage' style='display: none'>\n\t\t\t\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tThere are currently boards with the category, <b>" . $categoryInfo['name'] . "</b>.  You must move these boards to a different category before deleting.\n\t\t\t\t</p>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$('#deleteMessage').dialog({\n\t\t\t\t\n\t\t\t\t\ttitle: 'Delete Forum Category',\n\t\t\t\t\twidth: 400,\n\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tshow: 'scale',\n\t\t\t\t\tbuttons: {\n\t\t\t\t\t\n\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(this).dialog('close');\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\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t";
    } elseif (count($arrBoards) == 0 && !isset($_POST['confirm'])) {
        echo "\n\t\t\n\t\t\t<div id='deleteMessage' style='display: none'>\n\t\t\t\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tAre you sure you want to delete the category, <b>" . $categoryInfo['name'] . "</b>?\n\t\t\t\t</p>\n\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$('#deleteMessage').dialog({\n\t\t\t\t\n\t\t\t\t\ttitle: 'Delete Forum Category',\n\t\t\t\t\twidth: 400,\n\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tshow: 'scale',\n\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\n\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\$('#categoryList').fadeOut(250);\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/forum/include/delete_category.php', { catID: '" . $_POST['catID'] . "', confirm: 1 }, function(data) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#categoryList').html(data);\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#categoryList').fadeIn(250);\t\n\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\t\$(this).dialog('close');\n\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(this).dialog('close');\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\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t\n\t\t";
    } elseif (count($arrBoards) == 0 && isset($_POST['confirm'])) {
        $categoryObj->delete();
        $categoryObj->resortOrder();
        include "main_managecategory.php";
    }
}
Exemple #10
0
<?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/rank.php";
include_once "../../../../classes/consoleoption.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id");
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Diplomacy Statuses");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if (($memberInfo['rank_id'] == 1 || $member->hasAccess($consoleObj)) && $diplomacyStatusObj->select($_POST['sID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $diplomacyStatusObj->move($_POST['sDir']);
        include "main_managestatuses.php";
    }
}
Exemple #11
0
		
<div style='margin: 0px auto; '>
<table class='formTable' style='margin-left: auto; margin-right: auto'>

	<tr>
		<td class='formTitle' width="45%">Clan Name:</td>
		<td class='formTitle' width="30%">Leader(s):</td>
		<td class='formTitle' width="25%">Status:</td>
	</tr>
	
	
	<?php 
$counter = 0;
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "diplomacy ORDER BY clanname");
while ($row = $result->fetch_assoc()) {
    $diplomacyStatusObj->select($row['diplomacystatus_id']);
    $statusInfo = $diplomacyStatusObj->get_info_filtered();
    if ($statusInfo['imageurl'] == "") {
        $dispStatus = $statusInfo['name'];
    } else {
        if (strpos($statusInfo['imageurl'], "http://") === false) {
            $statusInfo['imageurl'] = "../" . $statusInfo['imageurl'];
        }
        $dispImgWidth = "";
        $dispImgHeight = "";
        if ($statusInfo['imagewidth'] != 0) {
            $dispImgWidth = " width = '" . $statusInfo['imagewidth'] . "' ";
        }
        if ($statusInfo['imageheight'] != 0) {
            $dispImgWidth = " height = '" . $statusInfo['imageheight'] . "' ";
        }
Exemple #12
0
<?php

include "../_setup.php";
include_once "../classes/member.php";
include_once "../classes/basicorder.php";
$member = new Member($mysqli);
$appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id");
$appComponentObj->set_assocTableName("app_selectvalues");
$appComponentObj->set_assocTableKey("appselectvalue_id");
if ($_GET['appCompID'] != -1 && !$appComponentObj->select($_GET['appCompID']) || $_GET['appCompID'] != -1 && ($appComponentObj->get_info("componenttype") != "captcha" && $appComponentObj->get_info("componenttype") != "captchaextra")) {
    exit;
}
if (isset($_GET['display'])) {
    echo "<img src='" . $MAIN_ROOT . "images/captcha.php?appCompID=" . $_GET['appCompID'] . "&new=" . time() . "' width='440' height='90'>";
} else {
    header('Content-Type: image/png');
    if ($_GET['appCompID'] == -1) {
        $appCompInfo['appcomponent_id'] = -1;
    } else {
        $appCompInfo = $appComponentObj->get_info_filtered();
    }
    $captchaObj = new Basic($mysqli, "app_captcha", "appcaptcha_id");
    $filterIP = $mysqli->real_escape_string($IP_ADDRESS);
    $mysqli->query("DELETE FROM " . $dbprefix . "app_captcha WHERE appcomponent_id = '" . $appCompInfo['appcomponent_id'] . "' AND ipaddress = '" . $filterIP . "'");
    // Create the image
    $im = imagecreatetruecolor(440, 90);
    // Colors
    $black = imagecolorallocate($im, 9, 9, 9);
    $blackAlpha = imagecolorallocatealpha($im, 9, 9, 9, 25);
    $redAlpha = imagecolorallocatealpha($im, 255, 0, 0, 15);
    $white = imagecolorallocate($im, 255, 255, 255);
Exemple #13
0
$categoryObj->set_assocTableName("forum_board");
$categoryObj->set_assocTableKey("forumboard_id");
$boardObj = new ForumBoard($mysqli);
// Check Login
$LOGIN_FAIL = true;
$arrSelectBoard = "";
if (isset($_POST['bID']) && $boardObj->select($_POST['bID'])) {
    $arrSelectBoard = $boardObj->findBeforeAfter();
    if ($boardObj->get_info("subforum_id") != 0) {
        $arrSelectBoard[0] = $boardObj->get_info("subforum_id");
    }
} else {
    $_POST['bID'] = "";
}
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    if ($categoryObj->select($_POST['catID'])) {
        $arrBoards = $categoryObj->getAssociateIDs("AND subforum_id = '0' ORDER BY sortnum", true);
        foreach ($arrBoards as $value) {
            if ($_POST['bID'] != $value) {
                $boardObj->select($value);
                $boardInfo = $boardObj->get_info_filtered();
                $selectBoard = "";
                if ($_POST['bID'] != "" && $arrSelectBoard[0] == $boardInfo['forumboard_id']) {
                    $selectBoard = " selected";
                }
                echo "<option value='" . $boardInfo['forumboard_id'] . "'" . $selectBoard . ">" . $boardInfo['name'] . "</option>";
                listSubForums($boardInfo['forumboard_id'], $_POST['bID']);
            }
        }
        if (count($arrBoards) == 0 || $_POST['bID'] != "" && count($arrBoards) == 1) {
            echo "<option value='first'>(first board)</option>";
Exemple #14
0
     if ($countErrors > 0) {
         $_POST = filterArray($_POST);
         $_POST['submit'] = false;
     }
     unset($_SESSION['btComposeList'][$pmSessionID]);
 }
 if (!$_POST['submit']) {
     $pmSessionID = uniqid();
     $composeListJS = "";
     $_SESSION['btComposeList'][$pmSessionID]['member'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['rankcategory'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['rank'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['squad'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['tournament'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['exptime'] = time() + 3600;
     if (isset($_GET['threadID']) && $pmObj->select($_GET['threadID']) && isset($_GET['replyID']) && $pmObj->select($_GET['replyID'])) {
         $replyPMInfo = $pmObj->get_info();
         $arrReceivers = $pmObj->getAssociateIDs();
         $_POST['subject'] = "RE: " . filterText($replyPMInfo['subject']);
         if ($replyPMInfo['receiver_id'] != 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || $replyPMInfo['receiver_id'] == $memberInfo['member_id'])) {
             $member->select($replyPMInfo['sender_id']);
             $member->objRank->select($member->get_info("rank_id"));
             $_SESSION['btComposeList'][$pmSessionID]['member'][] = $replyPMInfo['sender_id'];
             $composeListJS = "\n\t\t\t\t\n\t\t\t\t\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'member_" . $replyPMInfo['sender_id'] . "'><div style='float: left'>" . $member->objRank->get_info_filtered("name") . " " . $member->get_info_filtered("username") . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'member_" . $replyPMInfo['sender_id'] . "'>&times;</div></div>\");\n\t\t\t\t\n\t\t\t\t";
         } elseif ($replyPMInfo['receiver_id'] == 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || in_array($memberInfo['member_id'], $arrReceivers))) {
             if (isset($_GET['replyall'])) {
                 $pmObj->set_assocTableKey("pmmember_id");
                 $arrPMMID = $pmObj->getAssociateIDs();
                 $arrGroups['list'] = array();
                 $arrGroups['rank'] = array();
                 $arrGroups['squad'] = array();
Exemple #15
0
$memberInfo = array();
$LOGGED_IN = false;
if ($member->select($_SESSION['btUsername']) && $member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    $LOGGED_IN = true;
}
$breadcrumbObj->setTitle("Forum");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Forum");
include $prevFolder . "include/breadcrumb.php";
$boardObj->showSearchForm();
echo "\t\n\t<table class='forumTable'>\n";
$result = $mysqli->query("SELECT forumcategory_id FROM " . $dbprefix . "forum_category ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $arrForumCats[] = $row['forumcategory_id'];
    $categoryObj->select($row['forumcategory_id']);
    $catInfo = $categoryObj->get_info_filtered();
    $arrBoards = $categoryObj->getAssociateIDs("AND subforum_id = '0' ORDER BY sortnum", true);
    $dispBoards = "";
    foreach ($arrBoards as $boardID) {
        $boardObj->select($boardID);
        if ($boardObj->memberHasAccess($memberInfo)) {
            $boardInfo = $boardObj->get_info_filtered();
            $arrForumTopics = $boardObj->getForumTopics();
            $newTopicBG = "";
            $dispNewTopicIMG = "";
            if ($LOGGED_IN && $boardObj->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
Exemple #16
0
if (!$diplomacyObj->select($_GET['dID'])) {
    echo "\n\t\t<script type='text/javascript'>\n\t\t\twindow.location = '" . $MAIN_ROOT . "diplomacy'\n\t\t</script>\n\t";
    exit;
}
$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();
    }
}
$diplomacyInfo = $diplomacyObj->get_info_filtered();
$diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id");
$diplomacyStatusObj->select($diplomacyInfo['diplomacystatus_id']);
$statusInfo = $diplomacyStatusObj->get_info_filtered();
if ($statusInfo['imageurl'] == "") {
    $dispStatus = $statusInfo['name'];
} else {
    if (strpos($statusInfo['imageurl'], "http://") === false) {
        $statusInfo['imageurl'] = "../" . $statusInfo['imageurl'];
    }
    $dispImgWidth = "";
    $dispImgHeight = "";
    if ($statusInfo['imagewidth'] != 0) {
        $dispImgWidth = " width = '" . $statusInfo['imagewidth'] . "' ";
    }
    if ($statusInfo['imageheight'] != 0) {
        $dispImgWidth = " height = '" . $statusInfo['imageheight'] . "' ";
    }
Exemple #17
0
    echo "\n\t\n\t\t<div style='display: none' id='successBox'>\n\t\t\t\t<p align='center'>\n\t\t\t\t\tYou must add a forum category before adding a board!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\tpopupDialog('Add Board', '" . $MAIN_ROOT . "members/index.php?select=" . $consoleInfo['consolecategory_id'] . "', 'successBox');\n\t\t\t</script>\n\t\n\t";
    exit;
}
$boardObj = new ForumBoard($mysqli);
$categoryObj = new BasicOrder($mysqli, "forum_category", "forumcategory_id");
$rankCatObj = new RankCategory($mysqli);
$rankObj = new Rank($mysqli);
$tempMemObj = new Member($mysqli);
if ($_POST['submit']) {
    // Check Board Name
    if (trim($_POST['boardname']) == "") {
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Board name may not be blank.<br>";
        $countErrors++;
    }
    // Check Category
    if (!$categoryObj->select($_POST['forumcat'])) {
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</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']);