Example #1
0
 public function select($intIDNum, $numericIDOnly = true)
 {
     $returnVal = parent::select($intIDNum, $numericIDOnly);
     $this->accessToken = $this->arrObjInfo['access_token'];
     $this->refreshToken = $this->arrObjInfo['refresh_token'];
     return $returnVal;
 }
Example #2
0
function revokeMedalSave()
{
    global $mysqli, $member, $medalObj, $memberInfo, $formObj;
    $revokeMedalObj = new Basic($mysqli, "medals_members", "medalmember_id");
    $arrMemberMedals = $member->getMedalList(true);
    $memberMedalID = array_search($_POST['medal'], $arrMemberMedals);
    if ($revokeMedalObj->select($memberMedalID) && $revokeMedalObj->delete()) {
        // Check if medal is frozen for member already
        $arrFrozenMembers = $medalObj->getFrozenMembersList();
        if (in_array($_POST['member'], $arrFrozenMembers)) {
            $frozenMedalID = array_search($_POST['member'], $arrFrozenMembers);
            $medalObj->objFrozenMedal->select($frozenMedalID);
            $medalObj->objFrozenMedal->delete();
        }
        $frozenMessage = "";
        if ($medalObj->get_info("autodays") != 0 || $medalObj->get_info("autorecruits") != 0) {
            $freezeTime = 86400 * $_POST['freezetime'] + time();
            $medalObj->objFrozenMedal->addNew(array("medal_id", "member_id", "freezetime"), array($_POST['medal'], $_POST['member'], $freezeTime));
            $dispDays = $_POST['freezetime'] == 1 ? "day" : "days";
            $frozenMessage = "  The medal will not be awarded again for " . $_POST['freezetime'] . " " . $dispDays . ".";
        }
        $logMessage = $member->getMemberLink() . " was stripped of the " . $medalObj->get_info_filtered("name") . " medal." . $frozenMessage . "<br><br><b>Reason:</b><br>" . filterText($_POST['reason']);
        $member->postNotification("You were stripped of the medal: <b>" . $medalObj->get_info_filtered("name") . "</b>");
        $member->select($memberInfo['member_id']);
        $member->logAction($logMessage);
    } else {
        $formObj->blnSaveResult = false;
        $formObj->errors[] = "Unable to save information to the database.  Please contact the website administrator.";
    }
}
Example #3
0
 public function displayCustomPageLink()
 {
     $customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
     $menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
     $customPageObj->select($menuCustomPageInfo['custompage_id']);
     echo "\n\t\t\t<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'>\n\t\t\t" . $menuCustomPageInfo['prefix'] . "<a href='" . MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a>\n\t\t\t</div>\n\t\t\t";
 }
Example #4
0
 public function select($intIDNum, $numericIDOnly = true)
 {
     $returnVal = parent::select($intIDNum, $numericIDOnly);
     if ($returnVal) {
         $this->populateConfig();
     }
     return $returnVal;
 }
 public function displayCustomPageLink()
 {
     $customPageObj = new Basic($this->MySQL, "custompages", "custompage_id");
     $menuCustomPageInfo = $this->menuItemObj->objCustomPage->get_info();
     $customPageObj->select($menuCustomPageInfo['custompage_id']);
     $menuItemInfo = $customPageObj->get_info_filtered();
     $menuItemInfo['name'] = $menuItemInfo['pagename'];
     $menuCustomPageInfo['link'] = MAIN_ROOT . "custompage.php?pID=" . $menuItemInfo['custompage_id'];
     $this->formatLink($menuItemInfo, $menuCustomPageInfo);
 }
Example #6
0
 public function select($intIDNum)
 {
     $returnVal = false;
     if (is_numeric($intIDNum) && parent::select($intIDNum)) {
         if ($this->objEvent->select($this->arrObjInfo['event_id'])) {
             $returnVal = true;
         }
     }
     return $returnVal;
 }
Example #7
0
 public function select($intIDNum, $numericIDOnly = true)
 {
     $temp = $this->arrObjInfo;
     $returnVal = parent::select($intIDNum, $numericIDOnly);
     if ($this->blnRefreshInfo) {
         $this->arrObjInfo = array();
         $result = $this->MySQL->query("SELECT * FROM " . $this->strTableName);
         while ($row = $result->fetch_assoc()) {
             $this->arrObjInfo[$row['name']] = $row['value'];
             $this->arrKeys[$row['name']] = $row['websiteinfo_id'];
         }
         $this->blnRefreshInfo = false;
     } else {
         $this->arrObjInfo = $temp;
     }
     return $returnVal;
 }
