Пример #1
0
function displayDonationMenuModule()
{
    $menuItemInfo = $GLOBALS['menu_item_info'];
    if ($menuItemInfo['itemtype'] != "donation") {
        return false;
    }
    global $mysqli;
    if (!class_exists("DonationCampaign")) {
        include BASE_DIRECTORY . "plugins/donations/classes/campaign.php";
    }
    $campaignObj = new DonationCampaign($mysqli);
    $donationObj = new btPlugin($mysqli);
    if ($campaignObj->select($menuItemInfo['itemtype_id']) && $donationObj->selectByName("Donations")) {
        $progressBarColor = $donationObj->getConfigInfo("goalprogresscolor");
        $progressBarBackColor = $donationObj->getConfigInfo("goalprogressbackcolor");
        $campaignInfo = $campaignObj->get_info_filtered();
        $campaignDesc = $campaignObj->get_info("description");
        $dispCampaignDesc = substr($campaignDesc, 0, 100);
        $dispCampaignDesc = $campaignDesc != $dispCampaignDesc ? $dispCampaignDesc . "..." : $dispCampaignDesc;
        $dispCampaignDesc = nl2br(parseBBCode(filterText($dispCampaignDesc)));
        $daysLeft = "";
        if ($campaignInfo['dateend'] != 0 || $campaignInfo['dateend'] == 0 && $campaignInfo['currentperiod'] != 0) {
            $daysLeft = $campaignObj->getDaysLeft();
        }
        $dispGoal = "";
        if ($campaignInfo['goalamount'] > 0) {
            // Graph
            $goalCompletePercent = round($campaignObj->getTotalDonationAmount() / $campaignInfo['goalamount'] * 100);
            $goalCompletePercent = $goalCompletePercent > 100 ? "100%" : $goalCompletePercent . "%";
            $dispGoal = " of " . $campaignObj->formatAmount($campaignInfo['goalamount'], 2) . " goal";
            $dispProgressBar = "\n\t\t\t\t\t<div class='donationProgressContainer' style='background-color: " . $progressBarBackColor . "'>\n\t\t\t\t\t\t<div style='width: " . $goalCompletePercent . "; background-color: " . $progressBarColor . "'></div>\n\t\t\t\t\t</div>\n\t\t\t\t";
        }
        $donationsInfo = $campaignObj->getDonationInfo();
        $totalDonations = count($donationsInfo);
        $donationsFormatted = $campaignObj->formatAmount($campaignObj->getTotalDonationAmount());
        $currentEndDate = $campaignObj->getCurrentEndDate();
        $dispEndingDate = "";
        if ($currentEndDate != 0) {
            $dispExclaimation = $daysLeft < 3 ? "!" : "";
            $dispEndingDate = "<div class='donateMenuItemStat'><b>" . $campaignObj->getFormattedEndDate() . " left" . $dispExclaimation . "</b></div>";
        }
        echo "\n\t\t\t\n\t\t\t\t<div class='donateMenuItemContainer'>\n\t\t\t\t\t<div class='donateMenuItemTitle'><a href='" . $campaignObj->getLink() . "'>" . $campaignInfo['title'] . "</a></div>\n\t\t\t\t\t<div class='donateMenuItemDesc main'>\n\t\t\t\t\t\t" . $dispCampaignDesc . "\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<p align='center'>\n\t\t\t\t\t\t<a href='" . $campaignObj->getLink() . "'><input type='button' value='Donate!' class='submitButton'></a>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div class='donateMenuItemStatsDiv main'>" . $dispProgressBar . "\n\t\t\t\t\t\t<div class='donateMenuItemStat'><b>" . $donationsFormatted . "</b><br>raised" . $dispGoal . "</div>\n\t\t\t\t\t\t" . $dispEndingDate . "\n\t\t\t\t\t\t<div style='clear: both'></div>\n\t\t\t\t\t</div>\n\t\t\t";
        if (count($donationsInfo) > 0) {
            echo "<p class='donateMenuItemTitle'><b>Latest Donators:</b></p>";
            $campaignObj->showDonatorList(false, 2);
        }
        echo "\n\t\t\t\t</div>\n\t\t\t\n\t\t\t";
    }
}
Пример #2
0
<?php

