Пример #1
0
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache-Control: no-cache, no-store, must-revalidate");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
header("X-UA-Compatible: IE=edge");
// Force IE document mode
// Show errors to admin
ini_set("display_errors", CAppUI::pref("INFOSYSTEM"));
CMbPerformance::mark("headers");
$user = new CMediusers();
if ($user->isInstalled()) {
    $user->load(CAppUI::$instance->user_id);
    $user->getBasicInfo();
    CAppUI::$user = $user;
    CAppUI::$instance->_ref_user =& CAppUI::$user;
    CApp::$is_robot = CAppUI::$user->isRobot();
    // Offline mode for non-admins
    if ($dPconfig["offline_non_admin"] && CAppUI::$user->_id != 0 && !CAppUI::$user->isAdmin()) {
        CApp::goOffline("maintenance");
    }
}
CMbPerformance::mark("user");
// Load DB-stored configuration schema
$configurations = glob(__DIR__ . "/modules/*/configuration.php");
foreach ($configurations as $_configuration) {
    include $_configuration;
}
CMbPerformance::mark("config");
// Init output filter