Example #1
0
 static function requireAuthenticate($is_ajax = true, $extra_secure = true, &$realUser = null)
 {
     global $api_key, $api_key_secret, $adminUserIDs;
     $u = MyAuth::checkAuthentication($extra_secure);
     if (!$u) {
         if ($is_ajax) {
             return 0;
         }
         $facebook = new Facebook($api_key, $api_key_secret);
         $user = $facebook->require_login();
         if ($user) {
             MyAuth::setLoginAuthenticate($user);
         }
         $u = $user;
     }
     if (isset($realUser)) {
         $realUser = $u;
     }
     //Return the mock_user if the real user is an administrator and mockuser is set
     $mu = GetAdminDebug('mock_user');
     if ($mu != 'NONE' && in_array(intval($u), $adminUserIDs)) {
         return $mu;
     } else {
         return $u;
     }
 }
Example #2
0
{
    global $debug_cookie;
    if (is_null($a)) {
        $c = $debug_cookie;
    } else {
        $c = $debug_cookie . '_' . $a;
    }
    return isset($_COOKIE[$c]) ? $_COOKIE[$c] : 'NONE';
}
$fp = FirePHP::getInstance(TRUE);
$debugOn = FALSE;
if (GetAdminDebug() == 'Y') {
    $debugOn = TRUE;
    $fp->setEnabled(TRUE);
    //   $fp->log(GetAdminDebug('obstart'), 'obstart Cookie');
    if (GetAdminDebug('obstart') > 0) {
        ob_start();
    }
} else {
    $fp->setEnabled(FALSE);
}
$debugOn = TRUE;
//FALSE;
$fp->setEnabled(TRUE);
function cache_burner()
{
    //Keep it simple now. Later we will have something different for production and development
    return '?' . rand();
}
function TRACE($a, $b)
{
Example #3
0
    } else {
        SetAdminDebug('N');
    }
    header("Refresh: 0;url=admin.php");
    echo 'You\'ll be redirected in about 1 sec. If not, click <a href="admin.php">here</a>.';
    die;
}
if (isset($_GET['expire_session'])) {
    $facebook->expire_session();
}
$d_mode = GetAdminDebug();
$new_debug_mode = $d_mode != 'Y' ? 'Y' : 'N';
$new_debug_mode_button = $d_mode != 'Y' ? 'ON' : 'OFF';
$obs = intval(GetAdminDebug('obstart'));
$fb_debug = intval(GetAdminDebug('fb_debug'));
$mu = intval(GetAdminDebug('mock_user'));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
    <head>
    </head>
    
    <body>

        <div class="container" >   
            <!--    CONTENT  -->
            <div class="appContent">    


                <div class="main">