<?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";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$memberInfo = $member->get_info_filtered();
$newMemberObj = new Member($mysqli);
$cID = $consoleObj->findConsoleIDByName("View Member Applications");
$consoleObj->select($cID);
$memberAppObj = new MemberApp($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $memberAppObj->select($_POST['mAppID']) && $memberAppObj->get_info("memberadded") == 1) {
    $memberAppUser = $memberAppObj->get_info_filtered("username");
    if (!$memberAppObj->delete()) {
        echo "\n\t\t\t<div id='memberAppMessage' style='display: none'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tUnable to remove member application!  Please contact the website administrator.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#memberAppMessage').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Remove Member Application - Error',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t";
    } else {
        $member->logAction("Removed the member application for " . $memberAppUser . ".");
    }
    include "memberapplist.php";
}
         }
         $arrColumns = array("name", "componenttype", "ordernum", "required", "tooltip");
         $arrValues = array($_POST['newComponentName'], $_POST['newComponentType'], $componentOrderNum, $_POST['newComponentRequired'], $_POST['newComponentTooltip']);
         if ($appComponentObj->addNew($arrColumns, $arrValues)) {
             if ($_POST['newComponentType'] == "select" || $_POST['newComponentType'] == "multiselect") {
                 $appComponentSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
                 $newComponentID = $appComponentObj->get_info("appcomponent_id");
                 foreach ($_SESSION['btAppComponent']['cOptions'] as $optionValue) {
                     $appComponentSelectOptionObj->addNew(array("appcomponent_id", "componentvalue"), array($newComponentID, $optionValue));
                 }
             } elseif ($_POST['newComponentType'] == "profile") {
                 $appComponentSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
                 $newComponentID = $appComponentObj->get_info("appcomponent_id");
                 $appComponentSelectOptionObj->addNew(array("appcomponent_id", "componentvalue"), array($newComponentID, $_POST['profileOptionID']));
             }
             $member->logAction("Added a new member application component.");
             echo "\n\t\t\t\t\t<div id='addAppComponentSuccess' style='display: none'>\n\t\t\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t\t\tNew Member Application Component Added!<br><br>\n\t\t\t\t\t\t\tClick OK to continue modifying the member application.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\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\$('#addAppComponentSuccess').dialog({\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttitle: 'Add Application Component',\n\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\twidth: 450,\n\t\t\t\t\t\t\t\tresizable: false,\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\n\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentlist.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').html(data);\n\t\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeIn(250);\t\t\t\t\n\t\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\t\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\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('#appComponentForm').dialog('close');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>\n\t\t\t\t\t\n\t\t\t\t";
         } else {
             $addAppForm->errors[] = "nable to save information to the database.  Please contact the website administrator.";
         }
     }
     if (count($addAppForm->errors) == 0) {
         echo "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\n\t\t\t\t\t\t\$('#addAppComponentFormDialog').hide();\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t";
     }
 }
 if (!$_POST['saveComponent']) {
     $_SESSION['btAppComponent']['cOptions'] = array();
 }
 echo "<div id='addAppComponentFormDialog'>";
 $addAppForm->show();
 echo "</div>";
         $arrColumns = array("name", "componenttype", "required", "tooltip");
         $arrValues = array($_POST['saveComponentName'], $_POST['saveComponentType'], $_POST['saveComponentRequired'], $_POST['saveComponentTooltip']);
         if ($appComponentObj->update($arrColumns, $arrValues)) {
             if ($appCompInfo['componenttype'] == "select" || $appCompInfo['componenttype'] == "multiselect" || $appCompInfo['componenttype'] == "profile") {
                 $mysqli->query("DELETE FROM " . $dbprefix . "app_selectvalues WHERE appcomponent_id = '" . $appCompInfo['appcomponent_id'] . "'");
             }
             if ($_POST['saveComponentType'] == "select" || $_POST['saveComponentType'] == "multiselect") {
                 $appComponentSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
                 foreach ($_SESSION['btAppComponent']['cOptions'] as $optionValue) {
                     $appComponentSelectOptionObj->addNew(array("appcomponent_id", "componentvalue"), array($appCompInfo['appcomponent_id'], $optionValue));
                 }
             } elseif ($_POST['saveComponentType'] == "profile") {
                 $appComponentSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
                 $appComponentSelectOptionObj->addNew(array("appcomponent_id", "componentvalue"), array($appCompInfo['appcomponent_id'], $_POST['profileOptionID']));
             }
             $member->logAction("Modified the member application.");
             echo "\n\t\t\t\t\t\n\t\t\t\t\t\t<div id='editAppComponentSuccess' style='display: none'>\n\t\t\t\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t\t\t\tMember Application Component Saved!<br><br>\n\t\t\t\t\t\t\t\tClick OK to continue modifying the member application.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#editAppComponentSuccess').dialog({\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttitle: 'Edit Application Component',\n\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\t\twidth: 450,\n\t\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentlist.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').html(data);\n\t\t\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeIn(250);\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\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\n\t\t\t\t\t\t\t\t\$('#appComponentForm').dialog('close');\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</script>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t";
         } else {
             $addAppForm->errors[] = "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to the database.  Please contact the website administrator.";
         }
     }
     if (count($addAppForm->errors) > 0) {
         $_POST['saveComponent'] = false;
     }
 }
 if (!$_POST['saveComponent']) {
     if (($appCompInfo['componenttype'] == "select" || $appCompInfo['componenttype'] == "multiselect") && $countErrors == 0) {
         $appSelectOptionObj = new Basic($mysqli, "app_selectvalues", "appselectvalue_id");
         $arrSelectValues = $appComponentObj->getAssociateIDs();
         $tempArr = array();
         foreach ($arrSelectValues as $selectValueID) {
Beispiel #4
0
$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']);
        $jsonAPIKey = json_encode($arrAPIKey);
        if ($pluginObj->update(array("apikey"), array($jsonAPIKey))) {
            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 Saved Facebook Login Settings!\n\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\tpopupDialog('Facebook Login', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t";
            $member->logAction("Changed Facebook Login Plugin Settings.");
        } else {
            $countErrors++;
            $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";
        }
    }
    if (!$_POST['submit']) {
        $dispNote = "";
        $arrFacebookAPIKeys = array("App ID" => $fbObj->getAppID(), "App Secret" => $fbObj->getAppSecret());
        foreach ($arrFacebookAPIKeys as $key => $value) {
            if ($value == "") {
                $dispNote .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> " . $key . "<br>";
            }
            $dispFacebookAPIKey[$key] = filterText($value);
        }
        echo "\n\t\t\t<p align='right' style='margin-bottom: 10px; margin-right: 20px;'>&laquo; <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Return to Plugin Manager</a></p>\n\t\t\t\n\t\t\t<form action='" . $MAIN_ROOT . "plugins/facebook/settings.php' method='post'>\n\t\t\t<div class='formDiv'>\n\t\t\n\t\t\t";
Beispiel #5
0
        $checkDeletePlugin = $pluginObj->delete();
        // Remove Console Option
        $ytConnectCID = $consoleObj->findConsoleIDByName($PLUGIN_NAME);
        if ($ytConnectCID !== false) {
            $consoleObj->select($ytConnectCID);
            $checkDeleteConsole = $consoleObj->delete();
        } else {
            $checkDeleteConsole = false;
        }
        if (!$checkDeletePlugin) {
            $countErrors++;
            $dispError[] = "Unable to delete plugin from database table.  You will have to manually delete it. - " . $pluginID;
        }
        if (!$checkDeleteConsole) {
            $countErrors++;
            $dispError[] = "Unable to delete " . $PLUGIN_NAME . " console option.  You will have to manually delete it.";
        }
    } else {
        $countErrors++;
        $dispError[] = "Unable to delete plugin database table.";
    }
    $arrReturn = array();
    if ($countErrors == 0) {
        $arrReturn['result'] = "success";
        $member->logAction("Uninstalled " . $PLUGIN_NAME . " Plugin.");
    } else {
        $arrReturn['result'] = "fail";
        $arrReturn['errors'] = $dispError;
    }
    echo json_encode($arrReturn);
}
Beispiel #6
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/forumboard.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$boardObj = new ForumBoard($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Boards");
$consoleObj->select($cID);
if ($member->authorizeLogin($_SESSION['btPassword']) && $boardObj->select($_POST['bID'])) {
    $boardInfo = $boardObj->get_info_filtered();
    if (isset($_POST['confirm'])) {
        $boardObj->delete();
        $member->logAction("Deleted Forum Board: " . $boardInfo['name']);
        include "main_manageboards.php";
    } else {
        $addMessage = "";
        if (count($boardObj->getSubForums()) > 0) {
            $addMessage = "<br><br>All sub-forums will be moved to the parent category/sub-forum.";
        }
        echo "\n\t\t\n\t\t\t<p class='main' align='center'>\n\t\t\t\tAre you sure you want to delete the board, <b>" . $boardInfo['name'] . "</b>?<br><br>All posts in this board will also be deleted." . $addMessage . "\n\t\t\t</p>\n\t\t\n\t\t";
    }
}
Beispiel #7
0
         $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid display order.<br>";
         $countErrors++;
     }
     if ($countErrors == 0) {
         $arrAPIKey = array('consumerKey' => $_POST['consumerkey'], 'consumerSecret' => $_POST['consumersecret'], 'widgetID' => $_POST['widgetid']);
         $jsonAPIKey = json_encode($arrAPIKey);
         $setSortNum = $_POST['displayorder'];
         if ($_POST['beforeafter'] == "after") {
             $setSortNum = $_POST['displayorder'] + 1;
         }
         if ($_POST['profiledisplay'] == "no") {
             $setSortNum = -1;
         }
         if ($pluginObj->update(array("apikey"), array($jsonAPIKey)) && $pluginObj->pluginPage->update(array("sortnum"), array($setSortNum))) {
             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 Saved Twitter Connect Settings!\n\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\tpopupDialog('Twitter Connect', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
             $member->logAction("Changed Twitter Connect Plugin Settings.");
         } else {
             $countErrors++;
             $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";
         }
     }
     if ($countErrors > 0) {
         $_POST['submit'] = false;
     }
 }
 if (!$_POST['submit']) {
     $selectAfter = "";
     if (count($arrProfileModules) == $pluginPageInfo[0]['sortnum']) {
         $selectAfter = " selected";
     }
     $selectNoDisplay = "";
 * 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";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$memberInfo = $member->get_info_filtered();
$newMemberObj = new Member($mysqli);
$cID = $consoleObj->findConsoleIDByName("View Member Applications");
$consoleObj->select($cID);
$memberAppObj = new MemberApp($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $memberAppObj->select($_POST['mAppID'])) {
    $arrMemAppInfo = $memberAppObj->get_info_filtered();
    if ($_POST['confirmDecline'] && $arrMemAppInfo['memberadded'] == 0) {
        if ($memberAppObj->delete()) {
            $memberAppObj->notifyNewMember(false);
            $member->logAction("Declined " . $arrMemAppInfo['username'] . "'s member application.");
            echo "\n\t\t\t\n\t\t\t\t<div id='resultDeclineMessage' style='display: none'>\n\t\t\t\t\t<p class='main' align='center'>" . $arrMemAppInfo['username'] . "'s member application has been declined!</p>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t";
        } else {
            echo "\n\t\t\t\n\t\t\t<div id='resultDeclineMessage' style='display: none'>\n\t\t\t\t<p class='main' align='center'>Unable to decline " . $arrMemAppInfo['username'] . "'s member application!  Please contact the website administrator.</p>\n\t\t\t</div>\n\t\t\t\n\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\t\$('#resultDeclineMessage').dialog({\n\t\t\t\t\t\ttitle: 'Decline Member Application',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#memberApplications').fadeOut(250);\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/memberapplist.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#memberApplications').html(data);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#memberApplications').fadeIn(250);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\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\$('#confirmDeclineMessage').dialog('close');\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t";
    } else {
        echo "\n\t\t\t<div id='confirmDeclineMessage' style='display: none'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tAre you sure you want to decline " . $arrMemAppInfo['username'] . "'s application?\n\t\t\t\t\n\t\t\t\t\t<div id='declineLoadingSpiral' style='display: none'>\n\t\t\t\t\t\t<p align='center'>\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</p>\n\t\t\t\t\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\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\$('#confirmDeclineMessage').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Decline Member Application - Confirm',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\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\$('#declineLoadingSpiral').show();\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/declinememberapp.php', { mAppID: '" . $_POST['mAppID'] . "', confirmDecline: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#declineLoadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#confirmDeclineMessage').html(data);\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\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t\$('.ui-dialog :button').blur();\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t</script>\n\t\t";
    }
}
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/basic.php";
include_once "../../../../classes/rank.php";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$memberInfo = $member->get_info_filtered();
$cID = $consoleObj->findConsoleIDByName("View Member Applications");
$consoleObj->select($cID);
$memberAppObj = new MemberApp($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj) && $memberAppObj->select($_POST['mAppID'])) {
    $arrMemAppInfo = $memberAppObj->get_info_filtered();
    if ($memberAppObj->addMember()) {
        $newMemberInfo = $memberAppObj->getNewMemberInfo();
        $dispNewMember = $newMemberInfo['username'];
        $member->logAction("Accepted " . $dispNewMember . "'s member application.");
        if ($newMemberInfo['recruiter'] == 0) {
            $memberAppObj->setRecruiter($memberInfo['member_id']);
        }
        echo "\n\t\t\t<div id='memAppMessage'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\t" . $dispNewMember . " was successfully added to the website!\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t";
    } else {
        echo "\n\t\t\t<div id='memAppMessage'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tUnable to accept " . $dispNewMember . "'s application!  Please contact the website administrator.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t";
    }
    echo "\n\t\t\n\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\n\t\t\t\t\$('#memAppMessage').dialog({\n\t\t\t\t\n\t\t\t\t\ttitle: 'Accept Member Application',\n\t\t\t\t\tmodal: true,\n\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\tshow: 'scale',\n\t\t\t\t\twidth: 400,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t});\t\t\n\t\t</script>\n\t";
}
include "memberapplist.php";
Beispiel #10
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
 *
 */
$prevFolder = "../";
include_once "../_setup.php";
// 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) && isset($_GET['plugin'])) {
    $pluginInstaller = new PluginInstaller($mysqli);
    require BASE_DIRECTORY . "plugins/" . $_GET['plugin'] . "/install_setup.php";
    $pluginInstaller->install();
    if ($pluginInstaller->isInstalled()) {
        $member->logAction("Installed " . $pluginInstaller->pluginName . " Plugin.");
    }
}
 * License: http://www.bluethrust.com/license.php
 *
 */
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/basicorder.php";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$cID = $consoleObj->findConsoleIDByName("Member Application");
$consoleObj->select($cID);
$appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id");
$appComponentObj->set_assocTableName("app_selectvalues");
$appComponentObj->set_assocTableKey("appselectvalue_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    if ($appComponentObj->select($_POST['acID'])) {
        $arrCompInfo = $appComponentObj->get_info_filtered();
        if (!$_POST['confirmDelete']) {
            echo "\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tAre you sure you want to delete <b>" . $arrCompInfo['name'] . "</b> from the member application?\n\t\t\t\t</p>\n\t\t\t";
        } elseif ($_POST['confirmDelete']) {
            if ($appComponentObj->delete()) {
                $appComponentObj->resortOrder();
                $member->logAction("Deleted a member application component.");
                echo "\n\t\t\t\t\t\n\t\t\t\t\t<div id='confirmDeleteMessage' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\t<b>" . $arrCompInfo['name'] . "</b> was successfully deleted from the member application!\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\n\t\t\t\t\t\tfunction reloadAppCompList() {\n\t\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\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#appComponentList').fadeOut(250);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/membermanagement/include/appcomponentlist.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#appComponentList').html(data);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#appComponentList').fadeIn(250);\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}\n\t\t\t\t\t\n\t\t\t\t\t</script>\n\t\t\t\t\t";
            } else {
                echo "\n\t\t\t\t\n\t\t\t\t\t<div id='confirmDeleteMessage' style='display: none'>\n\t\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\t\tUnable to delete <b>" . $arrCompInfo['name'] . "</b> from the member application!  You may need to delete it manually.\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\t<script type='text/javascript'>\n\t\t\t\t\t\tfunction reloadAppCompList() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t</script>\n\t\t\t\t\t\n\t\t\t\t";
            }
            echo "\n\t\t\t\t<script type='text/javascript'>\n\t\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 Application Component',\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\t'OK': function() {\n\t\t\t\t\t\t\t\t\treloadAppCompList();\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}\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\t\$('#appComponentForm').dialog('close');\n\t\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";
        }
    }
}
Beispiel #12
0
         $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> You selected an invalid display order.<br>";
         $countErrors++;
     }
     if ($countErrors == 0) {
         $arrAPIKey = array('clientID' => $_POST['clientid'], 'clientSecret' => $_POST['clientsecret']);
         $jsonAPIKey = json_encode($arrAPIKey);
         $setSortNum = $_POST['displayorder'];
         if ($_POST['beforeafter'] == "after") {
             $setSortNum = $_POST['displayorder'] + 1;
         }
         if ($_POST['profiledisplay'] == "no") {
             $setSortNum = -1;
         }
         if ($pluginObj->update(array("apikey"), array($jsonAPIKey)) && $pluginObj->pluginPage->update(array("sortnum"), array($setSortNum))) {
             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 Saved Youtube Connect Settings!\n\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\tpopupDialog('Youtube Connect', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t";
             $member->logAction("Changed Youtube Connect Plugin Settings.");
         } else {
             $countErrors++;
             $dispError .= "&nbsp;&nbsp;&nbsp;<b>&middot;</b> Unable to save information to database! Please contact the website administrator.<br>";
         }
     }
     if ($countErrors > 0) {
         $_POST['submit'] = false;
     }
 }
 if (!$_POST['submit']) {
     $selectAfter = "";
     if (count($arrProfileModules) == $pluginPageInfo[0]['sortnum']) {
         $selectAfter = " selected";
     }
     $selectNoDisplay = "";
            $member->select($iaRequestObj->get_info("member_id"));
            $member->update(array("onia", "inactivedate"), array(1, time()));
            $member->postNotification("Your inactive request was approved!");
        } else {
            $member->select($iaRequestObj->get_info("member_id"));
            $member->update(array("onia", "inactivedate"), array(0, 0));
            $member->postNotification("Your inactive request was denied!");
        }
        $member->select($memberInfo['member_id']);
    } elseif ($_POST['action'] == "delete" && $checkRequestID) {
        $member->select($iaRequestObj->get_info("member_id"));
        $dispIAMemberName = $member->getMemberLink();
        $iaRequestObj->delete();
        $member->postNotification("Your inactive request was deleted!");
        $member->select($memberInfo['member_id']);
        $member->logAction("Deleted " . $dispIAMemberName . "'s IA Request.");
    }
}
$iaMember = new Member($mysqli);
$result = $mysqli->query("SELECT * FROM " . $dbprefix . "iarequest ORDER BY requestdate DESC");
while ($row = $result->fetch_assoc()) {
    $iaMessages = dispIAMessages($row['iarequest_id']);
    $iaMember->select($row['member_id']);
    if (trim($row['reason']) == "") {
        $row['reason'] = "None";
    }
    $dispActions = "";
    if ($row['requeststatus'] == 0) {
        $dispActions = "<a href='javascript:void(0)' id='iaRequestAction' data-iarequest='" . $row['iarequest_id'] . "' data-action='approve'>Approve</a> - <a href='javascript:void(0)' id='iaRequestAction' data-iarequest='" . $row['iarequest_id'] . "' data-action='deny'>Deny</a> - ";
    }
    $dispActions .= "<a href='javascript:void(0)' id='iaRequestAction' data-iarequest='" . $row['iarequest_id'] . "' data-action='delete'>Delete</a>";
Beispiel #14
0
// 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 
echo $MAIN_ROOT;
?>
images/tiltphone.png'><p align='center'>need more space<br>tilt your phone!</p></div>
<table class='formTable' id='membersPageTable'>
<?php 
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/rank.php";
include_once "../../../../classes/news.php";
include_once "../../../../classes/shoutbox.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Shoutbox Posts");
$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)) {
    $memberInfo = $member->get_info_filtered();
    $arrPostIDs = json_decode($_POST['deletePosts'], true);
    foreach ($arrPostIDs as $postID) {
        if ($newsObj->select($postID) && $newsObj->get_info("newstype") == 3) {
            $newsObj->delete();
        }
    }
    $countPosts = count($arrPostIDs);
    $addS = $countPosts > 1 ? "s" : "";
    $member->logAction("Deleted " . $countPosts . " shoutbox post" . $addS . ".");
    define("SHOW_SHOUTBOXLIST", true);
    include "manageshoutbox_list.php";
}
?>
	
