Example #1
0
    chdir(dirname($_tao_path));
    unset($uri);
    unset($p);
    unset($m);
    include $_tao_path;
    die;
}
if (isset($GLOBALS['tao_urlrewrited'])) {
    die;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/local/vendor/techart/bitrix.tao/include/prolog_before.php';
$GLOBALS['tao_urlrewrited'] = true;
$uri = $_SERVER['REQUEST_URI'];
$script = $_SERVER['PHP_SELF'];
chdir($_SERVER['DOCUMENT_ROOT']);
\TAO\Urls::processVars();
$content = \TAO\Bundle::routeBundles();
if (is_string($content)) {
    if (is_string(\TAO::$layout)) {
        $prolog = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_after.php";
        $epilog = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php";
        if (\TAO::$layout == 'admin') {
            $prolog = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_admin.php";
            $epilog = $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin.php";
        }
        require $prolog;
        if (\TAO::$compositeContent) {
            $frame = \TAO::compositeFrame(\TAO::$compositeContent);
            $stub = trim(\TAO::$compositeStub);
            $stub = strlen($stub) > 0 ? $stub : \TAO::t('composite_loading');
            $frame->begin($stub);