Example #8
0
 function calcStat($gameStatID, $memberObj)
 {
     $calculatedValue = 0;
     $gameStatObj = new Basic($this->MySQL, "gamestats", "gamestats_id");
     if ($gameStatObj->select($gameStatID) && isset($memberObj)) {
         $gameStatInfo = $gameStatObj->get_info_filtered();
         $gameStat1Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
         $gameStat2Obj = new Basic($this->MySQL, "gamestats", "gamestats_id");
         if ($gameStatInfo['stattype'] == "calculate" && $gameStat1Obj->select($gameStatInfo['firststat_id']) && $gameStat2Obj->select($gameStatInfo['secondstat_id'])) {
             $gameStats1Info = $gameStat1Obj->get_info_filtered();
             $gameStats2Info = $gameStat2Obj->get_info_filtered();
             $gameStat1Type = $gameStats1Info['stattype'];
             $gameStat2Type = $gameStats2Info['stattype'];
             if ($gameStat1Type == "calculate") {
                 $gameStat1Value = $this->calcStat($gameStats1Info['gamestats_id'], $memberObj);
             } else {
                 $gameStat1Value = $memberObj->getGameStatValue($gameStats1Info['gamestats_id']);
             }
             if ($gameStat2Type == "calculate") {
                 $gameStat2Value = $this->calcStat($gameStats2Info['gamestats_id'], $memberObj);
             } else {
                 $gameStat2Value = $memberObj->getGameStatValue($gameStats2Info['gamestats_id']);
             }
             switch ($gameStatInfo['calcop']) {
                 case "div":
                     if ($gameStat2Value == 0) {
                         $gameStat2Value = 1;
                     }
                     $calculatedValue = round($gameStat1Value / $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 case "mul":
                     $calculatedValue = round($gameStat1Value * $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 case "sub":
                     $calculatedValue = round($gameStat1Value - $gameStat2Value, $gameStatInfo['decimalspots']);
                     break;
                 default:
                     $calculatedValue = round($gameStat1Value + $gameStat2Value, $gameStatInfo['decimalspots']);
             }
         }
     }
     return $calculatedValue;
 }
Example #9
0
function dispMenu($intSectionNum)
{
    global $MAIN_ROOT, $LOGGED_IN, $mysqli, $shoutBoxPostLink, $shoutBoxDeleteLink, $shoutBoxEditLink, $arrShoutBoxIDs, $websiteInfo, $arrLoginInfo;
    echo "<div id='menuSection_" . $intSectionNum . "'>";
    $menuCatObj = new MenuCategory($mysqli);
    $menuItemObj = new MenuItem($mysqli);
    $customPageObj = new Basic($mysqli, "custompages", "custompage_id");
    $customFormObj = new CustomForm($mysqli);
    $downloadCatObj = new Basic($mysqli, "downloadcategory", "downloadcategory_id");
    $memberObj = new Member($mysqli);
    $pollObj = new Poll($mysqli);
    if ($LOGGED_IN) {
        $intMenuAccessType = 1;
    } else {
        $intMenuAccessType = 2;
    }
    $arrMenuCategories = $menuCatObj->getCategories($intSectionNum, $intMenuAccessType);
    foreach ($arrMenuCategories as $menuCatID) {
        $menuCatObj->select($menuCatID);
        $menuCatInfo = $menuCatObj->get_info();
        $arrMenuItems = $menuItemObj->getItems($menuCatInfo['menucategory_id'], $intMenuAccessType);
        if ($menuCatInfo['headertype'] == "image") {
            echo "<img src='" . $MAIN_ROOT . $menuCatInfo['headercode'] . "' class='menuHeaderImg'><br>";
        } else {
            $menuCatInfo['headercode'] = str_replace("[MAIN_ROOT]", $MAIN_ROOT, $menuCatInfo['headercode']);
            $menuCatInfo['headercode'] = str_replace("[MEMBER_ID]", $arrLoginInfo['memberID'], $menuCatInfo['headercode']);
            $menuCatInfo['headercode'] = str_replace("[MEMBERUSERNAME]", $arrLoginInfo['memberUsername'], $menuCatInfo['headercode']);
            $menuCatInfo['headercode'] = str_replace("[MEMBERRANK]", $arrLoginInfo['memberRank'], $menuCatInfo['headercode']);
            $menuCatInfo['headercode'] = str_replace("[PMLINK]", $arrLoginInfo['pmLink'], $menuCatInfo['headercode']);
            echo $menuCatInfo['headercode'];
        }
        foreach ($arrMenuItems as $menuItemID) {
            $menuItemObj->select($menuItemID);
            $menuItemInfo = $menuItemObj->get_info();
            $menuItemInfo['itemtype'] = $menuItemInfo['itemtype'] == "customcode" || $menuItemInfo['itemtype'] == "customformat" ? "customblock" : $menuItemInfo['itemtype'];
            switch ($menuItemInfo['itemtype']) {
                case "link":
                    $menuItemObj->objLink->select($menuItemInfo['itemtype_id']);
                    $menuLinkInfo = $menuItemObj->objLink->get_info();
                    $checkURL = parse_url($menuLinkInfo['link']);
                    if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) {
                        $menuLinkInfo['link'] = $MAIN_ROOT . $menuLinkInfo['link'];
                    }
                    echo "<div style='text-align: " . $menuLinkInfo['textalign'] . "'>&nbsp;&nbsp;" . $menuLinkInfo['prefix'] . "<a href='" . $menuLinkInfo['link'] . "' target='" . $menuLinkInfo['linktarget'] . "'>" . $menuItemInfo['name'] . "</a></div>";
                    break;
                case "top-players":
                    $dispTopPlayers = unserialize(SPECIAL_MENU_ITEM);
                    echo $dispTopPlayers['top-players'];
                    break;
                case "customform":
                    $menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']);
                    $menuCustomFormInfo = $menuItemObj->objCustomPage->get_info();
                    $customFormObj->select($menuCustomFormInfo['custompage_id']);
                    echo "<div style='text-align: " . $menuCustomFormInfo['textalign'] . "'>&nbsp;&nbsp;" . $menuCustomFormInfo['prefix'] . "<a href='" . $MAIN_ROOT . "customform.php?pID=" . $menuCustomFormInfo['custompage_id'] . "' target='" . $menuCustomFormInfo['linktarget'] . "'>" . $customFormObj->get_info_filtered("name") . "</a></div>";
                    break;
                case "custompage":
                    $menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']);
                    $menuCustomPageInfo = $menuItemObj->objCustomPage->get_info();
                    $customPageObj->select($menuCustomPageInfo['custompage_id']);
                    echo "<div style='text-align: " . $menuCustomPageInfo['textalign'] . "'>&nbsp;&nbsp;" . $menuCustomPageInfo['prefix'] . "<a href='" . $MAIN_ROOT . "custompage.php?pID=" . $menuCustomPageInfo['custompage_id'] . "' target='" . $menuCustomPageInfo['linktarget'] . "'>" . $customPageObj->get_info_filtered("pagename") . "</a></div>";
                    break;
                case "downloads":
                    $menuItemObj->objCustomPage->select($menuItemInfo['itemtype_id']);
                    $menuDownloadLinkInfo = $menuItemObj->objCustomPage->get_info();
                    $downloadCatObj->select($menuDownloadLinkInfo['custompage_id']);
                    echo "<div style='text-align: " . $menuDownloadLinkInfo['textalign'] . "'>&nbsp;&nbsp;" . $menuDownloadLinkInfo['prefix'] . "<a href='" . $MAIN_ROOT . "downloads/index.php?catID=" . $menuDownloadLinkInfo['custompage_id'] . "' target='" . $menuDownloadLinkInfo['linktarget'] . "'>" . $downloadCatObj->get_info_filtered("name") . "</a></div>";
                    break;
                case "customblock":
                    $menuItemObj->objCustomBlock->select($menuItemInfo['itemtype_id']);
                    $menuCustomBlockInfo = $menuItemObj->objCustomBlock->get_info();
                    $menuCustomBlockInfo['code'] = str_replace("[MAIN_ROOT]", $MAIN_ROOT, $menuCustomBlockInfo['code']);
                    $menuCustomBlockInfo['code'] = str_replace("[MEMBER_ID]", $arrLoginInfo['memberID'], $menuCustomBlockInfo['code']);
                    $menuCustomBlockInfo['code'] = str_replace("[MEMBERUSERNAME]", $arrLoginInfo['memberUsername'], $menuCustomBlockInfo['code']);
                    $menuCustomBlockInfo['code'] = str_replace("[MEMBERRANK]", $arrLoginInfo['memberRank'], $menuCustomBlockInfo['code']);
                    $menuCustomBlockInfo['code'] = str_replace("[PMLINK]", $arrLoginInfo['pmLink'], $menuCustomBlockInfo['code']);
                    echo $menuCustomBlockInfo['code'];
                    break;
                case "image":
                    $menuItemObj->objImage->select($menuItemInfo['itemtype_id']);
                    $menuImageInfo = $menuItemObj->objImage->get_info();
                    $checkURL = parse_url($menuItemInfo['imageurl']);
                    if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) {
                        $menuImageInfo['imageurl'] = $MAIN_ROOT . $menuImageInfo['imageurl'];
                    }
                    $dispSetWidth = "";
                    if ($menuImageInfo['width'] != 0) {
                        $dispSetWidth = "width: " . $menuImageInfo['width'] . "px; ";
                    }
                    $dispSetHeight = "";
                    if ($menuImageInfo['height'] != 0) {
                        $dispSetHeight = "height: " . $menuImageInfo['height'] . "px; ";
                    }
                    echo "<div style='text-align: " . $menuImageInfo['imagealign'] . "; margin-top: 15px; margin-bottom: 15px'>";
                    if ($menuImageInfo['link'] != "") {
                        $checkURL = parse_url($menuImageInfo['link']);
                        if (!isset($checkURL['scheme']) || ($checkURL['scheme'] = "")) {
                            $menuImageInfo['link'] = $MAIN_ROOT . $menuImageInfo['link'];
                        }
                        echo "<a href='" . $menuImageInfo['link'] . "' target='" . $menuImageInfo['linktarget'] . "'><img src='" . $menuImageInfo['imageurl'] . "' style='" . $dispSetWidth . $dispSetHeight . "' title='" . $menuItemInfo['name'] . "'></a>";
                    } else {
                        echo "<img src='" . $menuImageInfo['imageurl'] . "' title='" . $menuItemInfo['name'] . "' style='" . $dispSetWidth . $dispSetHeight . "'>";
                    }
                    echo "</div>";
                    break;
                case "shoutbox":
                    $menuItemObj->objShoutbox->select($menuItemInfo['itemtype_id']);
                    $menuShoutboxInfo = $menuItemObj->objShoutbox->get_info();
                    if ($menuShoutboxInfo['width'] == 0) {
                        $menuShoutboxInfo['width'] = "145";
                    }
                    $blnShoutboxWidthPercent = false;
                    if ($menuShoutboxInfo['percentwidth'] == 1) {
                        $blnShoutboxWidthPercent = true;
                    }
                    if ($menuShoutboxInfo['height'] == 0) {
                        $menuShoutboxInfo['height'] = "300";
                    }
                    $blnShoutboxHeightPercent = false;
                    if ($menuShoutboxInfo['percentheight'] == 1) {
                        $blnShoutboxHeightPercent = true;
                    }
                    $mainShoutboxObj = new Shoutbox($mysqli, "news", "news_id");
                    $newShoutBoxID = uniqid("mainShoutBox_");
                    $arrShoutBoxIDs[] = $newShoutBoxID;
                    $mainShoutboxObj->strDivID = $newShoutBoxID;
                    $mainShoutboxObj->intDispWidth = $setShoutBoxWidth;
                    $mainShoutboxObj->intDispHeight = $setShoutBoxHeight;
                    $mainShoutboxObj->strEditLink = $shoutBoxEditLink;
                    $mainShoutboxObj->strDeleteLink = $shoutBoxDeleteLink;
                    $mainShoutboxObj->strPostLink = $shoutBoxPostLink;
                    echo $mainShoutboxObj->dispShoutbox($menuShoutboxInfo['width'], $menuShoutboxInfo['height'], $blnShoutboxWidthPercent, $menuShoutboxInfo['textboxwidth'], $blnShoutboxHeightPercent);
                    echo "\n\t\t\t\t\t\n\t\t\t\t\t\t<script type='text/javascript'>\n\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\t\$('#" . $newShoutBoxID . "').animate({\n\t\t\t\t\t\t\t\t\t\tscrollTop:\$('#" . $newShoutBoxID . "')[0].scrollHeight\n\t\t\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#" . $newShoutBoxID . "_message').keypress(function(eventObj) {\n\t\t\t\t\t\t\t\t\tif(eventObj.which == 13) {\n\t\t\t\t\t\t\t\t\t\tif(\$('#" . $newShoutBoxID . "_message').val() != \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\$('#" . $newShoutBoxID . "_postShoutbox input[type=button]').click();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\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});\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\n\t\t\t\t\t";
                    break;
                case "newestmembers":
                    $dispNewMembers = unserialize(SPECIAL_MENU_ITEM);
                    echo $dispNewMembers['newmembers'];
                    break;
                case "forumactivity":
                    $dispNewMembers = unserialize(SPECIAL_MENU_ITEM);
                    echo $dispNewMembers['forumactivity'];
                    break;
                case "login":
                    echo constant("LOGIN_BOX");
                    break;
                case "poll":
                    $pollObj->select($menuItemInfo['itemtype_id']);
                    $memberObj->select($_SESSION['btUsername']);
                    $pollObj->dispPollMenu($memberObj);
                    break;
            }
        }
        echo "<br>";
    }
    echo "</div>";
}
Example #10
0
 * 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";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage News");
