Пример #1
0
function WebUpDls()
{
    global $Response;
    $Response->R = '<DIV CLASS="ttlw">Deal Update Results<HR></DIV><DIV CLASS="abs fulls fktbl flwa">';
    UpDls(true);
    $Response->R .= '</DIV>';
    $Response->S = true;
    $Response->Send();
}
Пример #2
0
require_once dirname(__FILE__) . '/Sessions.php';
//GlobalFail('E1009 - Essential Session library not found.');
require_once dirname(__FILE__) . '/DB.php';
//GlobalFail('E1010 - Essential DB library not found.');
require_once dirname(__FILE__) . '/Cookies.php';
//GlobalFail('E1011 - Essential Cookie library not found.');
require_once dirname(__FILE__) . '/Languages.php';
//GlobalFail('E1012 - Essential Language library not found.');
require_once dirname(__FILE__) . '/Validator.php';
//GlobalFail('E1012 - Essential Language library not found.');
require_once dirname(__FILE__) . '/cURL.php';
require_once dirname(__FILE__) . '/Logging.php';
require_once dirname(__FILE__) . '/Sources.php';
function FlushSessions()
{
    //Delete old sessions
    if (!ExecCommand("DELETE FROM 0700_Sessions\n                        WHERE (SessionAccessDate < " . date('YmdHis', mktime(date('H'), date('i'), date('s'), date('n'), date('j') - 90, date('Y'))) . ")\n                           OR (SessionAccessDate < " . date('YmdHis', mktime(date('H') - 3, date('i'), date('s'), date('n'), date('j'), date('Y'))) . " AND SessionPort = 0);")) {
        SysLogIt('Error deleting old sessions.', StatusError, ActionDelete);
    }
    //Delete old logs
    if (!ExecCommand("DELETE FROM 0500_System_Log\n                        WHERE EntryTimestamp < " . date('YmdHis', mktime(date('H'), date('i'), date('s'), date('n'), date('j') - 14, date('Y'))) . "\n                          AND EntryIP = '';")) {
        SysLogIt('Error deleting old system log entries.', StatusError, ActionDelete);
    }
    if (!ExecCommand("DELETE FROM 0500_System_Log\n                        WHERE EntryTimestamp < " . date('YmdHis', mktime(date('H'), date('i'), date('s'), date('n'), date('j') - 90, date('Y'))) . ";")) {
        SysLogIt('Error deleting old log entries.', StatusError, ActionDelete);
    }
}
OpenDB();
FlushSessions();
UpDls();
CloseDB();