coreUrlParse($_SERVER['REQUEST_URI']); $GLOBALS['page_id'] = array((isset($_REQUEST['id']) ? $_REQUEST['id'] : '') => array('apage' => floatval(0))); // Если пришел вызов на показ ревизии документа if (! empty($_REQUEST['revission'])) { $res = $AVE_DB->Query(" SELECT doc_data FROM " . PREFIX . "_document_rev WHERE doc_id = '" . (int)$_REQUEST['id'] . "' AND doc_revision = '" . (int)$_REQUEST['revission'] . "' LIMIT 1 ")->GetCell(); $res = @unserialize($res); $flds = get_document_fields((int)$_REQUEST['id'], $res); } // Собираем страницу $AVE_Core->coreSiteFetch(get_current_document_id()); $content = ob_get_clean(); if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && 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'])); $render = str_replace('[tag:rubheader]', $rubheader, $render); //-- Header Engine header('X-Engine: AVE.cms'); header('X-Engine-Copyright: 2007-' . date('Y') . ' (c) AVE.cms'); header('X-Engine-Site: https://ave-cms.ru'); //Вывод статистики загрузки и запросов SQL (только для администраторов) if (! defined('ONLYCONTENT') && UGROUP == 1 && defined('PROFILING') && PROFILING) $render .= get_statistic(1, 1, 1, 1); //Вывод конечного результата gzip_compress($render); ?>