$consoleObj->select($cID);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$memberInfo = $member->get_info_filtered();
$commentObj = new Basic($mysqli, "comments", "comment_id");
$newsObj = new News($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $commentObj->select($_POST['commentID'])) {
    $commentInfo = $commentObj->get_info_filtered();
    $newsObj->select($commentInfo['news_id']);
    $newsInfo = $newsObj->get_info_filtered();
    $member->select($commentInfo['member_id']);
    $posterInfo = $member->get_info_filtered();
    $logMessage = "Deleted comment by " . $member->getMemberLink() . " on news post: <b><a href='" . $MAIN_ROOT . "news/viewpost.php?nID=" . $newsInfo['news_id'] . "'>" . $newsInfo['postsubject'] . "</a></b>";
    $member->select($memberInfo['member_id']);
    $member->logAction($logMessage);
    $commentObj->delete();
    $arrComments = $newsObj->getComments();
    $commentCount = $newsObj->countComments();
}
include "../../../news/comments.php";
echo "\n\t<script type='text/javascript'>\n\t\t\$(document).ready(function() {\n\t\t\t\$('#commentCount').html('" . $commentCount . "');\n\t\t});\n\t</script>\n";
Example #11
0
          * 	1. Make sure that all of the game stats were successfully inserted into the db
          *  2. For each stat that was an auto-calculated stat, we need to update the firststat and secondstat IDs
          *  3. We can identify the correct $arrSavedStat index by accessing the stat order which is stored in
          *     $_SESSION[btStatCache][key][firstStat] and $_SESSION[btStatCache][key][secondStat]
          */
         if ($countErrors == 0) {
             $arrColumns = array("firststat_id", "secondstat_id", "calcop");
             foreach ($arrSavedStats as $key => $statInfo) {
                 if ($statInfo['stattype'] == "calculate") {
                     $intFirstStatOrder = $_SESSION['btStatCache'][$key]['firstStat'];
                     $intFirstStatID = $arrSavedStats[$intFirstStatOrder]['gamestats_id'];
                     $intSecondStatOrder = $_SESSION['btStatCache'][$key]['secondStat'];
                     $intSecondStatID = $arrSavedStats[$intSecondStatOrder]['gamestats_id'];
                     $calcOp = $_SESSION['btStatCache'][$key]['calcOperation'];
                     $arrValues = array($intFirstStatID, $intSecondStatID, $calcOp);
                     $newStat->select($statInfo['gamestats_id']);
                     $newStat->update($arrColumns, $arrValues);
                 }
             }
         } else {
             $showErrorMessage = "<br><br>However, the following stats were unable to be saved:<br><br>" . $dispError;
         }
         echo "\n\t\t\t<div style='display: none' id='successBox'>\n\t\t\t<p align='center'>\n\t\t\tSuccessfully Added New Game: <b>" . $newGameInfo['name'] . "</b>!" . $showErrorMessage . "\n\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\tpopupDialog('Add New Game', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t</script>\n\t\t\t";
     } else {
         $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to add new game.  Please try again.<br>";
         $_POST['submit'] = false;
     }
 } else {
     $_POST = filterArray($_POST);
     $_POST['submit'] = false;
 }
