Esempio n. 1
0
 */
if (defined('DISABLE_REASON_ADMINISTRATIVE_INTERFACE') ? DISABLE_REASON_ADMINISTRATIVE_INTERFACE : DISABLE_REASON_LOGIN) {
    header('Location: /errors/maintenance.php');
    //?estimate='.$maintenance_estimate );
    die;
}
$f = new AdminPage();
$authenticated = $f->authenticate();
if ($authenticated) {
    $f->init();
    // init returns false if the user cannot be authentication
    if ($f->should_run_api()) {
        $f->run_api();
        exit;
    } else {
        $f->run();
    }
} else {
    if (reason_unique_name_exists('unauthorized_reason_user')) {
        $e = new entity(id_of('unauthorized_reason_user'));
        echo $e->get_value('content');
    } else {
        echo '<p>We\'re sorry, but we do not have any record of you being an authorized Reason user.</p>';
    }
}
$_page_timing_end = getmicrotime();
$page_gen_time = round(1000 * ($_page_timing_end - $_page_timing_start), 0);
echo '<!-- start time: ' . $_page_timing_start . '   end time: ' . $_page_timing_end . '   total time: ' . $page_gen_time . ' ms -->';
reason_log_page_generation_time($page_gen_time);
//echo 'mem usage: '.xdebug_memory_usage().'<br/>';
//xdebug_dump_function_trace();