Пример #1
0
//GlobalFail('E1012 - Essential Language library not found.');
require_once './Code/cURL.php';
require_once './Code/Logging.php';
require_once './Code/Sources.php';
/* Commands */
OpenDB();
ReadCookies();
if ($UserFlags >= 32) {
    require_once './Code/Administration.php';
}
if (is_numeric($_SERVER['QUERY_STRING'])) {
    GetSingleDeal();
} else {
    switch (strtolower(ProcessURL())) {
        case '':
            DisplayMainScreen();
            break;
        case 'account':
            ProcessCommand('DisplayAccount', 'ProcessAccount', true);
            break;
        case 'administration':
            ProcessCommand('DisplayAdministration', null, true);
            break;
        case 'content':
            ProcessCommand('GetMainContent', 'GetSingleContent');
            break;
        case 'data':
            ProcessCommand('GetData', 'SetData', true);
            break;
        case 'dellocation':
            ProcessCommand('SendBadResponse', 'DeleteLocation', true);
Пример #2
0
function CheckUnsubscribe()
{
    /*/////////////////////////////////////////////////////////////
           Author: Plottery Corp.
          Created: v1.0.0 - 2011-08-14
        Revisions: None
          Purpose: Unsubscribes a user from all notifications
          Returns: Nothing
      */
    /////////////////////////////////////////////////////////////
    if (isset($_GET['Key'])) {
        list($QR, $DR, $T) = QuerySingle("SELECT UN.NotificationID AS NID, UN.UserID AS UID\n             FROM 1400_User_Notifications UN\n            WHERE UN.CancelKey = '" . Pacify($_GET['Key']) . "';");
        if ($QR < 0) {
            SysLogIt('Error searching for cancel key ' . Pacify($_GET['Key']) . '.', StatusError, ActionSelect);
        } else {
            $Strings = GSA('2112');
            if ($QR > 0) {
                if (ExecCommand("UPDATE 1000_Users SET UserFlags = (UserFlags & ~" . UserReminders . ") WHERE UserID = " . $DR['UID'] . ";")) {
                    SysLogIt('Successfully disabled reminders for user with ID of ' . $DR['UID'] . '.', StatusInfo);
                    if (ExecCommand("UPDATE 1400_User_Notifications SET Settings = 0 WHERE NotificationID = " . $DR['NID'] . ";")) {
                        SysLogIt('Successfully disabled digests for user with ID of ' . $DR['UID'] . '.', StatusInfo);
                        return DisplayMainScreen("SetBackMap(); PopC('" . Pacify(Pacify($Strings[2112]), true) . "','GH();');");
                    } else {
                        SysLogIt('Could not disable digests for user with ID of ' . $UID . '.', StatusError, ActionInsert);
                    }
                } else {
                    SysLogIt('Could not disable reminders for user with ID of ' . $UID . '.', StatusError, ActionInsert);
                }
            }
        }
    }
    return DisplayMainScreen('PopErr();');
}
Пример #3
0
function GetSingleDeal()
{
    global $LanguageID;
    global $LanguageCode;
    if ($LanguageID == 0) {
        $LanguageID = 1;
        $LanguageCode = 'en';
        $Expiry = time() + 60 * 60;
        setcookie('LID', $LanguageID, $Expiry);
    }
    list($QR, $DR, $T) = QuerySingle("SELECT D.DealID, COALESCE(LSDa.StringText, LSDb.StringText) AS Title\n           FROM 4000_Deals D\n          INNER JOIN 0200_Language_Strings LSDa ON D.StringID = LSDa.StringID AND LSDa.LanguageID = " . $LanguageID . "\n          INNER JOIN 0200_Language_Strings LSDb ON D.StringID = LSDb.StringID AND LSDb.LanguageID = 1\n          WHERE D.DealID = " . (int) $_SERVER['QUERY_STRING'] . ";");
    if ($QR > 0) {
        return DisplayMainScreen('InitD(' . $DR['DealID'] . ');', $DR['Title']);
    }
    RedirectTo();
}