coreUrlParse($_SERVER['REQUEST_URI']); $GLOBALS['page_id'] = array((isset($_REQUEST['id']) ? $_REQUEST['id'] : '') => ['page' => floatval(0)]); //-- Если пришел вызов на показ ревизии документа if (! empty($_REQUEST['revission'])) { $sql = " SELECT doc_data FROM " . PREFIX . "_document_rev WHERE doc_id = '" . (int)$_REQUEST['id'] . "' AND doc_revision = '" . (int)$_REQUEST['revission'] . "' LIMIT 1 "; $res = $AVE_DB->Query($sql)->GetCell(); $res = @unserialize($res); $flds = get_document_fields((int)$_REQUEST['id'], $res); } //-- Собираем страницу $AVE_Core->coreSiteFetch(get_current_document_id()); Debug::startTime('CONTENT'); $content = ob_get_clean(); if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && (defined('GZIP_COMPRESSION') && GZIP_COMPRESSION)) ob_start('ob_gzhandler'); else ob_start(); eval (' '.'?>' . $content . ' @$GLOBALS['page_id'][$_REQUEST['id']]['page'])) ) OR ( isset($_REQUEST['apage']) && is_numeric($_REQUEST['apage']) && ($_REQUEST['apage'] < 2 OR ($_REQUEST['apage'] > @$GLOBALS['page_id'][$_REQUEST['id']]['apage'])) ) OR ( isset($_REQUEST['artpage']) && is_numeric($_REQUEST['artpage']) && ($_REQUEST['artpage'] < 2 OR ($_REQUEST['artpage'] > @$GLOBALS['page_id'][$_REQUEST['id']]['artpage'])) ) ) ) { if ($_REQUEST['id'] == 1) header ('Location:' . ABS_PATH); else header ('Location:' . ABS_PATH . $AVE_Core->curentdoc->document_alias . URL_SUFF); exit; } //-- Тут заменяем [tag:rubheader] //-- на собранный $GLOBALS["user_header"] $rubheader = (empty($GLOBALS['user_header']) ? '' : implode(chr(10), $GLOBALS['user_header'])); //-- Тут заменяем [tag:rubfooter] //-- на собранный $GLOBALS["user_footer"] $rubfooter = (empty($GLOBALS['user_footer']) ? '' : implode(chr(10), $GLOBALS['user_footer'])); $render = str_replace(['[tag:rubheader]', '[tag:rubfooter]'], [$rubheader, $rubfooter], $render); unset ($rubheader, $rubfooter); $GLOBALS['block_generate']['DOCUMENT']['CONTENT'] = Debug::endTime('CONTENT'); //-- Вывод конечного результата output_compress($render);