function poll_SQS_queues($CpeClientSdk, $decodedClient)
{
    try {
        // Will poll for 2 seconds
        if ($msg = $CpeClientSdk->receive_message($decodedClient, 10)) {
            if (!($decoded = json_decode($msg['Body']))) {
                throw new Exception("JSON output data is invalid!");
            } else {
                handle_output($decoded);
            }
        }
    } catch (Exception $e) {
        print "[ERROR] " . $e->getMessage() . "\n";
    }
    // Message polled. We delete it from SQS
    if (isset($msg) && $msg != "") {
        $CpeClientSdk->delete_message($decodedClient, $msg);
    }
}
Example #2
0
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
require_once INCLUDES . "footer_includes.php";
define("CONTENT", ob_get_contents());
ob_end_clean();
render_page(false);
echo "</body>\n</html>\n";
?>
<!-- Woopra Code Start -->
<script type="text/javascript" src="//static.woopra.com/js/woopra.v2.js"></script>
<script type="text/javascript">
woopraTracker.track();
</script>
<!-- Woopra Code End -->
<?php 
if (iADMIN) {
    $result = dbquery("DELETE FROM " . DB_FLOOD_CONTROL . " WHERE flood_timestamp < '" . (time() - 360) . "'");
    $result = dbquery("DELETE FROM " . DB_THREAD_NOTIFY . " WHERE notify_datestamp < '" . (time() - 1209600) . "'");
    $result = dbquery("DELETE FROM " . DB_CAPTCHA . " WHERE captcha_datestamp < '" . (time() - 360) . "'");
    $result = dbquery("DELETE FROM " . DB_NEW_USERS . " WHERE user_datestamp < '" . (time() - 86400) . "'");
}
$output = ob_get_contents();
ob_end_clean();
echo handle_output($output);
if (ob_get_length() !== FALSE) {
    ob_end_flush();
}
mysql_close();
Example #3
0
        if ($usr_deactivate > 10) {
            $new_time = $settings['cronjob_day'];
        }
    }
    $result = dbquery("UPDATE " . DB_SETTINGS . " SET settings_value='" . $new_time . "' WHERE settings_name='cronjob_day'");
}
// Error handling
if (iADMIN && checkrights("ERRO") && count($_errorHandler) > 0) {
    echo "<div class='admin-message'>" . str_replace("[ERROR_LOG_URL]", ADMIN . "errors.php" . $aidlink, $locale['err_101']) . "</div>\n";
}
echo "</body>\n</html>\n";
$output = ob_get_contents();
if (ob_get_length() !== FALSE) {
    ob_end_clean();
}
$output = handle_output($output);
if (!defined("ADMIN_PANEL") && $settings['site_seo']) {
    $output = $permalink->getOutput($output);
}
if (isset($permalink)) {
    unset($permalink);
}
echo $output;
if (ob_get_length() !== FALSE) {
    ob_end_flush();
}
if ($pdo_enabled == "1") {
    $pdo = NULL;
} else {
    mysql_close($db_connect);
}