if (!defined("CAMPAIGN_FORM")) {
    exit;
}
$arrPaypalCurrencyCodes = $campaignObj->getCurrencyCodes();
$arrPaypalCurrencyInfo = $campaignObj->getCurrencyCodeInfo();
$donationPlugin = new btPlugin($mysqli);
$donationPlugin->selectByName("Donations");
$checkRecurringBox = $setRecurringBox == 1 ? 1 : 0;
$campaignJS = "\n\t\n\t\t\$(document).ready(function() {\n\t\t\tvar recurring = " . $checkRecurringBox . ";\n\t\t\n\t\t\t\$('#chkRecurring').click(function() {\n\t\t\t\tif(recurring == 1) {\n\t\t\t\t\t\$('#repeatPeriodAmount').attr('disabled', 'disabled');\n\t\t\t\t\t\$('#repeatPeriodUnit').attr('disabled', 'disabled');\n\t\t\t\t\trecurring = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\$('#repeatPeriodAmount').attr('disabled', false);\n\t\t\t\t\t\$('#repeatPeriodUnit').attr('disabled', false);\n\t\t\t\t\trecurring = 1;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\$('#runUntil').change(function() {\n\t\t\t\n\t\t\t\tif(\$(this).val() == \"choose\") {\n\t\t\t\t\t\$('#jsEndDate').show();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\$('#jsEndDate').hide();\n\t\t\t\t}\n\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t\$('#runUntil').change();\n\t\t});\n\t";
$maxYear = date("Y") + 10;
$maxDate = "new Date(" . $maxYear . ",12,31)";
$i = 0;
$arrComponents = array("mainsection" => array("type" => "section", "options" => array("section_title" => "General Information"), "sortorder" => $i++), "title" => array("type" => "text", "attributes" => array("class" => "textBox bigTextBox formInput"), "sortorder" => $i++, "display_name" => "Title", "db_name" => "title", "validate" => array("NOT_BLANK")), "description" => array("type" => "textarea", "display_name" => "Description", "attributes" => array("class" => "textBox formInput bigTextBox", "rows" => 5), "sortorder" => $i++, "db_name" => "description"), "rununtil" => array("type" => "select", "display_name" => "Run Until", "options" => array("forever" => "Forever", "choose" => "Choose Date"), "attributes" => array("class" => "textBox formInput", "id" => "runUntil"), "sortorder" => $i++), "enddate" => array("type" => "datepicker", "sortorder" => $i++, "attributes" => array("style" => "cursor: pointer; display: none", "id" => "jsEndDate", "class" => "textBox formInput"), "db_name" => "dateend", "before_html" => "<label class='formLabel' style='display: inline-block'></label>\n\t\t\t", "options" => array("changeMonth" => "true", "changeYear" => "true", "dateFormate" => "M d, yy", "minDate" => "new Date(50, 1, 1)", "maxDate" => $maxDate, "yearRange" => "1950:" . $maxYear, "altField" => "realEndDate"), "validate" => array("NUMBER_ONLY"), "value" => 0), "allowname" => array("type" => "checkbox", "display_name" => "Allow Names", "tooltip" => "Check this box to allow donators to leave their name.", "sortorder" => $i++, "value" => 1, "options" => array(1 => ""), "attributes" => array("class" => "formInput"), "db_name" => "allowname"), "allowmessage" => array("type" => "checkbox", "display_name" => "Allow Messages", "tooltip" => "Check this box to allow donators to leave a message.", "sortorder" => $i++, "value" => 1, "options" => array(1 => ""), "attributes" => array("class" => "formInput"), "db_name" => "allowmessage"), "allowhiddenamount" => array("type" => "checkbox", "display_name" => "Allow Hidden Amounts", "tooltip" => "Check this box to allow donators to hide the amount they donated on the donation profile page.  You will still be able to view the amount in the donation logs.", "sortorder" => $i++, "value" => 0, "options" => array(1 => ""), "attributes" => array("class" => "formInput"), "db_name" => "allowhiddenamount"), "goalamount" => array("type" => "text", "attributes" => array("class" => "formInput textBox smallTextBox"), "sortorder" => $i++, "display_name" => "Donation Goal", "db_name" => "goalamount"), "minimumamount" => array("type" => "text", "attributes" => array("class" => "formInput textBox smallTextBox"), "sortorder" => $i++, "display_name" => "Minimum Donation", "value" => "1.00", "db_name" => "minimumamount"), "currency" => array("type" => "select", "attributes" => array("class" => "formInput textBox"), "sortorder" => $i++, "display_name" => "Currency", "db_name" => "currency", "options" => $arrPaypalCurrencyCodes, "value" => $donationPlugin->getConfigInfo("currency")));
// Check for award medal console access
$awardMedalCID = $consoleObj->findConsoleIDByName("Award Medal");
$consoleObj->select($awardMedalCID);
$hasAwardMedalAccess = false;
if ($member->hasAccess($consoleObj)) {
    $hasAwardMedalAccess = true;
    $medalOptions[0] = "None";
    $result = $mysqli->query("SELECT * FROM " . $dbprefix . "medals ORDER BY ordernum DESC");
    while ($row = $result->fetch_assoc()) {
        $medalOptions[$row['medal_id']] = filterText($row['name']);
    }
    $arrComponents['awardmedal'] = array("type" => "select", "display_name" => "Award Medal", "sortorder" => $i++, "tooltip" => "Auto-award a medal to a member who donates.", "attributes" => array("class" => "formInput textBox"), "db_name" => "awardmedal", "options" => $medalOptions);
}
$consoleObj->select($cID);
if (!is_array($arrSelectRecur)) {
    $arrSelectRecur['months'] = "selected";
Пример #3
0
<?php

include "../../_setup.php";
include "classes/donate-paypalclass.php";
include "classes/donation.php";
include "classes/campaign.php";
$donationPlugin = new btPlugin($mysqli);
if ($donationPlugin->selectByName("Donations")) {
    $donationObj = new Donation($mysqli);
    $p = new paypal_class();
    $arrColumns = array("donationcampaign_id", "member_id", "name", "message", "datesent", "amount", "paypalemail", "transaction_id", "response");
    $p->setMode($donationPlugin->getConfigInfo("mode"));
    if ($p->validate_ipn() && $p->ipn_data['payment_status'] != "Failed" && $p->ipn_data['payment_status'] != "Denied") {
        $member = new Member($mysqli);
        $campaignObj = new DonationCampaign($mysqli);
        $arrData = $p->ipn_data;
        $data = json_encode($arrData);
        $customVars = json_decode($arrData['custom'], true);
        if ($campaignObj->select($customVars['campaign_id']) && $member->select($customVars['member_id'])) {
            $campaignName = $campaignObj->get_info_filtered("title");
            $medalID = $campaignObj->get_info("awardmedal");
            $member->awardMedal($medalID, "Donated to " . $campaignName . " campaign");
        }
        $arrValues = array($customVars['campaign_id'], $customVars['member_id'], $customVars['name'], $customVars['message'], time(), $arrData['mc_gross'], $arrData['payer_email'], $arrData['txn_id'], $data);
        $donationObj->addNew($arrColumns, $arrValues);
    } else {
        $data = json_encode($p->ipn_data);
        $data = "ERROR: - " . $p->last_error . " - " . $data;
        $donationObj->logError($data);
    }
}
Пример #4
0
 */
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") {
    $prevFolder = "../../../../";
    include_once $prevFolder . "_setup.php";
    include_once $prevFolder . "classes/member.php";
    include_once $prevFolder . "classes/rank.php";
    include_once $prevFolder . "classes/btplugin.php";
    $consoleObj = new ConsoleOption($mysqli);
    $cID = $consoleObj->findConsoleIDByName("Plugin Manager");
    $consoleObj->select($cID);
    $member = new Member($mysqli);
    $member->select($_SESSION['btUsername']);
    if (!$member->authorizeLogin($_SESSION['btPassword']) || !$member->hasAccess($consoleObj)) {
        exit;
    }
    $pluginObj = new btPlugin($mysqli);
}
echo "\n<table class='formTable' style='margin-top: 0px; border-spacing: 0px'>\n\t";
$dispPlugins = "";
$pluginsDir = scandir($prevFolder . "plugins");
$addCSS = "";
$x = 0;
foreach ($pluginsDir as $dir) {
    if (is_dir($prevFolder . "plugins/" . $dir) && $dir != "." && $dir != ".." && !in_array($dir, $pluginObj->getPlugins("filepath")) && (file_exists($prevFolder . "plugins/" . $dir . "/install.php") || file_exists($prevFolder . "plugins/" . $dir . "/install_setup.php"))) {
        if ($x == 0) {
            $x = 1;
            $addCSS = "";
        } else {
            $x = 0;
            $addCSS = " alternateBGColor";
        }
Пример #5
0
 */
// Config File
$prevFolder = "../";
include "../_setup.php";
// Check for valid Console Option
$consoleObj = new ConsoleOption($mysqli);
$checkConsole = $mysqli->query("SELECT console_id FROM " . $dbprefix . "console ORDER BY console_id");
while ($row = $checkConsole->fetch_assoc()) {
    $arrConsoleOptions[] = $row['console_id'];
}
if (!$consoleObj->select($_GET['cID'])) {
    die("<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "members';</script>");
}
$cID = $_GET['cID'];
// Load any plugins
$consolePluginObj = new btPlugin($mysqli);
$arrPlugins = $consolePluginObj->getPluginPage("console");
foreach ($arrPlugins as $pluginPageInfo) {
    include_once $pluginPageInfo['pagepath'];
}
// Start Page
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$PAGE_NAME = $consoleTitle . " - ";
$EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "js/colorpicker/jquery.miniColors.js'></script>\n<link rel='stylesheet' media='screen' type='text/css' href='" . $MAIN_ROOT . "js/colorpicker/jquery.miniColors.css'>\n";
$arrTinyMCEPages = array("Manage News", "Post News", "Add Custom Page", "Manage Custom Pages", "Add Custom Form Page", "Manage Custom Form Pages", "Post Topic", "Manage Forum Posts", "Add Menu Item", "Add Menu Category", "Manage Menu Categories", "Manage Menu Items", "Edit Profile");
$arrAceEditorPages = array("Modify Current Theme", "Add Menu Category", "Add Menu Item", "Manage Menu Categories", "Manage Menu Items");
if (in_array($consoleInfo['pagetitle'], $arrTinyMCEPages)) {
    $btThemeObj->addHeadItem("richtexteditor", "<script type='text/javascript' src='" . $MAIN_ROOT . "js/tiny_mce/jquery.tinymce.js'></script>");
}
if (in_array($consoleInfo['pagetitle'], $arrAceEditorPages)) {
Пример #6
0
<?php

function minecraftSkins()
{
    global $arrSections;
    $arrSections = addArraySpace($arrSections, 5, 2);
    $arrSections[2] = "include/profile/_minecraftskin.php";
}
$hooksObj->addHook("profile_sections", "minecraftSkins");
// Include installed plugin functions
$modPluginsObj = new btPlugin($mysqli);
$arrPlugins = $modPluginsObj->getPluginPage("mods");
foreach ($arrPlugins as $pluginInfo) {
    include_once BASE_DIRECTORY . $pluginInfo['pagepath'];
}
function replaceRichTextEditor()
{
    $GLOBALS['richtextEditor'] = "\n\n\t\t\tCKEDITOR.replace('" . $GLOBALS['rtCompID'] . "');\n\t\t\n\t\t";
}
//$hooksObj->addHook("form_richtexteditor", "replaceRichTextEditor");
Пример #7
0
$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();
    }
}
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Plugin Manager");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$pluginObj = new btPlugin($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$prevFolder = "../../";
$PAGE_NAME = "Facebook Login - " . $consoleTitle . " - ";
$dispBreadCrumb = "<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>" . $consoleTitle . "</a> > Facebook Login Settings";
$EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n";
include "../../themes/" . $THEME . "/_header.php";
echo "\n<div class='breadCrumbTitle' id='breadCrumbTitle'>Facebook Login Settings</div>\n<div class='breadCrumb' id='breadCrumb' style='padding-top: 0px; margin-top: 0px'>\n{$dispBreadCrumb}\n</div>\n";
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $fbObj = new Facebook($mysqli);
    $pluginObj->selectByName("Facebook Login");
    if ($_POST['submit']) {
        $arrAPIKey = array('appID' => $_POST['appid'], 'appSecret' => $_POST['appsecret']);
Пример #8
0
<?php

include "../../_setup.php";
include "classes/donate-paypalclass.php";
include_once "classes/campaign.php";
$donationPlugin = new btPlugin($mysqli);
$campaignObj = new DonationCampaign($mysqli);
$customVars = array();
if ($donationPlugin->selectByName("Donations") && $donationPlugin->getConfigInfo("email") != "" && $campaignObj->select($_GET['campaign_id'])) {
    $notifyURL = FULL_SITE_URL . "plugins/donations/paypal-ipn.php";
    $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");
Пример #9
0
$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();
    }
}
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Plugin Manager");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$pluginObj = new btPlugin($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$prevFolder = "../../";
$PAGE_NAME = "Twitter Connect - " . $consoleTitle . " - ";
$dispBreadCrumb = "<a href='" . $MAIN_ROOT . "'>Home</a> > <a href='" . $MAIN_ROOT . "members'>My Account</a> > <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>" . $consoleTitle . "</a> > Twitter Connect Settings";
$EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n";
include "../../themes/" . $THEME . "/_header.php";
echo "\n<div class='breadCrumbTitle' id='breadCrumbTitle'>Twitter Connect Settings</div>\n<div class='breadCrumb' id='breadCrumb' style='padding-top: 0px; margin-top: 0px'>\n{$dispBreadCrumb}\n</div>\n";
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $twitterObj = new Twitter($mysqli);
    $memberInfo = $member->get_info_filtered();
    $pluginObj->selectByName("Twitter Connect");
    //$result = $mysqli->query("SELECT * FROM ".$dbprefix."plugins WHERE name = 'Twitter Connect'");
Пример #10
0
<?php

header("Content-type: text/css");
include "../../_setup.php";
include BASE_DIRECTORY . "themes/" . $THEME . "/css.php";
if ($arrCSSInfo['box-bg-image'] != "none") {
    $arrCSSInfo['box-bg-image'] = substr($arrCSSInfo['box-bg-image'], strlen("url('"));
    $arrCSSInfo['box-bg-image'] = substr($arrCSSInfo['box-bg-image'], 0, strlen($arrCSSInfo['box-bg-image']) - 2);
}
$pluginObj = new btPlugin($mysqli);
$pluginObj->selectByName("Twitch");
$streamWidth = $pluginObj->getConfigInfo("stream_width") != "" ? $pluginObj->getConfigInfo("stream_width") : 640;
$streamHeight = $pluginObj->getConfigInfo("stream_height") != "" ? $pluginObj->getConfigInfo("stream_height") : 360;
$streamChatHeight = $pluginObj->getConfigInfo("streamchat_width") != "" ? $pluginObj->getConfigInfo("streamchat_height") : 300;
?>
.streamPageContainer {
	position: relative;
	overflow: auto;
	margin: 0px auto;
	width: 98%;
}

.twitchCardContainer {
	max-width: 320px;
	width: 26%;
	display: inline-block;
	padding: 10px;
	border: solid <?php 
echo $arrCSSInfo['default-border-color'];
?>
 1px;
Пример #11
0
			</div>
		</div>
	
	
	</div>


	<div class='main userProfileRight'>
		<?php 
define("SHOW_PROFILE_MAIN", true);
$arrSections[] = "include/profile/_main.php";
$arrSections[] = "include/profile/_customoptions.php";
$arrSections[] = "include/profile/_gamesplayed.php";
$arrSections[] = "include/profile/_squads.php";
$arrSections[] = "include/profile/_medals.php";
$pluginObj = new btPlugin($mysqli);
$arrPlugins = $pluginObj->getPluginPage("profile");
$hooksObj->run("profile_sections");
$arrSections[] = "";
$x = 0;
foreach ($arrSections as $section) {
    foreach ($arrPlugins as $pluginInfo) {
        if ($pluginInfo['sortnum'] == $x) {
            include $pluginInfo['pagepath'];
        }
    }
    if ($section != "") {
        include $section;
    }
    $x++;
}
Пример #12
0
/*
 * Bluethrust Clan Scripts v4
 * Copyright 2014
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
// Config File
$prevFolder = "../../";
include_once $prevFolder . "_setup.php";
include_once BASE_DIRECTORY . "plugins/twitch/twitch.php";
if (isset($_GET['user']) && setupStreamPage()) {
    $webInfoObj->setPage("plugins/twitch/include/stream.php");
} else {
    $webInfoObj->setPage("plugins/twitch/include/main.php");
}
$pluginObj = new btPlugin($mysqli);
$pluginObj->verifyPlugin("Twitch", array("twitchsocial_id"));
// Start Page
$PAGE_NAME = "Twitch Streams - ";
include BASE_DIRECTORY . "themes/" . $THEME . "/_header.php";
$breadcrumbObj->setTitle("Twitch Streams");
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
$breadcrumbObj->addCrumb("Twitch Streams");
include BASE_DIRECTORY . "include/breadcrumb.php";
$webInfoObj->displayPage();
include BASE_DIRECTORY . "themes/" . $THEME . "/_footer.php";
Пример #13
0
    case "history":
        break;
    case "thankyou":
        $webInfoObj->setPage("plugins/donations/include/thankyou.php");
        $hooksObj->addHook("breadcrumb", "setThankYouPageBreadcrumb");
        break;
    default:
        if (isset($_GET['custom']) && isset($_GET['payment_status'])) {
            $customVars = json_decode($_GET['custom'], true);
            header("Location: " . FULL_SITE_URL . "plugins/donations/?campaign_id=" . $customVars['campaign_id'] . "&p=thankyou");
        } else {
            $webInfoObj->setPage("plugins/donations/include/main.php");
        }
}
$campaignObj = new DonationCampaign($mysqli);
$donationPlugin = new btPlugin($mysqli);
if (!$donationPlugin->selectByName("Donations") || !$campaignObj->select($_GET['campaign_id'])) {
    echo "<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';</script>";
    exit;
} elseif ($donationPlugin->selectByName("Donations") && $donationPlugin->getConfigInfo("email") == "") {
    echo "\n\t\t<script type='text/javascript'>\n\t\t\talert('Please complete the plugin configuration before continuing!');\n\t\t\twindow.location = '" . $MAIN_ROOT . "';\n\t\t</script>\n\t";
    exit;
}
$campaignObj->updateCurrentPeriod();
$campaignInfo = $campaignObj->get_info_filtered();
// Start Page
$PAGE_NAME = $campaignInfo['title'] . " - ";
include $prevFolder . "themes/" . $THEME . "/_header.php";
$member = new Member($mysqli);
$breadcrumbObj->setTitle($campaignInfo['title']);
$breadcrumbObj->addCrumb("Home", $MAIN_ROOT);
Пример #14
0
include_once "../../_setup.php";
include_once "../../classes/member.php";
include_once "../../classes/rank.php";
include_once "../../classes/btplugin.php";
include_once "../../classes/consolecategory.php";
// Plugin Info
$PLUGIN_TABLE_NAME = $dbprefix . "youtube";
$PLUGIN_NAME = "Youtube Connect";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Plugin Manager");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$pluginObj = new btPlugin($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $countErrors = 0;
    $dispError = array();
    // Check if installed
    if (!in_array($_POST['pluginDir'], $pluginObj->getPlugins("filepath"))) {
        $countErrors++;
        $dispError[] = "The selected plugin is not installed!";
    }
    // Start Uninstall
    $sql = "DROP TABLE `" . $PLUGIN_TABLE_NAME . "`";
    $sql2 = "DROP TABLE `" . $dbprefix . "youtube_videos`";
    if ($mysqli->query($sql) && $mysqli->query($sql2)) {
        // Remove Plugin from plugin table
Пример #15
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
 *
 */
$prevFolder = "../";
include "../_setup.php";
$pluginObj = new btPlugin($mysqli);
if (!isset($_GET['plugin']) || !$pluginObj->selectByName($_GET['plugin'])) {
    echo "<script type='text/javascript'>window.location = '" . $MAIN_ROOT . "';";
    exit;
}
$pluginInfo = $pluginObj->get_info_filtered();
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Plugin Manager");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$consoleTitle = $consoleInfo['pagetitle'];
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$PAGE_NAME = $pluginInfo['name'] . " Plugin Settings - " . $consoleTitle . " - ";
$EXTERNAL_JAVASCRIPT .= "\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/console.js'></script>\n<script type='text/javascript' src='" . $MAIN_ROOT . "members/js/main.js'></script>\n";
Пример #16
0
include_once "../../classes/member.php";
include_once "../../classes/rank.php";
include_once "../../classes/btplugin.php";
include_once "../../classes/consolecategory.php";
// Plugin Info
$PLUGIN_TABLE_NAME = $dbprefix . "twitter";
$PLUGIN_NAME = "Twitter Connect";
$arrAPIKeys = array('consumerKey' => "", 'consumerSecret' => "", 'widgetID' => "");
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Plugin Manager");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$pluginObj = new btPlugin($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $countErrors = 0;
    $dispError = array();
    // Check if already installed
    if (in_array($_POST['pluginDir'], $pluginObj->getPlugins("filepath"))) {
        $countErrors++;
        $dispError[] = "The selected plugin is already installed!";
    }
    // Check if plugin table name interferes with other tables
    $result = $mysqli->query("SHOW TABLES");
    while ($row = $result->fetch_array()) {
        if ($row[0] == $PLUGIN_TABLE_NAME) {
            $countErrors++;
Пример #17
0
<?php

if (!defined("MAIN_ROOT")) {
    exit;
}
$member = new Member($mysqli);
$twitchObj = new Twitch($mysqli);
$pluginObj = new btPlugin($mysqli);
$pluginObj->selectByName("Twitch");
if (!$member->select($_GET['user']) || !$twitchObj->hasTwitch($_GET['user'])) {
    echo "\n\t\t\t<script type='text/javascript'>window.location='" . MAIN_ROOT . "plugins/twitch'</script>\n\t\t";
    exit;
}
$twitchName = $twitchObj->getTwitchName($twitchObj->data['memberID']);
$autoPlay = $pluginObj->getConfigInfo("autoplay") == "1" ? "true" : "false";
?>


<div class='twitchPlayerContainer'>
	<object class='twitchPlayer' type='application/x-shockwave-flash' id='live_embed_player_flash' data='http://www.twitch.tv/widgets/live_embed_player.swf?channel=<?php 
echo $twitchName;
?>
' bgcolor='#000000'>
		<param name='allowFullScreen' value='true' /><param name='wmode' value='opaque' />
		<param name='allowScriptAccess' value='always' /><param name='allowNetworking' value='all' />
		<param name='movie' value='http://www.twitch.tv/widgets/live_embed_player.swf' />
		<param name='flashvars' value='hostname=www.twitch.tv&channel=<?php 
echo $twitchName;
?>
&auto_play=<?php 
echo $autoPlay;