Beispiel #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";
$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>";
    }
}
Beispiel #17
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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$manageStatusCID = $consoleObj->findConsoleIDByName("Manage Diplomacy Statuses");
$consoleObj->select($manageStatusCID);
$diplomacyStatusObj = new BasicOrder($mysqli, "diplomacy_status", "diplomacystatus_id");
$diplomacyStatusObj->set_assocTableName("diplomacy");
$diplomacyStatusObj->set_assocTableKey("diplomacy_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyStatusObj->select($_POST['sID']) && $member->hasAccess($consoleObj)) {
    $statusName = $diplomacyStatusObj->get_info_filtered("name");
    $arrAssociates = $diplomacyStatusObj->getAssociateIDs();
    if (count($arrAssociates) > 0) {
        echo "\n\t\t\t\n\t\t\t<div id='deleteDialogBox' style='display: none'>\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tThere are currently clans on the diplomacy page with the " . $statusName . " status.  You must change their status before deleting.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#deleteDialogBox').dialog({\n\t\t\t\t\t\ttitle: 'Delete Diplomacy Status',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t";
    } elseif (count($arrAssociates) == 0 && !isset($_POST['confirmDelete'])) {
        echo "\n\t\t\t\n\t\t\t<div id='deleteDialogBox' style='display: none'>\n\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\tAre you sure you want to delete the <b>" . $statusName . "</b> diplomacy status?\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<script type='text/javascript'>\n\t\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\t\$('#deleteDialogBox').dialog({\n\t\t\t\t\t\ttitle: 'Delete Diplomacy Status',\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#statusListDiv').hide();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/diplomacy/include/deletestatus.php', { sID: '" . $_POST['sID'] . "', confirmDelete: 1 }, function(data1) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$('#statusListDiv').html(data1);\n\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\$('#statusListDiv').fadeIn(250);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t";
    } elseif (count($arrAssociates) == 0 && isset($_POST['confirmDelete'])) {
        $diplomacyStatusObj->set_assocTableName("");
        $diplomacyStatusObj->delete();
        $member->logAction("Deleted the " . $statusName . " diplomacy status.");
        include "main_managestatuses.php";
    }
}
Beispiel #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/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";
<?php

