コード例 #1
0
ファイル: system.php プロジェクト: nilshendriks/kirbycms
// load the rest of the system
load::lib();
load::config();
load::parsers();
load::plugins();
// check for an exisiting content dir
if (!is_dir(c::get('root.content'))) {
    die('The Kirby content directory could not be found');
}
// check for an exisiting site dir
if (!is_dir(c::get('root.site'))) {
    die('The Kirby site directory could not be found');
}
// set the timezone to make sure we
// avoid errors in php 5.3
@date_default_timezone_set(c::get('timezone'));
// switch on errors
if (c::get('debug')) {
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
} else {
    error_reporting(0);
    ini_set('display_errors', 0);
}
if (c::get('troubleshoot')) {
    require_once c::get('root.kirby') . '/modals/troubleshoot.php';
    exit;
}
$site = new site();
$site->load();
コード例 #2
0
ファイル: index.php プロジェクト: kronius/vidpro
    } else {
        $GLOBALS['Jlib_need_cache'] = $cf;
    }
}
if (!Jlib_USE_CACHE || !empty($GLOBALS['Jlib_need_cache'])) {
    if (!empty($_REQUEST['JsHttpRequest'])) {
        require_once "lib/JsHttpRequest.php";
        $JsHttpRequest = new JsHttpRequest("utf-8");
        $GLOBALS['result'] =& $_RESULT;
        define('AJAX', true);
    } else {
        define('AJAX', false);
    }
    // создали сайт
    $site = new site();
    // сделали все включения
    while (!$site->load()) {
        while ($inc = inc()) {
            include_once $inc;
        }
    }
    // сделали все включения и пропарсили до полного удовлетворения
    while (!$site->get_parsed()) {
        while ($inc = inc()) {
            include_once $inc;
        }
    }
    $_SESSION['tiny_mce'] = !empty($_SESSION['Jlib_auth']['admin_auth']);
    // Ну и коронный номер на бис:
    $site->show();
}