Example #12
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_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>";
    }
}
Example #13
0
 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();
         $arrGroups['tournament'] = array();
         $arrGroups['rankcategory'] = array();
         foreach ($arrPMMID as $pmmID) {
             $multiMemPMObj->select($pmmID);
             $multiMemPMInfo = $multiMemPMObj->get_info();
             if ($multiMemPMInfo['grouptype'] != "" && !in_array($multiMemPMInfo['group_id'], $arrGroups[$multiMemPMInfo['grouptype']])) {
                 $arrGroups[$multiMemPMInfo['grouptype']][] = $multiMemPMInfo['group_id'];
                 switch ($multiMemPMInfo['grouptype']) {
                     case "rankcategory":
                         $dispName = $rankCatObj->select($multiMemPMInfo['group_id']) ? $rankCatObj->get_info_filtered("name") . " - Category" : "";
                         $_SESSION['btComposeList'][$pmSessionID]['rankcategory'][] = $multiMemPMInfo['group_id'];
                         $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rankcategory_" . $multiMemPMInfo['group_id'] . "'>&times;</div></div>\");\n\t\t\t\t\t\t\t\t\t";
                         break;
                     case "rank":
                         $dispName = $member->objRank->select($multiMemPMInfo['group_id']) ? $member->objRank->get_info_filtered("name") . " - Rank" : "";
                         $_SESSION['btComposeList'][$pmSessionID]['rank'][] = $multiMemPMInfo['group_id'];
                         $composeListJS .= "\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'rank_" . $multiMemPMInfo['group_id'] . "'><div style='float: left'>" . $dispName . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'rank_" . $multiMemPMInfo['group_id'] . "'>&times;</div></div>\");\n\t\t\t\t\t\t\t\t\t";
                         break;
                     case "squad":
Example #14
0
 function getMemberLink($args = array("color" => true))
 {
     global $MAIN_ROOT;
     $returnVal = "";
     if ($this->intTableKeyValue != "" && is_numeric($this->intTableKeyValue)) {
         $memberRank = new Rank($this->MySQL);
         $memberRankCat = new Basic($this->MySQL, "rankcategory", "rankcategory_id");
         $memberInfo = $this->get_info_filtered();
         $memberRank->select($memberInfo['rank_id']);
         $rankInfo = $memberRank->get_info_filtered();
         $memberRankCat->select($rankInfo['rankcategory_id']);
         $memberColor = $memberRankCat->get_info_filtered("color");
         if ($args['color']) {
             $returnVal = "<span style='color: " . $rankInfo['color'] . "'><a href='" . $MAIN_ROOT . "profile.php?mID=" . $memberInfo['member_id'] . "' style='color: " . $memberColor . "' title='" . $memberInfo['username'] . "'>" . $memberInfo['username'] . "</a></span>";
         } else {
             $returnVal = "<a href='" . MAIN_ROOT . "profile.php?mID=" . $this->intTableKeyValue . "'>" . $memberInfo['username'] . "</a>";
         }
         if ($args['wrapper'] === false) {
             $returnVal = MAIN_ROOT . "profile.php?mID=" . $this->intTableKeyValue;
         }
     }
     return $returnVal;
 }
Example #15
0
<?php

include_once "../../_config.php";
include_once "../../classes/btmysql.php";
include_once "../../classes/member.php";
$mysqli = new btmysql($dbhost, $dbuser, $dbpass, $dbname);
$mysqli->set_tablePrefix($dbprefix);
$member = new Member($mysqli);
$websiteInfoObj = new Basic($mysqli, "websiteinfo", "websiteinfo_id");
$member->select($_POST['user']);
if ($member->authorizeLogin($_POST['pass'], 1) && $member->get_info("rank_id") == "1") {
    $memberInfo = $member->get_info_filtered();
    $websiteInfoObj->select(1);
    $websiteInfoObj->update(array("theme"), array($_POST['themeName']));
    echo "\n\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$.post('../themes/" . $_POST['themeName'] . "/menuimport_default.php');\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t";
} else {
    if (!$member->select($_POST['user'])) {
        echo "Unable to select user " . $_POST['user'] . "<br>";
    }
    if (!$member->authorizeLogin($_POST['pass'], 1)) {
        echo "Not Authorized<br>";
    }
    if (!$member->get_info("rank_id") == "1") {
        echo "Not Admin<br>";
    }
}
Example #16
0
 public function select($intIDNum, $numericIDOnly = true)
 {
     $this->blnManageable = false;
     return parent::select($intIDNum, $numericIDOnly);
 }
Example #17
0
     $countErrors++;
     $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> The selected member is not on IA.<br>";
 }
 $arrColumns = array("onia");
 $arrValues = $_POST['ia'] == 1 ? array(1) : array(0);
 if ($_POST['ia'] = "1") {
     $ia_NAME = "On Leave";
 } else {
     $ia_NAME = "Off Leave";
 }
 if ($member->update($arrColumns, $arrValues)) {
     // Check for pending IA request and delete
     $checkRequested = $member->requestedIA(true);
     if ($checkRequested !== false) {
         $requestIAObj = new Basic($mysqli, "iarequest", "iarequest_id");
         $requestIAObj->select($checkRequested);
         $requestIAObj->delete();
     }
     echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\tSuccessfully Set Member's IA Status!\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t \n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tpopupDialog('IA Options', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t</script>\n\t\t\t";
     if ($_POST['why'] != "I") {
         $reasonWHY = " Until {$reason}";
     } else {
         $reasonWHY = "";
     }
     $member->postNotification("You are " . $ia_NAME . $reasonWHY);
     $dispIAMember = $member->getMemberLink();
     $member->select($memberInfo['member_id']);
     $member->logAction("Set " . $dispIAMember . " IA status to " . $ia_NAME);
 } else {
     $countErrors++;
     $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";
Example #18
0
                $appSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
                $arrSelectValues = $appComponentObj->getAssociateIDs();
                $tempArr = array();
                foreach ($arrSelectValues as $selectValueID) {
                    $appSelectOptionObj->select($selectValueID);
                    $appSelectValue = $appSelectOptionObj->get_info_filtered("componentvalue");
                    $tempArr[$selectValueID] = $appSelectValue;
                }
                asort($tempArr);
                $_SESSION['btAppComponent']['cOptions'] = $tempArr;
            } elseif ($countErrors == 0) {
                $_SESSION['btAppComponent']['cOptions'] = array();
            }
        }
    } else {
        echo "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$('#appComponentForm').dialog('close');\n\t\t\t\t});\n\t\t\t</script>\n\t\t";
    }
    $addAppForm->components['name']['value'] = $appCompInfo['name'];
    $addAppForm->components['type']['value'] = $appCompInfo['componenttype'];
    $addAppForm->components['required']['value'] = $appCompInfo['required'];
    $addAppForm->components['tooltip']['value'] = $appCompInfo['tooltip'];
    if ($appCompInfo['componenttype'] == "profile") {
        $appSelectValueID = $appComponentObj->getAssociateIDs();
        $appSelectValueObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
        $appSelectValueObj->select($appSelectValueID[0]);
        $addAppForm->components['profilecomponents']['components']['profileoption']['value'] = $appSelectValueObj->get_info("componentvalue");
    }
    echo "<div id='addAppComponentFormDialog'>";
    $addAppForm->show();
    echo "</div>";
}
Example #19
0
 $consoleCategories = $mysqli->query("SELECT * FROM " . $dbprefix . "consolecategory ORDER BY ordernum DESC");
 while ($arrConsoleCats = $consoleCategories->fetch_assoc()) {
     $tempNum = $arrConsoleCats['consolecategory_id'];
     $arrFormatOptions[$tempNum] = array();
 }
 $consoleOptions = $mysqli->query("SELECT * FROM " . $dbprefix . "console ORDER BY sortnum");
 $rankOptions = "";
 while ($arrConsoleOptions = $consoleOptions->fetch_assoc()) {
     $tempCat = $arrConsoleOptions['consolecategory_id'];
     $arrFormatOptions[$tempCat][] = $arrConsoleOptions['console_id'];
 }
 $countConsoleCats = 0;
 $consoleCatObj = new Basic($mysqli, "consolecategory", "consolecategory_id");
 $consoleJSCode = "";
 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<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<div id='category" . $countConsoleCats . "'>\n\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";
             if ($consoleOptionInfo['pagetitle'] != "-separator-") {
                 echo "&nbsp;&nbsp;<input type='checkbox' name='consoleid_" . $consoleOptionInfo['console_id'] . "' value='1'> " . $consoleOptionInfo['pagetitle'] . "<br>";
             } elseif ($consoleOptionInfo['pagetitle'] == "-separator-") {
                 $dispSeparator = "<div class='dashedLine' style='width: 250px; margin: 6px 1px; padding: 0px; float: left'></div>";
                 echo "<div style='float: left'>&nbsp;&nbsp;<input type='checkbox' name='consoleid_" . $consoleOptionInfo['console_id'] . "' value='1'>&nbsp;</div>" . $dispSeparator;
                 echo "<div style='clear: both'></div>";
             }