/*
 * Bluethrust Clan Scripts v4
 * Copyright 2014
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/basicorder.php";
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$cID = $consoleObj->findConsoleIDByName("Member Application");
$consoleObj->select($cID);
$appComponentObj = new BasicOrder($mysqli, "app_components", "appcomponent_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
    $memberInfo = $member->get_info_filtered();
    if ($appComponentObj->select($_POST['acID'])) {
        $member->logAction("Modified the member application component order.");
        $appComponentObj->move($_POST['acDir']);
        include "appcomponentlist.php";
    }
}
Beispiel #20
0
            $pluginPageSortNum = $pluginObj->pluginPage->getHighestSortNum() + 1;
            $pluginObj->pluginPage->addNew(array("plugin_id", "page", "pagepath", "sortnum"), array($pluginID, "profile", "plugins/twitter/_profile.php", $pluginPageSortNum));
            // Check if need to add new console category
            $result = $mysqli->query("SELECT consolecategory_id FROM " . $dbprefix . "consolecategory WHERE name = 'Social Media Connect'");
            if ($result->num_rows == 0) {
                $consoleCatObj = new ConsoleCategory($mysqli);
                $newOrderNum = $consoleCatObj->getHighestOrderNum() + 1;
                $consoleCatObj->addNew(array("name", "ordernum"), array("Social Media Connect", $newOrderNum));
                $consoleCatID = $consoleCatObj->get_info("consolecategory_id");
            } else {
                $row = $result->fetch_assoc();
                $consoleCatID = $row['consolecategory_id'];
            }
            $consoleObj->setCategoryKeyValue($consoleCatID);
            $newSortNum = $consoleObj->getHighestSortNum() + 1;
            $consoleObj->addNew(array("consolecategory_id", "pagetitle", "filename", "sortnum"), array($consoleCatID, $PLUGIN_NAME, "../plugins/twitter/twitterconnect.php", $newSortNum));
        } else {
            $countErrors++;
            $dispError[] = "Unable to create plugin database table.";
        }
    }
    $arrReturn = array();
    if ($countErrors == 0) {
        $arrReturn['result'] = "success";
        $member->logAction("Installed Twitter Connect Plugin.");
    } else {
        $arrReturn['result'] = "fail";
        $arrReturn['errors'] = $dispError;
    }
    echo json_encode($arrReturn);
}
Beispiel #21
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";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$consoleObj = new ConsoleOption($mysqli);
$diplomacyRequestsCID = $consoleObj->findConsoleIDByName("View Diplomacy Requests");
$consoleObj->select($diplomacyRequestsCID);
$diplomacyRequestObj = new Basic($mysqli, "diplomacy_request", "diplomacyrequest_id");
if ($member->authorizeLogin($_SESSION['btPassword']) && $diplomacyRequestObj->select($_POST['reqID']) && $member->hasAccess($consoleObj)) {
    $diplomacyRequestInfo = $diplomacyRequestObj->get_info_filtered();
    if (isset($_POST['confirmDecline'])) {
        // Send E-mail Confirmation
        $emailTo = $diplomacyRequestInfo['email'];
        $emailFrom = "*****@*****.**";
        $emailSubject = $websiteInfo['clanname'] . " - Diplomacy Request: Declined";
        $emailMessage = "\nHi " . $diplomacyRequestInfo['name'] . ",\n\n\n\t\t\nYour diplomacy request has been declined.\n\n\n-" . $websiteInfo['clanname'];
        //mail($emailTo, $emailSubject, $emailMessage, "From: ".$emailFrom);
        $diplomacyRequestObj->delete();
        include "diplomacyrequests.php";
        $member->logAction("Declined " . $diplomacyRequestInfo['clanname'] . "'s diplomacy request.");
    } else {
        echo "\n\t\t\t<div id='confirmDialogBox' style='display: none'>\n\t\t\t\t<p class='main' align='center'>\n\t\t\t\t\tAre you sure you want to decline <b>" . $diplomacyRequestInfo['clanname'] . "'s</b> diplomacy request?\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<script type='text/javascript'>\n\t\t\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\$('#confirmDialogBox').dialog({\n\t\t\t\t\t\n\t\t\t\t\t\ttitle: 'Decline Diplomacy Request',\n\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t'Yes': function() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/diplomacy/include/declinerequest.php', { reqID: " . $_POST['reqID'] . ", confirmDecline: 1 }, function(data) {\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').fadeOut(250);\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').html(data);\n\t\t\t\t\t\t\t\t\t\$('#diplomacyRequests').fadeIn(250);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\$(this).dialog('close');\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\n\t\t\n\t\t";
    }
}