Beispiel #1
0
$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']);
        $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);
Beispiel #2
0
     // Check Display Order
     if (!in_array($_POST['displayorder'], array_keys($arrProfileModules))) {
         $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";