Example #20
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/consoleoption.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Custom Form Pages");
$consoleObj->select($cID);
$customPageObj = new Basic($mysqli, "custompages", "custompage_id");
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($member->hasAccess($consoleObj) && $customPageObj->select($_POST['cpID'])) {
        define('MEMBERRANK_ID', $memberInfo['rank_id']);
        $customPageInfo = $customPageObj->get_info_filtered();
        if ($_POST['confirm'] == "1") {
            $customPageObj->delete();
            include "main.php";
        } else {
            echo "<p align='center'>Are you sure you want to delete the custom page <b>" . $customPageInfo['pagename'] . "</b>?";
        }
    } elseif (!$customPageObj->select($_POST['cpID'])) {
        echo "<p align='center'>Unable find the selected custom page.  Please try again or contact the website administrator.</p>";
    }
}
Example #21
0
<?php

if (!defined("SHOW_PROFILE_MAIN")) {
    exit;
}
// SQUADS
$arrSquads = $member->getSquadList();
$squadObj = new Basic($mysqli, "squads", "squad_id");
$dispSquads = "";
foreach ($arrSquads as $squadID) {
    $squadObj->select($squadID);
    $squadInfo = $squadObj->get_info_filtered();
    if ($squadInfo['logourl'] != "") {
        $dispSquads .= "<a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $squadID . "'><img src='" . $squadInfo['logourl'] . "' class='squadLogo'></a><div class='dottedLine' style='width: 90%; margin-top: 20px; margin-bottom: 20px'></div>";
    } else {
        $dispSquads .= "<span class='largeFont'><b><a href='" . $MAIN_ROOT . "squads/profile.php?sID=" . $squadID . "'>" . $squadInfo['name'] . "</a></b><div class='dottedLine' style='width: 90%; margin-top: 20px; margin-bottom: 20px'></div>";
    }
}
if ($dispSquads != "") {
    echo "\n\t\t\t<div class='formTitle' style='text-align: center; margin-top: 20px'>Squads</div>\n\t\t\t<table class='profileTable' style='border-top-width: 0px'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='main' align='center'>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t" . $dispSquads . "\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t";
}
Example #22
0
<?php

