Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 */
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;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $newsObj->addNew(array("member_id", "newstype", "newspost", "dateposted", "postsubject"), array($member->get_info("member_id"), 3, $_POST['message'], time(), "Shoutbox Post"));
    $mangeNewsCID = $consoleObj->findConsoleIDByName("Manage News");
    $consoleObj->select($manageNewsCID);
    $shoutboxObj = new Shoutbox($mysqli, "news", "news_id");
    $shoutboxObj->strDivID = filterText($_POST['updateDiv']);
    $shoutboxObj->intDispWidth = 140;
    $shoutboxObj->intDispHeight = 300;
    $shoutboxObj->blnUpdateShoutbox = true;
    if ($member->hasAccess($consoleObj)) {
        $shoutboxObj->strEditLink = $MAIN_ROOT . "members/console.php?cID=" . $manageNewsCID . "&newsID=";
        $shoutboxObj->strDeleteLink = $MAIN_ROOT . "members/include/news/include/deleteshoutpost.php";
    }
    echo $shoutboxObj->dispShoutbox();
}
Ejemplo n.º 3
0
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include "../../../_setup.php";
include_once "../../../classes/member.php";
include_once "../../../classes/rank.php";
include_once "../../../classes/consoleoption.php";
include_once "../../../classes/event.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$objMember = new Member($mysqli);
$eventObj = new Event($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage My Events");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword']) && $eventObj->select($_POST['eID'])) {
    $memberInfo = $member->get_info();
    $eventInfo = $eventObj->get_info_filtered();
    if ($eventInfo['member_id'] == $memberInfo['member_id']) {
        if ($_POST['confirmDelete'] == 1) {
            $eventObj->delete();
        } else {
            echo "\n\t\t\t\n\t\t\t\t<div id='confirmDeleteMessage' style='display: none'>\n\t\t\t\t\n\t\t\t\t\t<p class='main' align='center'>Are you sure you want to delete the event, <b>" . $eventInfo['title'] . "</b>?</p>\n\t\t\t\t\n\t\t\t\t</div>\t\t\t\n\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#confirmDeleteMessage').dialog({\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle: 'Delete Event',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\n\t\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\t\$.post('" . $MAIN_ROOT . "members/events/include/deleteevent.php', { confirmDelete: 1, eID: '" . $eventInfo['event_id'] . "' }, function(data) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'\n\t\t\t\t\t\t\t\t\t\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'Cancel': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\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\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</script>\n\t\t\t\t\n\t\t\t\t\n\t\t\t";
        }
    }
}
Ejemplo n.º 4
0
 $p = new paypal_class();
 $member = new Member($mysqli);
 $campaignInfo = $campaignObj->get_info_filtered();
 $p->setMode($donationPlugin->getConfigInfo("mode"));
 $link = $p->paypal_url . "?cmd=_donations";
 $_POST['business'] = $donationPlugin->getConfigInfo("email");
 $_POST['item_name'] = "Donation for " . $campaignInfo['title'];
 $_POST['notify_url'] = $notifyURL;
 $_POST['rm'] = 1;
 $_POST['return'] = FULL_SITE_URL . "plugins/donations/?campaign_id=" . $_GET['campaign_id'] . "&p=thankyou";
 if ($campaignInfo['currency'] != "") {
     $_POST['currency_code'] = $campaignInfo['currency'];
 }
 // Check For Custom Variables
 if (isset($_SESSION['btUsername']) && isset($_SESSION['btPassword']) && $member->select($_SESSION['btUsername']) && $member->authorizeLogin($_SESSION['btPassword'])) {
     $customVars['member_id'] = $member->get_info("member_id");
 }
 $customVars['campaign_id'] = $_GET['campaign_id'];
 $addToLink = "";
 $customVals = array("name", "message", "hideamount");
 $filterFormInputs = array("submit", "checkCSRF");
 if ($campaignInfo['minimumamount'] > 0 && $_POST['amount'] >= $campaignInfo['minimumamount'] || $campaignInfo['minimumamount'] <= 0) {
     foreach ($_POST as $key => $value) {
         if (in_array($key, $customVals)) {
             $customVars[$key] = $value;
         } elseif (!in_array($key, $filterFormInputs)) {
             $addToLink .= "&" . $key . "=" . $value;
         }
     }
     $jsonCustomVars = json_encode($customVars);
     $link .= "&custom=" . $jsonCustomVars . $addToLink;
Ejemplo n.º 5
0
 *
 */
include_once "../../../_setup.php";
include_once "../../../classes/member.php";
include_once "../../../classes/rank.php";
include_once "../../../classes/tournament.php";
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Tournaments");
$consoleObj->select($cID);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$tournamentObj = new Tournament($mysqli);
$tID = $_POST['tID'];
$arrMembers = array();
if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->select($tID) && $member->hasAccess($consoleObj)) {
    $memberInfo = $member->get_info();
    $tmemberID = $tournamentObj->get_info("member_id");
    $tournamentInfo = $tournamentObj->get_info_filtered();
    if ($memberInfo['member_id'] == $tmemberID || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) {
        $arrPlayers = $tournamentObj->getPlayers();
        $playerList = urlencode($_POST['players']);
        $arrNewPlayers = explode("%0A", $playerList);
        $maxPlayers = $tournamentInfo['playersperteam'] * $tournamentInfo['maxteams'];
        if (count($arrNewPlayers) + count($arrPlayers) <= $maxPlayers) {
            foreach ($arrNewPlayers as $newPlayer) {
                $newPlayer = urldecode($newPlayer);
                $arrPlayers = $tournamentObj->getPlayers();
                if ($member->select($newPlayer)) {
                    $newPlayerID = $member->get_info("member_id");
                    if (!in_array($newPlayerID, $arrPlayers)) {
                        // Prevent multiple entries of same person
Ejemplo n.º 6
0
    $dispHTTP = "http://";
} else {
    $dispHTTP = "https://";
}
if ((!isset($_COOKIE['btUsername']) || !isset($_COOKIE['btPassword'])) && isset($_SESSION['btRememberMe']) && $_SESSION['btRememberMe'] == 1 && isset($_SESSION['btUsername']) && isset($_SESSION['btPassword'])) {
    $cookieExpTime = time() + 60 * 60 * 24 * 3;
    setcookie("btUsername", $_SESSION['btUsername'], $cookieExpTime, $MAIN_ROOT);
    setcookie("btPassword", $_SESSION['btPassword'], $cookieExpTime, $MAIN_ROOT);
}
$menuXML = new SimpleXMLElement(BASE_DIRECTORY . "themes/" . $THEME . "/themeinfo.xml", NULL, true);
if (isset($_SESSION['btUsername']) && isset($_SESSION['btPassword'])) {
    $memberObj = new Member($mysqli);
    if ($memberObj->select($_SESSION['btUsername'])) {
        if ($memberObj->authorizeLogin($_SESSION['btPassword'])) {
            define("LOGGED_IN", true);
            $memberInfo = $memberObj->get_info();
            $memberUsername = $memberInfo['username'];
            $memberID = $memberInfo['member_id'];
            if ($memberInfo['loggedin'] == 0) {
                $memberObj->update(array("loggedin"), array(1));
            }
            $actualPageNameLoc = strrpos($PAGE_NAME, " - ");
            $actualPageName = substr($PAGE_NAME, 0, $actualPageNameLoc);
            if ($PAGE_NAME == "") {
                $actualPageName = "Home Page";
            }
            $lastSeenLink = "<a href='" . $dispHTTP . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . "'>" . $actualPageName . "</a>";
            $arrUpdateColLastSeen = array("lastseen", "lastseenlink");
            $arrUpdateValLastSeen = array(time(), $lastSeenLink);
            if (time() - $memberInfo['lastlogin'] > 3600) {
                $arrUpdateColLastSeen[] = "lastlogin";
Ejemplo n.º 7
0
    $dispRankImg = "\n\t\t<div id='profilePageRankPic' class='main' style='margin-left: auto; margin-right: auto; text-align: center; margin-top: 5px; width: 150px; padding: 0px'>\n\t\t\t<img src='" . $rankInfo['imageurl'] . "' width='" . $rankInfo['imagewidth'] . "' height='" . $rankInfo['imageheight'] . "'>\n\t\t</div>\n\t";
}
$dispBirthday = "";
if ($memberInfo['birthday'] != 0) {
    $bdayDate = new DateTime();
    $bdayDate->setTimestamp($memberInfo['birthday']);
    $bdayDate->setTimezone(new DateTimeZone("UTC"));
    $formatBirthday = $bdayDate->format("M j, Y");
    $calcAge = floor((time() - $memberInfo['birthday']) / 31536000);
    $dispBirthday = "<br><br>\n\t<b>Birthday:</b><br>\n\t" . $formatBirthday . "<br><br>\n\t<b>Age:</b> " . $calcAge;
}
if ($memberInfo['lastseenlink'] == "") {
    $dispLastSeenLink = "No Where";
} else {
    $member->select($memberInfo['member_id']);
    $dispLastSeenLink = $member->get_info("lastseenlink");
}
$dispInactive = "";
if ($memberInfo['onia'] == 1) {
    $dispInactive = "<div style='display: inline-block; vertical-align: middle' class='failedFont tinyFont'>&nbsp;&nbsp;&nbsp;INACTIVE</div>";
}
$breadcrumbObj->setTitle("<div style='display: inline-block'>" . $memberInfo['username'] . "'s Profile</div><div id='profilePageOnlineStatus' style='display: inline-block; margin-left: 8px; vertical-align: middle'>" . $dispOnlineStatus . "</div>" . $dispInactive);
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Members", $MAIN_ROOT . "members.php");
$breadcrumbObj->addCrumb($memberInfo['username'] . "'s Profile");
include $prevFolder . "include/breadcrumb.php";
?>

<div style='position: relative; margin-left: auto; margin-right: auto; width: 95%; margin-top: 15px'>
	<div class='main userProfileLeft'>
	
Ejemplo n.º 8
0
        $arrLogColumns = array("member_id", "logdate", "message");
        $arrLogValues = array($row['member_id'], $time, "Disabled due to inactivity.");
        $logObj->addNew($arrLogColumns, $arrLogValues);
    }
}
// Disable members who fail to be promoted for auto-disable ranks
$arrRanks = array();
$result = $mysqli->query("SELECT rank_id FROM " . $dbprefix . "ranks WHERE autodisable != '0'");
while ($row = $result->fetch_assoc()) {
    $arrRanks[] = $row['rank_id'];
}
$sqlRanks = "('" . implode("','", $arrRanks) . "')";
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "members WHERE rank_id IN " . $sqlRanks . " AND onia = '0'");
while ($row = $result->fetch_assoc()) {
    $member->select($row['member_id']);
    $memberListInfo = $member->get_info();
    $rankObj->select($row['rank_id']);
    $memRankListInfo = $rankObj->get_info();
    if (floor(time() / 86400) - floor($memberListInfo['datejoined'] / 86400) >= $memRankListInfo['autodisable']) {
        $member->update(array("disabled", "disableddate"), array(1, $time));
        $member->logAction("Disabled for failure to be promoted before " . $memRankListInfo['autodisable'] . " days.");
    }
}
$rankCatObj = new RankCategory($mysqli);
$gameObj = new Game($mysqli);
$breadcrumbObj->setTitle("Members");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Members");
include $prevFolder . "include/breadcrumb.php";
?>
<div id='tiltPhoneImg' style='display: none'><img src='<?php 
Ejemplo n.º 9
0
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']");
    $arrOptions = array();
    $x = 0;
    $countTotalVotes = 0;
    foreach ($pollObj->getPollResults() as $pollOptionID => $votes) {
Ejemplo n.º 10
0
if (count($arrAttachments) > 0 && $blnShowAttachments) {
    echo "\n\t\t\t\t<div class='forumAttachmentsContainer'>\n\t\t\t\t\t<b>Attachments:</b><br>\n\t\t\t\t\t";
    foreach ($arrAttachments as $downloadID) {
        $attachmentObj->select($downloadID);
        $attachmentInfo = $attachmentObj->get_info_filtered();
        $addS = $attachmentInfo['downloadcount'] != 1 ? "s" : "";
        $dispFileSize = $attachmentInfo['filesize'] / 1024;
        if ($dispFileSize < 1) {
            $dispFileSize = $attachmentInfo['filesize'] . "B";
        } elseif ($dispFileSize / 1024 < 1) {
            $dispFileSize = round($dispFileSize, 2) . "KB";
        } else {
            $dispFileSize = round($dispFileSize / 1024, 2) . "MB";
        }
        echo "<a href='" . $MAIN_ROOT . "downloads/file.php?dID=" . $downloadID . "'>" . $attachmentInfo['filename'] . "</a> - downloaded " . $attachmentInfo['downloadcount'] . " time" . $addS . " - " . $dispFileSize . "<br>";
    }
    echo "\n\t\t\t\t\t</div>\n\t\t\t\t\t";
}
if ($postMemberInfo['forumsignature'] != "" && $websiteInfo['forum_hidesignatures'] == 0) {
    echo "\n\t\t\t\t<div class='forumSignatureContainer'>" . parseBBCode($posterMemberObj->get_info("forumsignature")) . "</div>\n\t\t\t";
}
echo "<div class='forumManageLinks'>";
if ($this->blnManageable || $postMemberInfo['member_id'] == $memberInfo['member_id']) {
    echo "&raquo; <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intManagePostsCID . "&pID=" . $postInfo['forumpost_id'] . "'>EDIT POST</a> &laquo;&nbsp&nbsp;&nbsp;";
    echo "&raquo; <a href='javascript:void(0)' onclick=\"deletePost('" . $postInfo['forumpost_id'] . "')\">DELETE POST</a> &laquo;&nbsp&nbsp;&nbsp;";
    $countManagablePosts++;
}
if (LOGGED_IN && $topicInfo['lockstatus'] == 0) {
    echo "&raquo; <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $intPostTopicCID . "&bID=" . $topicInfo['forumboard_id'] . "&tID=" . $topicInfo['forumtopic_id'] . "&quote=" . $postInfo['forumpost_id'] . "'>QUOTE</a> &laquo;";
}
echo "\n\t\t\t</div>\n\t\t\t</div>\n\t\t</div>";
Ejemplo n.º 11
0
} elseif ($stage == "send" && $countErrors == 0) {
    if (isset($_POST['validator'])) {
        if ($_POST['validator'] != '20473833234') {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Validator Entry Not Correct. Most likely due to an invalid form submission.<br>";
        }
    } else {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Validator Entry Not Existant. Most likely due to an invalid form submission.<br>";
    }
    $username = $_POST['username'];
    $email = $_POST['email'];
    $changekey = sha1(rand(-100000, 100000) . rand(-100000, 100000) . $username);
    $time = time();
    if ($memberObj->select($username)) {
        if ($memberObj->get_info("email") == $email) {
            $emailvalid = true;
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Email Address Not Valid.<br>";
        }
    } else {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Username Not Valid.<br>";
    }
    if ($countErrors == 0) {
        $arrayCol = array('username', 'email', 'changekey', 'timeofrq');
        $arrayVal = array($username, $email, $changekey, $time);
        $forgotPassObj->addNew($arrayCol, $arrayVal);
        $subject = 'Your Forgotten Password Request - ' . $CLAN_NAME;
        $message = "\n<html>\n<body>\nHello,<br>\nYou've requested a change in your password on the clan website.<br>\n<br>\nPlease click the following link to continue and follow the instructions on the page it opens:<br>\n--------------------------------------------<br>\n<a href='{$url}?stage=validate&changekey={$changekey}'>{$url}?stage=validate&changekey={$changekey}</a><br>\n<br>\nThanks!\n";
Ejemplo n.º 12
0
     if ($_POST['adminpassword'] != $_POST['adminpassword_repeat']) {
         $countErrors++;
         $dispError .= "&nbsp;&nbsp;<b>&middot;</b> Your passwords did not match.<br>";
     }
     if (strlen(trim($_POST['adminpassword'])) < 6) {
         $countErrors++;
         $dispError .= "&nbsp;&nbsp;<b>&middot;</b> The admin password must be at least 6 characters long.<br>";
     }
 } else {
     // Updating
     $member = new Member($mysqli);
     $member->select($_POST['adminusername']);
     if (!$member->authorizeLogin($_POST['adminpassword'], 1)) {
         $countErrors++;
         $dispError .= "&nbsp;&nbsp;<b>&middot;</b> The admin username/password combination was incorrect.<br>";
     } elseif ($member->authorizeLogin($_POST['adminpassword'], 1) && $member->get_info("rank_id") != 1) {
         $countErrors++;
         $dispError .= "&nbsp;&nbsp;<b>&middot;</b> You entered incorrect admin login information.<br>";
     }
 }
 // Check Admin Key
 if (strlen(trim($_POST['adminkey'])) < 3) {
     $countErrors++;
     $dispError .= "&nbsp;&nbsp;<b>&middot;</b> The admin key must be at least 3 characters long.<br>";
 }
 if ($_POST['adminkey'] != $_POST['adminkey_repeat']) {
     $countErrors++;
     $dispError .= "&nbsp;&nbsp;<b>&middot;</b> Your admin keys did not match.<br>";
 }
 if ($countErrors == 0) {
     echo "\n\t\t\t\t\t<table class='mainTable'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class='tdTitle'>\n\t\t\t\t\t\t\t\tInstalling Bluethrust Clan Scripts v4\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\tCreating Config File...<br><br>\n\t\t\t\t";
Ejemplo n.º 13
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";
$prevFolder = "../../";
include "youtube.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$ytObj = new Youtube($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $ytObj->hasYoutube($member->get_info("member_id"))) {
    $ytObj->delete();
    echo "\n\t\t\n\t\t<div class='shadedBox' style='width: 50%; margin-left: auto; margin-right: auto'>\n\t\t\n\t\t\t<p align='center' class='main' style='padding: 20px'>\n\t\t\t\tSuccessfully disconnected your Youtube account!<br><br>\n\t\t\t\t<a href='" . $MAIN_ROOT . "members'>Return to My Account</a>\n\t\t\t</p>\n\t\t\n\t\t</div>\n\t\n\t";
}
Ejemplo n.º 14
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/tournament.php";
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Tournaments");
$consoleObj->select($cID);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$tournamentObj = new Tournament($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $tournamentObj->objTeam->select($_POST['teamID']) && $member->hasAccess($consoleObj)) {
    $memberInfo = $member->get_info();
    $teamInfo = $tournamentObj->objTeam->get_info_filtered();
    $tournamentObj->select($teamInfo['tournament_id']);
    $tournamentInfo = $tournamentObj->get_info_filtered();
    $tmemberID = $tournamentInfo['member_id'];
    if ($memberInfo['member_id'] == $tmemberID || $memberInfo['rank_id'] == "1" || $tournamentObj->isManager($memberInfo['member_id'])) {
        $arrAllPlayers = $tournamentObj->getPlayers();
        $playerList = urlencode($_POST['players']);
        $arrNewPlayers = explode("%0A", $playerList);
        $arrTeamPlayers = $tournamentObj->getTeamPlayers($_POST['teamID']);
        $teamPlayerCount = count($arrTeamPlayers);
        $blnErrorDuplicatePlayer = false;
        $blnErrorFullTeam = false;
        foreach ($arrNewPlayers as $newPlayer) {
            $newPlayer = urldecode($newPlayer);
            if ($teamPlayerCount < $tournamentInfo['playersperteam']) {
Ejemplo n.º 15
0
    $rankInfo['promotepower'] = 0;
}
if ($memberInfo['rank_id'] == 1) {
    $highestOrderNum = $rankObj->getHighestOrderNum();
    $rankObj->selectByOrder($highestOrderNum);
    $powerRankInfo = $rankObj->get_info();
} else {
    $rankObj->select($rankInfo['promotepower']);
    $powerRankInfo = $rankObj->get_info();
}
if ($_POST['submit']) {
    if (!$memberObj->select($_POST['member'])) {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid member.<br>";
    } elseif ($memberObj->select($_POST['member'])) {
        $tempMemInfo = $memberObj->get_info();
        $rankObj->select($tempMemInfo['rank_id']);
        $tempRankInfo = $rankObj->get_info();
        if ($powerRankInfo['ordernum'] < $tempRankInfo['ordernum']) {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You may not change the selected member's recruit date.<br>";
        }
    }
    $recruitDate = $_POST['newrecruitdate'] / 1000;
    if ($recruitDate > time()) {
        $countErrors++;
        $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid date.<br>";
    }
    if ($countErrors == 0) {
        $arrColumn = array("datejoined");
        $arrValue = array($recruitDate);
Ejemplo n.º 16
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";
$prevFolder = "../../";
include "facebook.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$fbObj = new Facebook($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $fbObj->hasFacebook($member->get_info("member_id"))) {
    $fbObj->accessToken = $fbObj->get_info_filtered("access_token");
    $fbObj->getFBInfo();
    $fbObj->delete();
    echo "\n\t\t\n\t\t<div class='shadedBox' style='width: 50%; margin-left: auto; margin-right: auto'>\n\t\t\n\t\t\t<p align='center' class='main' style='padding: 20px'>\n\t\t\t\tSuccessfully disconnected your Facebook account!<br><br>\n\t\t\t\t<a href='" . $MAIN_ROOT . "members'>Return to My Account</a>\n\t\t\t</p>\n\t\t\n\t\t</div>\n\t\n\t";
}
Ejemplo n.º 17
0
 public function displayNewMembers($amountToShow = 5)
 {
     $member = new Member($this->MySQL);
     $rank = new Rank($this->MySQL);
     if (file_exists(BASE_DIRECTORY . "themes/" . $this->dir . "/menus/newmembers.php")) {
         if (!defined("NEWMEMBERS_MENUITEM")) {
             define("NEWMEMBERS_MENUITEM", true);
         }
         include BASE_DIRECTORY . "themes/" . $this->dir . "/menus/newmembers.php";
     } else {
         echo "\n\t\t\t\t\t<div class='menusNewestMembersWrapper'>\n\t\t\t\t";
         $altColorSwitch = 0;
         $result = $this->MySQL->query("SELECT member_id FROM " . $this->MySQL->get_tablePrefix() . "members WHERE rank_id != '1' ORDER BY datejoined DESC LIMIT " . $amountToShow);
         while ($row = $result->fetch_assoc()) {
             $member->select($row['member_id']);
             $rank->select($member->get_info("rank_id"));
             if ($altColorSwitch == 1) {
                 $addCSS = "";
                 $altColorSwitch = 0;
             } else {
                 $addCSS = " alternateBGColor";
                 $altColorSwitch = 1;
             }
             echo "\n\t\t\t\t\t\t<div class='menusNewestMembersItemWrapper dottedLine " . $addCSS . "'>\n\t\t\t\t\t\t\t<div class='menusNewestMembersAvatarDiv'>\n\t\t\t\t\t\t\t\t" . $member->getProfilePic() . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='menusNewestMembersTextWrapper'>\n\t\t\t\t\t\t\t\t<div class='menusNewestMembersName'>\n\t\t\t\t\t\t\t\t\t" . $member->getMemberLink() . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='menusNewestMembersRank'>\n\t\t\t\t\t\t\t\t\t" . $rank->get_info_filtered("name") . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style='clear: both'></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t";
         }
         echo "\n\t\t\t\t\t</div>\n\t\t\t\t";
     }
 }
Ejemplo n.º 18
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/squad.php";
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("View Your Squads");
$consoleObj->select($cID);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$pID = "manageranks";
$squadObj = new Squad($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $squadObj->select($_POST['sID']) && $squadObj->memberHasAccess($member->get_info("member_id"), $pID)) {
    $squadInfo = $squadObj->get_info_filtered();
    $memberInfo = $member->get_info_filtered();
    if ($squadObj->objSquadRank->select($_POST['rID'])) {
        $squadRankInfo = $squadObj->objSquadRank->get_info();
        $addTo = 1;
        if ($_POST['rDir'] == "up") {
            $addTo = -1;
        }
        if ($squadRankInfo['sortnum'] != 1 && $squadRankInfo['sortnum'] + $addTo != 1) {
            $newSortNum = $squadRankInfo['sortnum'] + $addTo;
            $result = $mysqli->query("SELECT * FROM " . $dbprefix . "squadranks WHERE squad_id = '" . $squadRankInfo['squad_id'] . "' AND sortnum = '" . $newSortNum . "'");
            $row = $result->fetch_assoc();
            $newSortNumRankID = $row['squadrank_id'];
            $arrColumns = array("sortnum");
            $arrValues = array($newSortNum);
Ejemplo n.º 19
0
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
$disableMemberCID = $consoleObj->findConsoleIDByName("Disable a Member");
$cID = $_GET['cID'];
$dispError = "";
$countErrors = 0;
if ($_POST['submit']) {
    $delMemberObj = new Member($mysqli);
    if (!$delMemberObj->select($_POST['deletemember']) || !is_numeric($_POST['deletemember'])) {
        $dispError = "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid member.<br>";
        $countErrors++;
    } else {
        // Check if member is disabled
        if ($delMemberObj->get_info("disabled") != 1) {
            $dispError = "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You may only delete members who are currently disabled.<br>";
            $countErrors++;
        }
    }
    if ($countErrors == 0) {
        $delMemberUsername = $delMemberObj->get_info_filtered("username");
        if ($delMemberObj->delete()) {
            echo "\n\t\t\t\n\t\t\t\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 deleted " . $delMemberUsername . " from the website!\n\t\t\t\t\t</p>\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\tpopupDialog('Delete Member', '" . $MAIN_ROOT . "members', 'successBox');\n\t\t\t\t</script>\n\t\t\t\n\t\t\t\n\t\t\t";
            $member->logAction("Deleted " . $delMemberUsername . " from the website.");
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to delete member from the database.  Please contact the website administrator.<br>";
        }
    }
    if ($countErrors > 0) {
Ejemplo n.º 20
0
 if (!$_POST['submit']) {
     $pmSessionID = uniqid();
     $composeListJS = "";
     $_SESSION['btComposeList'][$pmSessionID]['member'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['rankcategory'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['rank'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['squad'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['tournament'] = array();
     $_SESSION['btComposeList'][$pmSessionID]['exptime'] = time() + 3600;
     if (isset($_GET['threadID']) && $pmObj->select($_GET['threadID']) && isset($_GET['replyID']) && $pmObj->select($_GET['replyID'])) {
         $replyPMInfo = $pmObj->get_info();
         $arrReceivers = $pmObj->getAssociateIDs();
         $_POST['subject'] = "RE: " . filterText($replyPMInfo['subject']);
         if ($replyPMInfo['receiver_id'] != 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || $replyPMInfo['receiver_id'] == $memberInfo['member_id'])) {
             $member->select($replyPMInfo['sender_id']);
             $member->objRank->select($member->get_info("rank_id"));
             $_SESSION['btComposeList'][$pmSessionID]['member'][] = $replyPMInfo['sender_id'];
             $composeListJS = "\n\t\t\t\t\n\t\t\t\t\$('#composeTextBox').before(\"<div class='pmComposeSelection' data-composeid = 'member_" . $replyPMInfo['sender_id'] . "'><div style='float: left'>" . $member->objRank->get_info_filtered("name") . " " . $member->get_info_filtered("username") . "</div><div class='pmComposeSelectionDelete' data-deleteid = 'member_" . $replyPMInfo['sender_id'] . "'>&times;</div></div>\");\n\t\t\t\t\n\t\t\t\t";
         } elseif ($replyPMInfo['receiver_id'] == 0 && ($replyPMInfo['sender_id'] == $memberInfo['member_id'] || in_array($memberInfo['member_id'], $arrReceivers))) {
             if (isset($_GET['replyall'])) {
                 $pmObj->set_assocTableKey("pmmember_id");
                 $arrPMMID = $pmObj->getAssociateIDs();
                 $arrGroups['list'] = array();
                 $arrGroups['rank'] = array();
                 $arrGroups['squad'] = array();
                 $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']])) {
Ejemplo n.º 21
0
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);
$arrReturn = array("result" => "fail");
$pollOptionSelector = "poll_" . $_POST['pollID'];
if ($pollObj->select($_POST['pollID'])) {
    $pollInfo = $pollObj->get_info_filtered();
    $pollObj->objAccess->arrAccessFor = array("keyName" => "poll_id", "keyValue" => $pollInfo['poll_id']);
    $blnVote = false;
    $member->select($_SESSION['btUsername']);
    $memberID = "";
    if ($pollInfo['accesstype'] == "members" && $member->authorizeLogin($_SESSION['btPassword'])) {
        $memberID = $member->get_info("member_id");
        $blnVote = true;
    } elseif ($pollInfo['accesstype'] == "memberslimited" && $member->authorizeLogin($_SESSION['btPassword']) && $pollObj->hasAccess($member)) {
        $memberID = $member->get_info("member_id");
        $blnVote = true;
    } elseif ($pollInfo['accesstype'] == "public") {
        $memberID = $member->authorizeLogin($_SESSION['btPassword']) ? $member->get_info("member_id") : "";
        $blnVote = true;
    }
    if ($blnVote) {
        foreach (json_decode($_POST['pollOptionID'], true) as $pollOptionID) {
            $pollObj->objPollOption->select($pollOptionID);
            $pollOptionInfo = $pollObj->objPollOption->get_info_filtered();
            $arrReturn = $pollObj->vote($memberID, $pollOptionInfo);
        }
    } else {
Ejemplo n.º 22
0
?>
'>Home</a> > Inactive Members
</div>

<table class='formTable'>
	<tr>
		<td class='formTitle'>Rank:</td>
		<td class='formTitle'>Username:</td>
		<td class='formTitle'>Main Game:</td>
		<td class='formTitle'>Inactive Since:</td>
	</tr>
<?php 
$result = $mysqli->query("SELECT " . $dbprefix . "members.member_id, " . $dbprefix . "ranks.ordernum FROM " . $dbprefix . "members, " . $dbprefix . "ranks WHERE " . $dbprefix . "members.rank_id = " . $dbprefix . "ranks.rank_id AND " . $dbprefix . "members.onia = '1' AND " . $dbprefix . "members.disabled = '0' AND " . $dbprefix . "members.rank_id != '1' ORDER BY " . $dbprefix . "ranks.ordernum DESC");
while ($row = $result->fetch_assoc()) {
    $member->select($row['member_id']);
    $rankObj->select($member->get_info("rank_id"));
    $memberListInfo = $member->get_info_filtered();
    $rankListInfo = $rankObj->get_info_filtered();
    $dispMainGame = "Not Set";
    if ($gameObj->select($memberListInfo['maingame_id'])) {
        $gameObj->refreshImageSize();
        $gameInfo = $gameObj->get_info_filtered();
        $dispMainGame = "<img src='" . $gameInfo['imageurl'] . "' width='" . $gameInfo['imagewidth'] . "' height='" . $gameInfo['imageheight'] . "' onmouseover=\"showToolTip('" . $gameInfo['name'] . "')\" onmouseout='hideToolTip()'>";
    }
    echo "\n\t\t\t<tr>\n\t\t\t\t<td class='main' align='center'>\n\t\t\t\t\t<img src='" . $rankListInfo['imageurl'] . "' width='" . $rankListInfo['imagewidth'] . "' height='" . $rankListInfo['imageheight'] . "' onmouseover=\"showToolTip('" . $rankListInfo['name'] . "')\" onmouseout='hideToolTip()'>\n\t\t\t\t</td>\n\t\t\t\t<td class='main'>" . $member->getMemberLink() . "</td>\n\t\t\t\t<td class='main' align='center'>" . $dispMainGame . "</td>\n\t\t\t\t<td class='main' align='center'>" . getPreciseTime($memberListInfo['inactivedate']) . "</td>\n\t\t\t</tr>\n\t\t\n\t\t";
}
?>
</table>

<?php 
if ($result->num_rows > 0) {
Ejemplo n.º 23
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>";
    }
}
Ejemplo n.º 24
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";
$prevFolder = "../../";
include "twitter.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$twitterObj = new Twitter($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $twitterObj->hasTwitter($member->get_info("member_id"))) {
    $twitterObj->delete();
    echo "\n\t\t\n\t\t<div class='shadedBox' style='width: 75%; margin-left: auto; margin-right: auto'>\n\t\t\n\t\t\t<p class='main' style='padding: 20px'>\n\t\t\t\tSuccessfully disconnected your Twitter account!<br><br>\n\t\t\t\tTo complete the process you must go to the <a href='https://twitter.com/settings/applications' target='_blank'>Application Settings</a> page in your Twitter account and click the revoke access button.\n\t\t\t</p>\n\t\t\n\t\t</div>\n\t\n\t";
}
Ejemplo n.º 25
0
$prevFolder = "";
include "_setup.php";
// Classes needed for login.php
include_once "classes/member.php";
// Start Page
include "themes/" . $THEME . "/_header.php";
$breadcrumbObj->setTitle("Log In");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Log In");
if ($_POST['submit']) {
    $login_username = $_POST['user'];
    $login_password = $_POST['pass'];
    $x = "fail";
    $checkMember = new Member($mysqli);
    $checkMember->select($login_username);
    $memberInfo = $checkMember->get_info();
    if ($memberInfo['username'] != "") {
        $checkLogin = $checkMember->authorizeLogin($login_password, 1);
        if ($checkLogin) {
            $_SESSION['btUsername'] = $memberInfo['username'];
            $_SESSION['btPassword'] = $memberInfo['password'];
            $_SESSION['btRememberMe'] = $_POST['rememberme'];
            $memberInfo = $checkMember->get_info();
            $newLastLogin = time();
            $newTimesLoggedIn = $memberInfo['timesloggedin'] + 1;
            $newIP = $_SERVER['REMOTE_ADDR'];
            $checkMember->update(array("lastlogin", "timesloggedin", "ipaddress", "loggedin"), array($newLastLogin, $newTimesLoggedIn, $newIP, 1));
            $checkMember->autoPromote();
            $x = "";
            echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\twindow.location = 'index.php';\n\t\t\t\t</script>\n\t\t\t";
        }