Пример #1
0
function GetThreadId($p)
{
    //, $allowSpecial = false) {
    global $lastMailData;
    global $userStatus;
    global $fbUser;
    global $fbObject;
    // if (($p == 0)||(strtoupper($p) == 'LAST')||(strtoupper($p) == 'CURSTATUS')) {
    // if ($allowSpecial) {
    // if (strtoupper($p) == 'CURSTATUS') {
    // GetCurrentStatus();
    // if ($userStatus == '') {
    // FbcmdFatalError("CURSTATUS: Your status is blank");
    // }
    // $fql = "SELECT post_id FROM stream WHERE source_id={$fbUser} AND actor_id={$fbUser} AND attachment=='' LIMIT 1";
    // } else {
    // $fql = "SELECT post_id FROM stream WHERE source_id={$fbUser} AND actor_id={$fbUser} LIMIT 1";
    // }
    // try {
    // $fbReturn = $fbObject->api_client->fql_query($fql);
    // TraceReturn($fbReturn);
    // } catch(Exception $e) {
    // FbcmdException($e,'GET-POST');
    // }
    // if (isset($fbReturn[0]['post_id'])) {
    // return $fbReturn[0]['post_id'];
    // } else {
    // FbcmdFatalError("GETPOST: Could not retrieve post_id = {$p}");
    // }
    // } else {
    // global $fbcmdCommand;
    // FbcmdWarning ("{$fbcmdCommand} does not support post_id = {$p}");
    // }
    // } else {
    if ($p < 1001) {
        $lastMailData = LoadDataFile('mail_save', 'mailfile');
        if (isset($lastMailData['ids'][$p])) {
            return $lastMailData['ids'][$p];
        } else {
            FbcmdWarning("Invalid Thread ID: {$p}");
            return false;
        }
    } else {
        return $p;
    }
    // }
}
Пример #2
0
         if (isset($_POST['SourceDBPassword'])) {
             $_SESSION['SourceDBPassword'] = DB_RemoveBadChars($_POST['SourceDBPassword']);
         } else {
             $_SESSION['SourceDBPassword'] = "";
         }
         if (isset($_POST['SourceDBEnableRowCounting'])) {
             $_SESSION['SourceDBEnableRowCounting'] = DB_RemoveBadChars($_POST['SourceDBEnableRowCounting']);
             if ($_SESSION['SourceDBEnableRowCounting'] != "true") {
                 $_SESSION['SourceDBEnableRowCounting'] = "false";
             }
         }
         // Check Database Access!
     }
 }
 // If we reached this point, we have gathered all necessary information to create our configuration file ;)!
 $filebuffer = LoadDataFile($configsamplefile);
 // Set helper variables and init user vars if needed!
 if (isset($_SESSION['UserDBEnabled']) && $_SESSION['UserDBEnabled']) {
     $_SESSION['UserDBEnabled_value'] = "true";
 } else {
     $_SESSION['UserDBEnabled_value'] = "false";
 }
 if (isset($_SESSION['UserDBLoginRequired']) && $_SESSION['UserDBLoginRequired']) {
     $_SESSION['UserDBLoginRequired_value'] = "true";
 } else {
     $_SESSION['UserDBLoginRequired_value'] = "false";
 }
 if (!isset($_SESSION['UserDBServer'])) {
     $_SESSION['UserDBServer'] = "localhost";
 }
 if (!isset($_SESSION['UserDBPort'])) {