if (!defined("SHOW_PROFILE_MAIN")) {
    exit;
}
// GAMES PLAYED
$gameObj = new Game($mysqli);
$gameStatObj = new Basic($mysqli, "gamestats", "gamestats_id");
$dispGamesPlayed = "";
$arrGames = $gameObj->getGameList();
foreach ($arrGames as $gameID) {
    if ($member->playsGame($gameID)) {
        $gameObj->select($gameID);
        $dispGameStats = "";
        $arrGameStats = $gameObj->getAssociateIDs("ORDER BY ordernum");
        foreach ($arrGameStats as $gameStatID) {
            $gameStatObj->select($gameStatID);
            if ($gameStatObj->get_info_filtered("hidestat") == 0) {
                if ($gameStatObj->get_info_filtered("stattype") == "calculate") {
                    $dispGameStats .= "<b>" . $gameStatObj->get_info_filtered("name") . ":</b> " . $gameObj->calcStat($gameStatID, $member) . "<br>";
                } else {
                    $dispGameStats .= "<b>" . $gameStatObj->get_info_filtered("name") . ":</b> " . $member->getGameStatValue($gameStatID) . "<br>";
                }
            }
        }
        $dispGamesPlayed .= "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='profileLabel alternateBGColor' valign='top'>\n\t\t\t\t\t\t\t\t" . $gameObj->get_info_filtered("name") . ":\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class='main' style='padding-left: 10px' valign='top'>\n\t\t\t\t\t\t\t\t" . $dispGameStats . "<br>\t\t\t\t\t\t\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t";
    }
}
if ($dispGamesPlayed != "") {
    echo "\n\n\t\t\t\t\t<div class='formTitle' style='text-align: center; margin-top: 20px'>Game Statistics</div>\n\t\t\t\t\t<table class='profileTable' style='border-top-width: 0px'>\n\t\t\t\t\t" . $dispGamesPlayed . "</table>";
}
Example #23
0
                $dispMembersOnlyTagger = "\n\t\t\t\t<div id='membersOnlyTagger'>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyLoadingSpiral' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\t<img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral2.gif'><br>Loading\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t<div id='membersOnlyTaggerHTML'>\n\t\t\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $actualPageName . "</b></p>\n\t\t\t\t\t\n\t\t\t\t\t\t<p align='center'>Current Status: " . $pageTagStatus . "<br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $taggerCID . "'>Member's Only Pages</a></p>\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>" . $dispTagOrUntag . " Page</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\tfunction setMembersOnlyTaggerStatus() {\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setTaggerStatus: '1' }, function(data) {\n\t\t\t\t\t\t\t\t\$('#membersOnlyTagger').fadeOut(250);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction setMembersOnlyPageStatus() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').hide();\n\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').show();\n\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/membersonlypagetagger.php', { setPageStatus: '1', pageName: '" . filterText($actualPageName) . "', tagURL: '" . $pageTaggerURL . "' }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').html(data);\n\t\t\t\t\t\t\t\t\$('#membersOnlyLoadingSpiral').hide();\n\t\t\t\t\t\t\t\t\$('#membersOnlyTaggerHTML').fadeIn(250);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
            }
        }
    }
}
if (!defined("LOGGED_IN")) {
    define("LOGGED_IN", false);
}
if ($taggerObj->select($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], false) && constant('LOGGED_IN') == false) {
    echo "\n\t\n\t\t<script type='text/javascript'>\n\t\t\n\t\t\twindow.location='" . $MAIN_ROOT . "login.php';\n\t\t\n\t\t</script>\n\t\n\t";
    exit;
}
$hitCountObj = new Basic($mysqli, "hitcounter", "hit_id");
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "hitcounter WHERE ipaddress = '" . $IP_ADDRESS . "'");
if ($result->num_rows > 0) {
    $hitCountRow = $result->fetch_assoc();
    $hitCountObj->select($hitCountRow['hit_id']);
    $updateHits = $hitCountObj->get_info("totalhits") + 1;
    $updateColumns = array("totalhits", "pagename");
    $updateValues = array($updateHits, $PAGE_NAME);
    if (time() > $hitCountObj->get_info("dateposted") + 1800) {
        $updateColumns[] = "dateposted";
        $updateValues[] = time();
    }
    $hitCountObj->update($updateColumns, $updateValues);
} else {
    $hitCountObj->addNew(array("ipaddress", "dateposted", "pagename", "totalhits"), array($IP_ADDRESS, time(), $PAGE_NAME, 1));
}
$blnDisplayNewsTicker = false;
$breadcrumbObj = new BreadCrumb();
$hooksObj->addHook("worldclock-display", "displayDefaultWorldClock");
Example #24
0
 public function select($intIDNum, $numericIDOnly = true)
 {
     $returnVal = parent::select($intIDNum, $numericIDOnly);
     $this->populateDonationInfo();
     return $returnVal;
 }
        } else {
            $_SESSION['btMembersOnlyTagger'] = 1;
            echo "\n\t\t\t\t\n\t\t\t\tThe member's only page tagger is currently <b>on</b>.<br><br>\n\t\t\t\n\t\t\t\t<a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off Member's Only Page Tagger</a>\n\t\t\t\n\t\t\t";
        }
    } elseif ($_POST['setPageStatus'] == 1 && !isset($_POST['pageID']) && $_SESSION['btMembersOnlyTagger'] == 1) {
        $taggerObj = new Basic($mysqli, "membersonlypage", "pageurl");
        if (!$taggerObj->select($_POST['tagURL'], false)) {
            $taggerObj->addNew(array("pagename", "pageurl", "dateadded"), array($_POST['pageName'], $_POST['tagURL'], time()));
            echo "\n\t\t\t\n\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $_POST['pageName'] . "</b></p>\n\t\t\t\t\n\t\t\t\t<p align='center'>Current Status: <span class='pendingFont'>Member's Only</span><br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Member's Only Pages</a></p>\n\t\t\t\n\t\t\t\t\n\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>Untag Page</a></div>\n\t\t\t\t\n\t\t\n\t\t\t";
        } else {
            $taggerObj->delete();
            echo "\n\t\t\t\n\t\t\t\t<p align='center' style='margin: 0px; margin-bottom: 15px'><b>Members Only Tagger: " . $_POST['pageName'] . "</b></p>\n\t\t\t\t\n\t\t\t\t<p align='center'>Current Status: <span class='publicNewsColor'>Public</span><br>Return to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Member's Only Pages</a></p>\n\t\t\t\n\t\t\t\t\n\t\t\t\t<div class='taggerBottomLeft'><a href='javascript:void(0)' onclick='setMembersOnlyTaggerStatus()'>Turn Off</a></div>\n\t\t\t\t<div class='taggerBottomRight'><a href='javascript:void(0)' onclick='setMembersOnlyPageStatus()'>Tag Page</a></div>\n\t\t\t\t\n\t\t\t\n\t\t\t";
        }
    } elseif ($_POST['setPageStatus'] == 1 && isset($_POST['pageID'])) {
        $taggerObj = new Basic($mysqli, "membersonlypage", "page_id");
        if ($taggerObj->select($_POST['pageID'])) {
            $taggerObj->delete();
            include "membersonlypageslist.php";
        }
    } elseif ($_POST['setSectionStatus'] == 1 && ($_POST['pageID'] == "profile" || $_POST['pageID'] == "forum") && ($_POST['pageStatusValue'] == 1 || $_POST['pageStatusValue'] == 0)) {
        $settingName = "private" . $_POST['pageID'];
        $arrColumn = array("value");
        $arrValue = array($_POST['pageStatusValue']);
        $webInfoObj->select($webInfoObj->get_key($settingName));
        if ($webInfoObj->update($arrColumn, $arrValue)) {
            echo "<span class='successFont'><i>section privacy updated!</i></span>";
        } else {
            echo "<span class='failedFont'><i>unable to update privacy settings!</i></span>";
        }
    }
}
Example #26
0
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);
    if (!$member->hasAccess($consoleObj) || !$squadObj->memberHasAccess($memberInfo['member_id'], "manageshoutbox")) {
        exit;
    }
}
$squadNewsObj = new Basic($mysqli, "squadnews", "squadnews_id");
echo "\n\n<script type='text/javascript'>\n\$(document).ready(function() {\n\$('#breadCrumbTitle').html(\"Manage Shoutbox\");\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> Manage Shoutbox\");\n});\n</script>\n";
if ($_GET['nID'] == "") {
    echo "\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<div id='deleteMessage' style='display: none'></div>\n\t\t<div id='contentDiv'></div>\n\t\n\t\n\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\$('#contentDiv').hide();\n\t\t\t\t\$.post(\"" . $MAIN_ROOT . "members/squads/include/newslist.php\", { sID: '" . $_GET['sID'] . "', pID: '" . $pID . "', filterShoutbox: 1 }, function(data) {\n\t\t\t\t\t\$('#contentDiv').html(data);\n\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\$('#contentDiv').fadeIn(250);\n\t\t\t\t});\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tfunction editNews(squadID, newsID) {\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\tdivID = \"#newsDiv_\"+newsID;\n\t\t\t\t\t\$(divID).html(\"<p align='center'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading</p>\");\n\t\t\t\t\t\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/squads/include/editshoutpost.php', { sID: squadID, nID: newsID }, function(data) {\n\t\t\t\t\t\t\$(divID).hide();\n\t\t\t\t\t\t\$(divID).html(data);\n\t\t\t\t\t\t\$(divID).fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfunction saveNewsPost(squadID, newsID) {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\tvar strSubject = '#subject_'+newsID;\n\t\t\t\t\tvar strMessage = '#message_'+newsID;\n\t\t\t\t\tvar intNewsType = '#newsType_'+newsID;\n\t\t\t\t\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/squads/include/editshoutpost.php', { sID: squadID, nID: newsID, submit: 1, subject: \$(strSubject).val(), message: \$(strMessage).val(), newstype: \$(intNewsType).val() }, function(data) {\n\t\t\t\t\t\t\$(divID).hide();\n\t\t\t\t\t\t\$(divID).html(data);\n\t\t\t\t\t\t\$(divID).fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfunction cancelEdit(squadID, newsID) {\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\tdivID = \"#newsDiv_\"+newsID;\n\t\t\t\t\t\$(divID).html(\"<p align='center'><img src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/loading-spiral.gif'><br>Loading</p>\");\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/squads/include/editshoutpost.php', { sID: squadID, nID: newsID, cancel: 1 }, function(data) {\n\t\t\t\t\t\t\$(divID).hide();\n\t\t\t\t\t\t\$(divID).html(data);\n\t\t\t\t\t\t\$(divID).fadeIn(250);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfunction deleteNews(squadID, newsID) {\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\t\t\t\t\n\t\t\t\n\t\t\t\t\$.post('" . $MAIN_ROOT . "members/squads/include/deleteshoutpost.php', { sID: squadID, nID: newsID }, function(data) {\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\$('#deleteMessage').dialog({\n\t\t\t\t\n\t\t\t\t\t\ttitle: 'Manage Squad Shoutbox - Delete Post',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\tresizable: false,\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\t\t\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#contentDiv').hide();\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/squads/include/deleteshoutpost.php', { sID: squadID, nID: newsID, confirm: 1 }, function(data1) {\n\t\t\t\t\t\t\t\t\t\$('#contentDiv').html(data1);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#contentDiv').fadeIn(400);\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},\n\t\t\t\t\t\t\t'Cancel': function() {\n\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}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\$('#deleteMessage').html(data);\n\t\t\t\t\n\t\t\t\t});\n\n\t\t\t});\t\t\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t</script>\n\t";
} elseif ($_GET['nID'] != "" && $squadNewsObj->select($_GET['nID'])) {
    echo "\n\t\n\t<script type='text/javascript'>\n\t\$(document).ready(function() {\n\t\$('#breadCrumbTitle').html(\"Manage Shoutbox\");\n\t\$('#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> > <a href='" . $MAIN_ROOT . "members/squads/managesquad.php?sID=" . $_GET['sID'] . "&pID=ManageShoutbox'><b>" . $squadInfo['name'] . ":</b> Manage Shoutbox</a> > Edit Post\");\n\t});\n\t</script>\n\t";
    if ($_POST['submit']) {
        // Check Message
        if (trim($_POST['message']) == "") {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You may not make a blank shoutbox post.<br>";
        }
        if ($countErrors == 0) {
            $time = time();
            $arrColumns = array("newspost", "lasteditmember_id", "lasteditdate");
            $arrValues = array($_POST['message'], $memberInfo['member_id'], $time);
            if ($squadNewsObj->update($arrColumns, $arrValues)) {
                echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t<p align='center'>\n\t\t\t\tSuccessfully Edited Shoutbox Post!\n\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\tpopupDialog('Manage Squad Shoutbox', '" . $MAIN_ROOT . "squads/profile.php?sID=" . $_GET['sID'] . "', 'successBox');\n\t\t\t\t</script>\n\t\t\n\t\t\t\t";
            } else {
                $countErrors++;
Example #27
0
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
// Config File
$prevFolder = "../";
include $prevFolder . "_setup.php";
$diplomacyObj = new Basic($mysqli, "diplomacy", "diplomacy_id");
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) {
Example #28
0
$checkAccess2 = $member->hasAccess($consoleObj);
$checkAccess = $checkAccess1 || $checkAccess2;
if ($member->authorizeLogin($_SESSION['btPassword'])) {
    $memberInfo = $member->get_info_filtered();
    if ($checkAccess) {
        if (isset($_SESSION['btStatCache'][$_POST['sID']])) {
            $countErrors = 0;
            if ($_SESSION['btStatCache'][$_POST['sID']]['statType'] == "input") {
                foreach ($_SESSION['btStatCache'] as $statInfo) {
                    if ($statInfo['statType'] == "calculate" and ($statInfo['firstStat'] == $_POST['sID'] or $statInfo['secondStat'] == $_POST['sID'])) {
                        $countErrors++;
                    }
                }
            }
            if ($countErrors == 0) {
                if ($gameStatsObj->select($_SESSION['btStatCache'][$_POST['sID']]['gamestatsID'])) {
                    $gameStatsObj->delete();
                }
                unset($_SESSION['btStatCache'][$_POST['sID']]);
                $x = 0;
                $tempArray = array();
                foreach ($_SESSION['btStatCache'] as $statInfo) {
                    $tempArray[$x] = $statInfo;
                    $x++;
                }
                $_SESSION['btStatCache'] = $tempArray;
            } else {
                echo "\n\t\t\t\t\t<div id='errorPopup' style='display: none'><p align='center'>There is currently an auto-calculated stat using <b>" . filterText($_SESSION['btStatCache'][$_POST['sID']]['statName']) . "</b>.  Please delete all auto-calculated stats that are using <b>" . filterText($_SESSION['btStatCache'][$_POST['sID']]['statName']) . "</b> to continue.</p></div>\n\t\t\t\t\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#errorPopup').dialog({\n\t\t\t\t\t\t\t\ttitle: 'Add Game Statistics - Error',\n\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\twidth: 425,\n\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\t\t\$(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\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\$('.ui-dialog :button').blur();\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
            }
            echo "\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\$('#statList').hide();\n\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/statcache/view.php', { }, function(data) {\n\t\t\t\t\t\t\$('#statList').html(data);\n\t\t\t\t\t\t\$('#statList').fadeOut(400);\n\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\$('#statList').fadeIn(400);\n\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t";
        }
Example #29
0
// 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();
        if ($squadAppInfo['squad_id'] == $_POST['sID'] && $squadAppInfo['status'] == 0 && count($squadRankList) > 1) {
            if ($_POST['action'] == "accept") {
                $squadRankKey = count($squadRankList) - 1;
                $newMemberSquadRank = $squadRankList[$squadRankKey];
                $squadAppObj->update(array("dateaction", "status", "squadmember_id"), array(time(), "1", $memberInfo['member_id']));
                $arrColumns = array("squad_id", "member_id", "squadrank_id", "datejoined");
                $arrValues = array($squadAppInfo['squad_id'], $squadAppInfo['member_id'], $newMemberSquadRank, time());
                $squadObj->objSquadMember->addNew($arrColumns, $arrValues);
                $intViewSquadsCID = $consoleObj->findConsoleIDByName("View Your Squads");
                $member->select($squadAppInfo['member_id']);
                $member->postNotification("Congratulations!  Your application for the squad <b>" . $squadInfo['name'] . "</b> has been approved.  View the Squads section of <a href='" . $MAIN_ROOT . "members'>My Account</a> to <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intViewSquadsCID . "'>View Your Squads</a>.");
                $mysqli->query("DELETE FROM " . $dbprefix . "squadinvites WHERE receiver_id = '" . $squadAppInfo['member_id'] . "'");
Example #30
0
$cID = $consoleObj->findConsoleIDByName("View Your Squads");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$squadObj = new Squad($mysqli);
$arrSquadPrivileges = $squadObj->arrSquadPrivileges;
$pID = "manageshoutbox";
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $LOGIN_FAIL = false;
    $memberInfo = $member->get_info_filtered();
    $squadNewsObj = new Basic($mysqli, "squadnews", "squadnews_id");
    if ($squadObj->select($_POST['sID']) && $squadObj->memberHasAccess($memberInfo['member_id'], "manageshoutbox") && $squadNewsObj->select($_POST['nID'])) {
        if ($_POST['submit']) {
            // Check Message
            if (trim($_POST['message']) == "") {
                $countErrors++;
                $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You may not make a blank shoutbox post.<br>";
            }
            if ($countErrors == 0) {
                $time = time();
                $arrColumns = array("newspost", "lasteditmember_id", "lasteditdate");
                $arrValues = array($_POST['message'], $memberInfo['member_id'], $time);
                if ($squadNewsObj->update($arrColumns, $arrValues)) {
                    $_POST['cancel'] = true;
                } else {
                    $countErrors++;
                    $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";