コード例 #1
0
ファイル: event.php プロジェクト: nsystem1/clanscripts
 public function checkManageAllEvents()
 {
     $this->blnManageAllEvents = false;
     if (isset($_SESSION['btUsername']) && isset($_SESSION['btPassword'])) {
         $member = new Member($this->MySQL);
         $consoleObj = new ConsoleOption($this->MySQL);
         $manageAllEventsCID = $consoleObj->findConsoleIDByName("Manage All Events");
         if ($member->select($_SESSION['btUsername']) && $member->authorizeLogin($_SESSION['btPassword'])) {
             $consoleObj->select($manageAllEventsCID);
             $this->blnManageAllEvents = $member->hasAccess($consoleObj);
         }
     }
     return $this->blnManageAllEvents;
 }
コード例 #2
0
ファイル: main.php プロジェクト: nsystem1/clanscripts
 if ($member->authorizeLogin($_SESSION['btPassword'])) {
     $LOGIN_FAIL = false;
     $memberInfo = $member->get_info();
     $memberRankID = $memberInfo['rank_id'];
     $memberRank = new Rank($mysqli);
     $memberRank->select($memberRankID);
     $rankPrivileges = $memberRank->get_privileges();
     $strPrivileges = implode(",", $rankPrivileges);
     $result = $mysqli->query("SELECT * FROM " . $mysqli->get_tablePrefix() . "consolecategory ORDER BY ordernum");
     while ($row = $result->fetch_assoc()) {
         $arrConsoleCats[] = $row['consolecategory_id'];
     }
     $arrFullySortedConsole = array();
     $consoleObj = new ConsoleOption($mysqli);
     foreach ($rankPrivileges as $consoleoption) {
         $consoleObj->select($consoleoption);
         $consoleInfo = $consoleObj->get_info();
         $sortNum = array_search($consoleInfo['consolecategory_id'], $arrConsoleCats);
         $arrFullySortedConsole[$sortNum][] = $consoleoption;
     }
     $consoleCatObj = new basic($mysqli, "consolecategory", "consolecategory_id");
     foreach ($arrConsoleCats as $key => $categoryID) {
         $consoleCatObj->select($categoryID);
         $consoleCatInfo = $consoleCatObj->get_info();
         echo "<b>" . $consoleCatInfo['name'] . "</b>";
         echo "<br>";
         $arrConsoleOptions = $arrFullySortedConsole[$key];
         foreach ($arrConsoleOptions as $consoleOptionID) {
             $consoleObj->select($consoleOptionID);
             $consoleInfo = $consoleObj->get_info();
             echo " - " . $consoleInfo['pagetitle'] . "<br>";
コード例 #3
0
ファイル: appdecision.php プロジェクト: nsystem1/clanscripts
 *
 * 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/squad.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("View Your Squads");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$arrSquadPrivileges = $squadObj->arrSquadPrivileges;
$squadObj = new Squad($mysqli);
$squadAppObj = new Basic($mysqli, "squadapps", "squadapp_id");
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $LOGIN_FAIL = false;
    $memberInfo = $member->get_info_filtered();
    if ($squadObj->select($_POST['sID']) && $squadObj->memberHasAccess($memberInfo['member_id'], "acceptapps") && $squadAppObj->select($_POST['saID'])) {
        $squadInfo = $squadObj->get_info_filtered();
        $squadAppInfo = $squadAppObj->get_info();
        $squadRankList = $squadObj->getRankList();
コード例 #4
0
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
if (!defined("LOGGED_IN") || !LOGGED_IN) {
    $setupManageListArgs = json_decode($_POST['listArgs'], true);
    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']);
    $consoleObj = new ConsoleOption($mysqli);
    if (!$consoleObj->select($setupManageListArgs['console_id'])) {
        exit;
    }
    if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) {
        exit;
    }
    $actionsWidth = count($setupManageListArgs['actions']) * 6;
    $titleWidth = 100 - $actionsWidth;
}
echo "\n\t\n\t\t<table class='formTable' style='border-spacing: 0px; margin-top: 0px'>\n\t";
$counter = 0;
foreach ($setupManageListArgs['items'] as $itemInfo) {
    if ($itemInfo['type'] == "listitem") {
        if ($counter == 1) {
            $addCSS = " alternateBGColor";
            $counter = 0;
コード例 #5
0
ファイル: closesquad.php プロジェクト: nsystem1/clanscripts
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
if (!isset($member) || !isset($squadObj) || substr($_SERVER['PHP_SELF'], -strlen("managesquad.php")) != "managesquad.php") {
    exit;
} else {
    // This is a little repeatative, but for security.
    $memberInfo = $member->get_info();
    $consoleObj->select($cID);
    $squadObj->select($sID);
    $manageAllSquadsCID = $consoleObj->findConsoleIDByName("Manage All Squads");
    $consoleAllSquads = new ConsoleOption($mysqli);
    $consoleAllSquads->select($manageAllSquadsCID);
    if (!$member->hasAccess($consoleObj) || $squadInfo['member_id'] != $memberInfo['member_id'] && !$member->hasAccess($consoleAllSquads)) {
        exit;
    }
}
echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumbTitle').html(\"Close Squad\");\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 . "&select=" . $squadInfo['squad_id'] . "'>" . $consoleTitle . "</a> > <b>" . $squadInfo['name'] . ":</b> Close Squad\");\n});\n</script>\n";
$dispError = "";
$countErrors = 0;
$squadMemberList = $squadObj->getMemberListSorted();
if ($_POST['submitted']) {
    if ($squadObj->delete()) {
        $dispMessage = "Successfully closed squad: <b>" . $squadInfo['name'] . "</b>";
        $dispFounderName = $member->getMemberLink();
        foreach ($squadMemberList as $memberID) {
            if ($memberID != $squadInfo['member_id']) {
                $member->select($memberID);
コード例 #6
0
ファイル: setmanagers.php プロジェクト: nsystem1/clanscripts
define("SHOW_MANAGERLIST", true);
include "include/managerlist.php";
?>
			</div>
		</div>
		<div class='mttRightColumn'>
			<div class='dottedLine' style='padding-bottom: 3px'><b>Assign Managers:</b></div>
			<p><b>Enter Username:</b></p>
			<input type='text' class='textBox' id='newManager'>
			<p><i>- OR -</i></p>
			<p><b>Select from player list:</b></p>
			<select id='newManagerSelect' class='textBox'>
				<option value=''>Select</option>
				<?php 
$tournamentConsoleCheck = new ConsoleOption($mysqli);
$tournamentConsoleCheck->select($cID);
$result = $mysqli->query("SELECT " . $dbprefix . "tournamentplayers.member_id FROM " . $dbprefix . "tournamentplayers, " . $dbprefix . "members, " . $dbprefix . "ranks WHERE " . $dbprefix . "members.member_id = " . $dbprefix . "tournamentplayers.member_id AND " . $dbprefix . "members.rank_id = " . $dbprefix . "ranks.rank_id AND " . $dbprefix . "tournamentplayers.tournament_id = '" . $tID . "' AND " . $dbprefix . "tournamentplayers.member_id != '0' ORDER BY " . $dbprefix . "ranks.ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $member->select($row['member_id']);
    if ($member->hasAccess($tournamentConsoleCheck)) {
        echo "<option value='" . $row['member_id'] . "'>" . $member->getMemberLink() . "</option>";
    }
}
$member->select($memberInfo['member_id']);
?>
			</select>
			<br><br>
			<p align='center'>
				<input type='button' class='submitButton' value='Add Manager' id='btnAddManager'>
				
			</p>
コード例 #7
0
ファイル: main.php プロジェクト: nsystem1/clanscripts
}
include_once $prevFolder . "_setup.php";
// Classes needed for console.php
include_once $prevFolder . "classes/member.php";
include_once $prevFolder . "classes/rank.php";
include_once $prevFolder . "classes/rankcategory.php";
include_once $prevFolder . "classes/consoleoption.php";
$member = new Member($mysqli);
$checkMember = $member->select($_SESSION['btUsername']);
if ($checkMember) {
    if ($member->authorizeLogin($_SESSION['btPassword'])) {
        $cOptObj = new ConsoleOption($mysqli);
        if (!isset($_GET['cID'])) {
            $_GET['cID'] = $cOptObj->findConsoleIDByName("Manage Ranks");
        }
        $cOptObj->select($_GET['cID']);
        $intAddNewRankCID = $cOptObj->findConsoleIDByName("Add New Rank");
        $memberInfo = $member->get_info();
        if ($member->hasAccess($cOptObj)) {
            echo "\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#breadCrumb').html(\"<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > Manage Ranks\");\n\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t";
            $cOptObj = new ConsoleOption($mysqli);
            $intAddNewRankCID = $cOptObj->findConsoleIDByName("Add New Rank");
            $x = 0;
            $counter = 0;
            $result = $mysqli->query("SELECT * FROM " . $dbprefix . "ranks WHERE rank_id != '1' ORDER BY ordernum DESC");
            $dispRanks = "";
            while ($row = $result->fetch_assoc()) {
                if ($counter == 1) {
                    $addCSS = " alternateBGColor";
                    $counter = 0;
                } else {
コード例 #8
0
ファイル: edit.php プロジェクト: nsystem1/clanscripts
 $rankOptions = "";
 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 "&nbsp;&nbsp;<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 = "";
                 }
コード例 #9
0
ファイル: view.php プロジェクト: nsystem1/clanscripts
 *
 */
// Config File
$prevFolder = "../";
include $prevFolder . "_setup.php";
include_once $prevFolder . "classes/member.php";
include_once $prevFolder . "classes/poll.php";
$consoleObj = new ConsoleOption($mysqli);
$pollObj = new Poll($mysqli);
$member = new Member($mysqli);
if (!$pollObj->select($_GET['pID'])) {
    echo "\n\t\t<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>\n\t";
    exit;
}
$viewPollResultsCID = $consoleObj->findConsoleIDByName("View Poll Results");
$consoleObj->select($viewPollResultsCID);
$pollInfo = $pollObj->get_info_filtered();
$member->select($_SESSION['btUsername']);
$blnMemberVoted = false;
if ($member->authorizeLogin($_SESSION['btPassword']) && $pollObj->hasVoted($member->get_info("member_id"))) {
    $blnMemberVoted = true;
}
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
}
$blnShowResults = false;
if ($pollObj->totalVotes() > 0 && ($member->hasAccess($consoleObj) || $pollInfo['member_id'] == $memberInfo['member_id'] || $pollInfo['resultvisibility'] == "open" || $pollInfo['resultvisibility'] == "votedonly" && $blnMemberVoted || $pollInfo['resultvisibility'] == "pollend" && $pollInfo['pollend'] < time())) {
    $blnShowResults = true;
}
if ($blnShowResults) {
    $arrResults = array("['Option', 'Votes']");
コード例 #10
0
ファイル: editprofile.php プロジェクト: nsystem1/clanscripts
        exit;
    }
}
$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
コード例 #11
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/news.php";
include_once "../../../../classes/shoutbox.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Post in Shoutbox");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$newsObj = new News($mysqli);
// Check Login
$LOGIN_FAIL = true;
$shoutboxObj = new Shoutbox($mysqli, "news", "news_id");
$shoutboxObj->strDivID = $_POST['divID'];
$shoutboxObj->intDispWidth = 140;
$shoutboxObj->intDispHeight = 300;
$shoutboxObj->blnUpdateShoutbox = true;
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $manageNewsCID = $consoleObj->findConsoleIDByName("Manage News");
    $consoleObj->select($manageNewsCID);
    if ($member->hasAccess($consoleObj)) {
コード例 #12
0
ファイル: step3.php プロジェクト: nsystem1/clanscripts
     if ($checkConsole === false) {
         $tempCatID = $arrConsoleCategoryIDs[$arrConsoleOptionInfo[$key]['category']];
         $consoleOptionObj->setCategoryKeyValue($tempCatID);
         $consoleOptionObj->resortOrder();
         $highestSortNum = $consoleOptionObj->getHighestSortNum();
         $newOrderNum = $highestSortNum + 1;
         if ($arrConsoleOptionInfo[$key]['addsep'] == "1") {
             $arrValues = array($tempCatID, "-separator-", "", $newOrderNum, "1", "", "1");
             $consoleOptionObj->addNew($arrColumns, $arrValues);
             $newOrderNum++;
         }
         $arrValues = array($tempCatID, $consoleOptionName, $arrConsoleOptionInfo[$key]['filename'], $newOrderNum, "1", $arrConsoleOptionInfo[$key]['hide'], "");
         $consoleOptionObj->addNew($arrColumns, $arrValues);
         $consoleOptionObj->resortOrder();
     } elseif ($consoleOptionName == "Private Messages" && $checkConsole !== false && $pmCatID != "") {
         $consoleOptionObj->select($checkConsole);
         $consoleOptionObj->update(array("consolecategory_id", "sortnum"), array($pmCatID, 0));
         $consoleOptionObj->resortOrder();
     }
 }
 // Check for valid theme
 $arrValidThemes = array();
 $themeOptions .= "";
 $websiteInfoObj = new WebsiteInfo($mysqli);
 $websiteInfoObj->select(1);
 $themeName = $websiteInfoObj->get_info("theme");
 // Add New Websiteinfo
 $websiteInfoObj->multiUpdate(array("default_timezone", "date_format", "display_date"), array("America/New_York", "l, F j, Y", "1"));
 $verifyTheme = file_exists("../themes/" . $themeName . "/themeinfo.xml");
 $_SESSION['btUsername'] = $member->get_info("username");
 $_SESSION['btPassword'] = $member->get_info("password");
コード例 #13
0
ファイル: delete.php プロジェクト: nsystem1/clanscripts
<?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_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/poll.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$managePollsCID = $consoleObj->findConsoleIDByName("Manage Polls");
$consoleObj->select($managePollsCID);
$pollObj = new Poll($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $pollObj->select($_POST['pollID']) && $member->hasAccess($consoleObj)) {
    $pollInfo = $pollObj->get_info_filtered();
    $pollObj->delete();
    define("SHOW_POLLLIST", true);
    include "polllist.php";
}
コード例 #14
0
 * 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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$diplomacyRequestsCID = $consoleObj->findConsoleIDByName("View Diplomacy Requests");
$consoleObj->select($diplomacyRequestsCID);
$diplomacyRequestObj = new Basic($mysqli, "diplomacy_request", "diplomacyrequest_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyRequestObj->select($_POST['reqID']) && $member->hasAccess($consoleObj)) {
    $diplomacyRequestInfo = $diplomacyRequestObj->get_info_filtered();
    if (isset($_POST['confirmDecline'])) {
        // Send E-mail Confirmation
        $emailTo = $diplomacyRequestInfo['email'];
        $emailFrom = "*****@*****.**";
        $emailSubject = $websiteInfo['clanname'] . " - Diplomacy Request: Declined";
        $emailMessage = "\nHi " . $diplomacyRequestInfo['name'] . ",\n\n\n\t\t\nYour diplomacy request has been declined.\n\n\n-" . $websiteInfo['clanname'];
        //mail($emailTo, $emailSubject, $emailMessage, "From: ".$emailFrom);
        $diplomacyRequestObj->delete();
        include "diplomacyrequests.php";
        $member->logAction("Declined " . $diplomacyRequestInfo['clanname'] . "'s diplomacy request.");
    } else {
        echo "\n\t\t\t<div id='confirmDialogBox' style='display: none'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tAre you sure you want to decline <b>" . $diplomacyRequestInfo['clanname'] . "'s</b> diplomacy request?\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<script type='text/javascript'>\n\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\$('#confirmDialogBox').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Decline Diplomacy Request',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/diplomacy/include/declinerequest.php', { reqID: " . $_POST['reqID'] . ", confirmDecline: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').html(data);\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').fadeIn(250);\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');\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\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\t});\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t";
コード例 #15
0
    $menuCatObj = new MenuCategory($mysqli);
    if (trim($_SERVER['HTTPS']) == "" || $_SERVER['HTTPS'] == "off") {
        $dispHTTP = "http://";
    } else {
        $dispHTTP = "https://";
    }
    $siteDomain = $_SERVER['SERVER_NAME'];
    try {
        $menuXML = new SimpleXMLElement(BASE_DIRECTORY . "themes/" . $THEME . "/themeinfo.xml", NULL, true);
    } catch (Exception $e) {
        $menuXML = new SimpleXMLElement(BASE_DIRECTORY . "themes/" . $THEME . "/themeinfo.xml", NULL, true);
    }
}
$intAddMenuCatCID = $consoleObj->findConsoleIDByName("Add Menu Category");
$intEditMenuCatCID = $consoleObj->findConsoleIDByName("Manage Menu Categories");
$consoleObj->select($intAddMenuCatCID);
$checkAccess1 = $member->hasAccess($consoleObj);
$consoleObj->select($intEditMenuCatCID);
$checkAccess2 = $member->hasAccess($consoleObj);
if ($member->authorizeLogin($_SESSION['btPassword']) && ($checkAccess1 || $checkAccess2)) {
    if (isset($_POST['section']) && is_numeric($_POST['section'])) {
        $orderoptions = "";
        $selectCatID = "";
        if (!isset($_POST['mcID'])) {
            $_POST['mcID'] = "";
        } else {
            $menuCatObj->select($_POST['mcID']);
            $selectCatID = $menuCatObj->findBeforeAfter();
            $selectCatID = $selectCatID[0];
        }
        $lastCategory = "";
コード例 #16
0
ファイル: viewtopic.php プロジェクト: nsystem1/clanscripts
$result = $mysqli->query("SELECT forumpost_id FROM " . $dbprefix . "forum_post WHERE forumtopic_id = '" . $topicInfo['forumtopic_id'] . "' ORDER BY dateposted LIMIT " . $intOffset . ", " . $NUM_PER_PAGE);
while ($row = $result->fetch_assoc()) {
    $boardObj->objPost->select($row['forumpost_id']);
    $boardObj->objPost->blnManageable = $blnManagePosts;
    if ($boardObj->objPost->get_info("member_id") == $memberInfo['member_id'] || $blnManagePosts) {
        $countManagablePosts++;
        $boardObj->objPost->blnManageable = true;
    }
    $boardObj->objPost->show();
}
$pageSelector->show();
echo "\n<div class='formDiv' style='background: none; border: 0px; overflow: auto'>\n\t<div style='float: right'>" . $dispManagePosts . $dispPostReply . "</div>\n</div>\n\n";
if (LOGGED_IN && $topicInfo['lockstatus'] == 0) {
    $forumConsoleObj = new ConsoleOption($mysqli);
    $postCID = $forumConsoleObj->findConsoleIDByName("Post Topic");
    $forumConsoleObj->select($postCID);
    $postReplyLink = $forumConsoleObj->getLink();
    $i = 1;
    $arrComponents = array("message" => array("type" => "richtextbox", "sortorder" => $i++, "display_name" => "Message", "attributes" => array("id" => "richTextarea", "style" => "width: 90%", "rows" => "10"), "validate" => array("NOT_BLANK")), "submit" => array("type" => "submit", "sortorder" => $i++, "attributes" => array("class" => "submitButton formSubmitButton"), "value" => "Post"));
    $arrSetupReplyForm = array("name" => "forum-quick-reply", "components" => $arrComponents, "wrapper" => array(), "attributes" => array("method" => "post", "action" => $postReplyLink . "&bID=" . $boardInfo['forumboard_id'] . "&tID=" . $topicInfo['forumtopic_id']));
    $quickReplyForm->buildForm($arrSetupReplyForm);
    echo "\n\n\t\t<div class='formDiv'>\n\t\t\t<b>Quick Reply:</b>\n\n\t\t\t";
    $quickReplyForm->show();
    echo "\n\t\t</div>\n\t\n\t";
}
if ($blnPageSelect) {
    echo "\n\t\t<script type='text/javascript'>\n\t\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#btnPageSelectTop, #btnPageSelectBottom').click(function() {\n\t\t\t\t\t\n\t\t\t\t\tvar jqPageSelect = \"#pageSelectBottom\";\n\t\t\t\t\tvar intNewPage = 0;\n\t\t\t\t\t\n\t\t\t\t\tif(\$(this).attr('id') == \"btnPageSelectTop\") {\n\t\t\t\t\t\tjqPageSelect = \"#pageSelectTop\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tintNewPage = \$(jqPageSelect).val();\n\t\t\t\t\t\n\t\t\t\t\twindow.location = 'viewtopic.php?tID=" . $_GET['tID'] . "&pID='+intNewPage;\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t";
}
if ($blnManagePosts) {
    echo "\n\t\t<div id='confirmDeleteTopicDiv' style='display: none'>\n\t\t\t<p align='center' class='main'>\n\t\t\t\tAre you sure you want to delete this topic?<br><br>\n\t\t\t\tAll posts will be deleted within the topic as well.\n\t\t\t</p>\n\t\t</div>\n\t\t<script type='text/javascript'>\n\t\t\tfunction deleteTopic() {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\n\t\t\t\t\t\$('#confirmDeleteTopicDiv').dialog({\n\t\t\t\t\t\ttitle: 'Delete Topic - Confirm Delete',\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tmodal: true,\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\$(this).dialog('close');\n\t\t\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/console.php?cID=" . $intManagePostsCID . "&tID=" . $topicInfo['forumtopic_id'] . "&action=delete'\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\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\n\t\t\t}\n\t\t</script>\n\t";
}
コード例 #17
0
ファイル: moveoption.php プロジェクト: nsystem1/clanscripts
/*
 * 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/poll.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$createPollCID = $consoleObj->findConsoleIDByName("Create a Poll");
$consoleObj->select($createPollCID);
$blnConsoleCheck1 = $member->hasAccess($consoleObj);
$managePollsCID = $consoleObj->findConsoleIDByName("Manage Polls");
$consoleObj->select($managePollsCID);
$blnConsoleCheck2 = $member->hasAccess($consoleObj);
$blnConsoleCheck = $blnConsoleCheck1 || $blnConsoleCheck2;
$pollObj = new Poll($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $blnConsoleCheck) {
    $pollObj->moveCache($_POST['direction'], $_POST['optionOrder']);
}
コード例 #18
0
 public function removeConsoleOptions()
 {
     $consoleObj = new ConsoleOption($this->MySQL);
     foreach ($this->pluginConsoleOptions as $consoleOptionInfo) {
         $consoleOptionID = $consoleObj->findConsoleIDByName($consoleOptionInfo['pagetitle']);
         if ($consoleObj->select($consoleOptionID)) {
             $consoleObj->delete();
         }
     }
 }
コード例 #19
0
ファイル: console.php プロジェクト: nsystem1/clanscripts
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
// Config File
$prevFolder = "../";
include "../_setup.php";
// Check for valid Console Option
$consoleObj = new ConsoleOption($mysqli);
$checkConsole = $mysqli->query("SELECT console_id FROM " . $dbprefix . "console ORDER BY console_id");
while ($row = $checkConsole->fetch_assoc()) {
    $arrConsoleOptions[] = $row['console_id'];
}
if (!$consoleObj->select($_GET['cID'])) {
    die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>");
}
$cID = $_GET['cID'];
// Load any plugins
$consolePluginObj = new btPlugin($mysqli);
$arrPlugins = $consolePluginObj->getPluginPage("console");
foreach ($arrPlugins as $pluginPageInfo) {
    include_once $pluginPageInfo['pagepath'];
}
// Start Page
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$PAGE_NAME = $consoleTitle . " - ";
$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<script type='text/javascript' src='" . $MAIN_ROOT . "js/colorpicker/jquery.miniColors.js'></script>\n<link rel='stylesheet' media='screen' type='text/css' href='" . $MAIN_ROOT . "js/colorpicker/jquery.miniColors.css'>\n";
$arrTinyMCEPages = array("Manage News", "Post News", "Add Custom Page", "Manage Custom Pages", "Add Custom Form Page", "Manage Custom Form Pages", "Post Topic", "Manage Forum Posts", "Add Menu Item", "Add Menu Category", "Manage Menu Categories", "Manage Menu Items", "Edit Profile");
コード例 #20
0
ファイル: newslist.php プロジェクト: nsystem1/clanscripts
include_once "../../../../classes/rank.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage News");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "news WHERE newstype != '3' ORDER BY dateposted DESC");
    $checkHTMLConsoleObj = new ConsoleOption($mysqli);
    $htmlNewsCID = $checkHTMLConsoleObj->findConsoleIDByName("HTML in News Posts");
    $checkHTMLConsoleObj->select($htmlNewsCID);
    if ($result->num_rows > 0) {
        while ($row = $result->fetch_assoc()) {
            $member->select($row['member_id']);
            $posterInfo = $member->get_info_filtered();
            if ($posterInfo['avatar'] == "") {
                $posterInfo['avatar'] = $MAIN_ROOT . "themes/" . $THEME . "/images/defaultavatar.png";
            } else {
                $posterInfo['avatar'] = $MAIN_ROOT . $posterInfo['avatar'];
            }
            if ($row['newstype'] == 1) {
                $dispNewsType = " - <span class='publicNewsColor' style='font-style: italic'>public</span>";
            } elseif ($row['newstype'] == 2) {
                $dispNewsType = " - <span class='privateNewsColor' style='font-style: italic'>private</span>";
            } elseif ($row['newstype'] == 3) {
                $dispNewsType = "";
コード例 #21
0
ファイル: deleteclan.php プロジェクト: nsystem1/clanscripts
<?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_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$manageClanCID = $consoleObj->findConsoleIDByName("Diplomacy: Manage Clans");
$consoleObj->select($manageClanCID);
$diplomacyClanObj = new Basic($mysqli, "diplomacy", "diplomacy_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyClanObj->select($_POST['dClanID']) && $member->hasAccess($consoleObj)) {
    $dClanName = $diplomacyClanObj->get_info_filtered("clanname");
    if (isset($_POST['confirmDelete'])) {
        $diplomacyClanObj->delete();
        $member->logAction("Deleted " . $dClanName . " from the diplomacy page.");
        include "main_manageclans.php";
    } else {
        echo "<p class='main' align='center'>Are you sure you want to delete " . $dClanName . " from the diplomacy page?</p>";
    }
}
コード例 #22
0
ファイル: viewpost.php プロジェクト: nsystem1/clanscripts
    $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();
    }
}
$member = new Member($mysqli);
$newsObj = new News($mysqli);
$consoleObj = new ConsoleOption($mysqli);
if (isset($_GET['nID']) && $newsObj->select($_GET['nID'])) {
    $newsInfo = $newsObj->get_info_filtered();
    $member->select($_SESSION['btUsername']);
    $memberInfo = $member->get_info_filtered();
    $privateNewsCID = $consoleObj->findConsoleIDByName("View Private News");
    $consoleObj->select($privateNewsCID);
    // Check Login
    $LOGIN_FAIL = true;
    if ($member->authorizeLogin($_SESSION['btPassword'])) {
        $LOGIN_FAIL = false;
        // Check Private News
        if ($newsInfo['newstype'] == 2 && !$member->hasAccess($consoleObj)) {
            die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>");
        }
    } elseif ($newsInfo['newstype'] == 2) {
        die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>");
    }
} else {
    die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>");
}
// Start Page
コード例 #23
0
ファイル: shoutbox.php プロジェクト: nsystem1/clanscripts
 public function prepareLinks($memberObj)
 {
     $this->memberObj->select($_SESSION['btUsername']);
     $consoleObj = new ConsoleOption($this->MySQL);
     $manageNewsCID = $consoleObj->findConsoleIDByName("Manage News");
     $consoleObj->select($manageNewsCID);
     if (LOGGED_IN && $this->memberObj->hasAccess($consoleObj)) {
         $this->strEditLink = MAIN_ROOT . "members/console.php?cID=" . $manageNewsCID . "&newsID=";
         $this->strDeleteLink = MAIN_ROOT . "members/include/news/include/deleteshoutpost.php";
     }
     $postInShoutboxCID = $consoleObj->findConsoleIDByName("Post in Shoutbox");
     $consoleObj->select($postInShoutboxCID);
     if (LOGGED_IN && $this->memberObj->hasAccess($consoleObj)) {
         $this->strPostLink = MAIN_ROOT . "members/include/news/include/postshoutbox.php";
     }
 }
コード例 #24
0
ファイル: delete.php プロジェクト: nsystem1/clanscripts
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
$prevFolder = "../../../../";
include_once $prevFolder . "_setup.php";
// Classes needed for console.php
include_once $prevFolder . "classes/member.php";
include_once $prevFolder . "classes/rank.php";
include_once $prevFolder . "classes/consoleoption.php";
$cOptObj = new ConsoleOption($mysqli);
$cID = $cOptObj->findConsoleIDByName("Manage Ranks");
$cOptObj->select($cID);
$member = new Member($mysqli);
$checkMember = $member->select($_SESSION['btUsername']);
if ($checkMember) {
    if ($member->authorizeLogin($_SESSION['btPassword'])) {
        //$cID = $cOptObj->findConsoleIDByName("Add New Rank");
        $memberInfo = $member->get_info();
        if ($member->hasAccess($cOptObj)) {
            $rank = new Rank($mysqli);
            if ($rank->select($_POST['rID'])) {
                $rankInfo = $rank->get_info_filtered();
                if (!isset($_POST['confirm']) || $_POST['confirm'] == "") {
                    echo "\n\t\t\t\t\t\tAre you sure you want to delete the rank <b>" . $rankInfo['name'] . "?</b>\n\t\t\t\t\t";
                } else {
                    if ($rank->countMembers() > 0) {
                        echo "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\$('#deleteMessage').html('There are currently members with the rank of <b>" . $rankInfo['name'] . "</b>.  Please change all members with this rank before deleting it.');\n\t\t\t\t\t\t\t\t\$('#deleteDiv').dialog({\n\t\t\t\t\t\t\t\t\ttitle: 'Manage Ranks - Delete Rank',\n\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t\t'OK': function() { \$(this).dialog('close'); }\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});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t";
コード例 #25
0
ファイル: add.php プロジェクト: nsystem1/clanscripts
 * 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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$intAddConsoleCID = $consoleObj->findConsoleIDByName("Add Console Option");
$consoleObj->select($intAddConsoleCID);
$checkAccess1 = $member->hasAccess($consoleObj);
$intManageConsoleCID = $consoleObj->findConsoleIDByName("Manage Console Options");
$consoleObj->select($intManageConsoleCID);
$checkAccess2 = $member->hasAccess($consoleObj);
$checkAccess = $checkAccess1 || $checkAccess2;
$blnSuccess = false;
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($checkAccess && is_numeric($_POST['mID'])) {
        if ($member->select($_POST['mID']) && ($_POST['accessrule'] == "allow" || $_POST['accessrule'] == "deny")) {
            $intAlreadyAdded = "no";
            $counter = 0;
            foreach ($_SESSION['btAccessRules'] as $key => $accessInfo) {
                if ($accessInfo['mID'] == $_POST['mID']) {
                    $intAlreadyAdded = $key;
コード例 #26
0
ファイル: deletestatus.php プロジェクト: nsystem1/clanscripts
 * 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";
$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";
コード例 #27
0
ファイル: _menus.php プロジェクト: bluethrust/clanscriptsv4
<?php

// Check for Objects
if (!isset($consoleOptionObj)) {
    $consoleOptionObj = new ConsoleOption($mysqli);
}
if (!isset($memberObj)) {
    $memberObj = new Member($mysqli);
}
// SPECIAL MENU COMPONENTS
// Shoutbox
$arrShoutBoxIDs = array();
$manageNewsCID = $consoleOptionObj->findConsoleIDByName("Manage News");
$consoleOptionObj->select($manageNewsCID);
if ($memberObj->hasAccess($consoleOptionObj)) {
    $shoutBoxEditLink = $MAIN_ROOT . "members/console.php?cID=" . $manageNewsCID . "&newsID=";
    $shoutBoxDeleteLink = $MAIN_ROOT . "members/include/news/include/deleteshoutpost.php";
}
$postShoutboxCID = $consoleOptionObj->findConsoleIDByName("Post in Shoutbox");
$consoleOptionObj->select($postShoutboxCID);
if ($memberObj->hasAccess($consoleOptionObj)) {
    $shoutBoxPostLink = $MAIN_ROOT . "members/include/news/include/postshoutbox.php";
}
$arrSpecialMenuItems = array();
// TOP PLAYERS
$arrSpecialMenuItems['top-players'] = "&nbsp;&nbsp;<b>&middot;</b> <a href='" . $MAIN_ROOT . "top-players/recruiters.php'>Recruiters</a><br>";
$hpGameObj = new Game($mysqli);
$arrGames = $hpGameObj->getGameList();
foreach ($arrGames as $gameID) {
    $hpGameObj->select($gameID);
    $arrSpecialMenuItems['top-players'] .= "&nbsp;&nbsp;<b>&middot;</b> <a href='" . $MAIN_ROOT . "top-players/game.php?gID=" . $gameID . "'>" . $hpGameObj->get_info_filtered("name") . "</a><br>";
コード例 #28
0
ファイル: memberapp.php プロジェクト: nsystem1/clanscripts
 public function notifyManagers()
 {
     $webInfoObj = new WebsiteInfo($this->MySQL);
     $memberObj = new Member($this->MySQL);
     $consoleObj = new ConsoleOption($this->MySQL);
     $webInfoObj->select(1);
     $webInfo = $webInfoObj->get_info_filtered();
     $viewMemberAppCID = $consoleObj->findConsoleIDByName("View Member Applications");
     $consoleObj->select($viewMemberAppCID);
     $arrBCC = array();
     $result = $this->MySQL->query("SELECT member_id FROM " . $this->MySQL->get_tablePrefix() . "members WHERE disabled = '0'");
     while ($row = $result->fetch_assoc()) {
         $memberObj->select($row['member_id']);
         if ($memberObj->hasAccess($consoleObj)) {
             if ($memberObj->get_info("email") != "") {
                 $arrBCC[] = array("email" => $memberObj->get_info("email"), "name" => $memberObj->get_info("username"));
             }
             $memberObj->postNotification("A new member has signed up!  Go to the <a href='" . MAIN_ROOT . "members/console.php?cID=" . $viewMemberAppCID . "'>View Member Applications</a> page to review the application.");
         }
     }
     $subject = $webInfo['clanname'] . ": New Member Application";
     $message = "A new member, " . $this->arrObjInfo['username'] . ", has signed up at your website: <a href='" . FULL_SITE_URL . "'>" . $webInfo['clanname'] . "</a>!";
     $webInfoObj->objBTMail->sendMail("", $subject, $message, array("bcc" => $arrBCC));
 }
コード例 #29
0
<?php

include "../../_setup.php";
include "../../classes/member.php";
$member = new Member($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$websiteSettingsCID = $consoleObj->findConsoleIDByName("Website Settings");
$consoleObj->select($websiteSettingsCID);
if (!isset($_SESSION['btUsername']) || !isset($_SESSION['btPassword']) || !$member->select($_SESSION['btUsername']) || $member->select($_SESSION['btUsername']) && !$member->authorizeLogin($_SESSION['btPassword']) || $member->select($_SESSION['btUsername']) && $member->authorizeLogin($_SESSION['btPassword']) && !$member->hasAccess($consoleObj)) {
    header("HTTP/1.0 404 Not Found");
    exit;
}
$menuSQL = "\nINSERT INTO `menuitem_custompage` (`menucustompage_id`, `menuitem_id`, `custompage_id`, `prefix`, `linktarget`, `textalign`) VALUES(3, 19, 12, '<b>&middot;</b> ', '', 'left');\nINSERT INTO `menuitem_custompage` (`menucustompage_id`, `menuitem_id`, `custompage_id`, `prefix`, `linktarget`, `textalign`) VALUES(2, 18, 11, '<b>&middot;</b> ', '', 'left');\n\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(1, 1, 'index.php', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(3, 8, 'news', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(4, 9, 'members.php', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(5, 10, 'ranks.php', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(6, 11, 'squads', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(7, 12, 'tournaments', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(8, 13, 'events', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(9, 14, 'medals.php', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(10, 15, 'diplomacy', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(11, 16, 'diplomacy/request.php', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(12, 20, 'forum', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(13, 21, 'signup.php', '', '<b>&middot;</b> ', 'left');\nINSERT INTO `menuitem_link` (`menulink_id`, `menuitem_id`, `link`, `linktarget`, `prefix`, `textalign`) VALUES(29, 45, 'forgotpassword.php', '', '<b>&middot;</b> ', 'left');\n\nINSERT INTO `menuitem_shoutbox` (`menushoutbox_id`, `menuitem_id`, `width`, `height`, `percentwidth`, `percentheight`, `textboxwidth`) VALUES(2, 47, 0, 0, 0, 0, 0);\n\nINSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `headertype`, `headercode`, `accesstype`, `hide`) VALUES(3, 0, 'Main Menu', 1, 'customcode', '<div class=''mainMenuIMG''></div>', 0, 0);\nINSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `headertype`, `headercode`, `accesstype`, `hide`) VALUES(2, 0, 'Top Players', 2, 'customcode', '<div class=''topPlayersIMG''></div>', 0, 0);\nINSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `headertype`, `headercode`, `accesstype`, `hide`) VALUES(9, 0, 'Shoutbox', 4, 'customcode', '<div class=''shoutboxIMG''></div>', 0, 0);\nINSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `headertype`, `headercode`, `accesstype`, `hide`) VALUES(8, 1, 'Default Login', 1, 'customcode', '', 0, 0);\nINSERT INTO `menu_category` (`menucategory_id`, `section`, `name`, `sortnum`, `headertype`, `headercode`, `accesstype`, `hide`) VALUES(10, 0, 'Poll', 3, 'customcode', '<div style=''position: relative; margin: 0px auto; text-align: center''>\r\n    <img src=''[MAIN_ROOT]themes/armygreen/images/layout/poll.png''>\r\n</div>', 0, 1);\n\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(3, 2, 'Top Players Links', 'top-players', 0, 0, 0, 1);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(1, 3, 'Home', 'link', 1, 0, 0, 1);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(8, 3, 'News', 'link', 3, 0, 0, 2);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(9, 3, 'Members', 'link', 4, 0, 0, 3);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(10, 3, 'Ranks', 'link', 5, 0, 0, 4);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(11, 3, 'Squads', 'link', 6, 0, 0, 5);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(12, 3, 'Tournaments', 'link', 7, 0, 0, 6);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(13, 3, 'Events', 'link', 8, 0, 0, 7);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(14, 3, 'Medals', 'link', 9, 0, 0, 8);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(15, 3, 'Diplomacy', 'link', 10, 0, 0, 9);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(16, 3, 'Diplomacy Request', 'link', 11, 0, 0, 10);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(19, 3, 'Rules', 'custompage', 3, 0, 0, 11);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(18, 3, 'History', 'custompage', 2, 0, 0, 12);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(20, 3, 'Forum', 'link', 12, 0, 0, 13);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(21, 3, 'Sign Up', 'link', 13, 2, 0, 14);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(45, 3, 'Forgot Password', 'link', 29, 2, 0, 15);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(46, 8, 'Login', 'login', 0, 0, 0, 1);\nINSERT INTO `menu_item` (`menuitem_id`, `menucategory_id`, `name`, `itemtype`, `itemtype_id`, `accesstype`, `hide`, `sortnum`) VALUES(47, 9, 'Shoutbox', 'shoutbox', 2, 0, 0, 1);\n\n";
$menuSQL = str_replace("INSERT INTO `", "INSERT INTO `" . $dbprefix, $menuSQL);
$emptyMenusSQL = "TRUNCATE `" . $dbprefix . "menuitem_customblock`;";
$emptyMenusSQL .= "TRUNCATE `" . $dbprefix . "menuitem_custompage`;";
$emptyMenusSQL .= "TRUNCATE `" . $dbprefix . "menuitem_image`;";
$emptyMenusSQL .= "TRUNCATE `" . $dbprefix . "menuitem_link`;";
$emptyMenusSQL .= "TRUNCATE `" . $dbprefix . "menuitem_shoutbox`;";
$emptyMenusSQL .= "TRUNCATE `" . $dbprefix . "menu_category`;";
$emptyMenusSQL .= "TRUNCATE `" . $dbprefix . "menu_item`;";
$fullSQL = $emptyMenusSQL . $menuSQL;
if ($mysqli->multi_query($fullSQL)) {
    do {
        if ($result = $mysqli->store_result()) {
            $result->free();
        }
    } while ($mysqli->next_result());
    echo "Menus restored to default!";
}
?>
コード例 #30
0
ファイル: tournament.php プロジェクト: nsystem1/clanscripts
 public function memberCanJoin($memberID)
 {
     $member = new Member($this->MySQL);
     $consoleObj = new ConsoleOption($this->MySQL);
     $joinCID = $consoleObj->findConsoleIDByName("Join a Tournament");
     $consoleObj->select($joinCID);
     $returnVal = false;
     if ($this->intTableKeyValue != "" && $member->select($memberID) && $member->hasAccess($consoleObj)) {
         $arrTournaments = $member->getTournamentList();
         $checkCount = 0;
         // Check Spots left
         $arrPlayers = $this->getPlayers();
         $maxPlayers = $this->arrObjInfo['playersperteam'] * $this->arrObjInfo['maxteams'];
         if ($maxPlayers == count($arrPlayers)) {
             $checkCount++;
         }
         // Check if already in tournament
         if (in_array($memberID, $arrTournaments)) {
             $checkCount++;
         }
         $returnVal = $checkCount == 0;
     }
     return $returnVal;
 }