Query(" SELECT sysblock_text FROM " . PREFIX . "_sysblocks WHERE " . (is_numeric($id) ? 'id' : 'sysblock_alias') . " = '" . $id . "' LIMIT 1 ")->GetCell(); if ($cache_file) file_put_contents($cache_file, $return); } //-- парсим теги $search = array( '[tag:mediapath]', '[tag:path]', '[tag:docid]' ); $replace = array( ABS_PATH . 'templates/' . ((defined('THEME_FOLDER') === false) ? DEFAULT_THEME_FOLDER : THEME_FOLDER) . '/', ABS_PATH, get_current_document_id() ); $return = str_replace($search, $replace, $return); $return = preg_replace_callback('/\[tag:home]/', 'get_home_link', $return); $return = preg_replace_callback('/\[tag:breadcrumb]/', 'get_breadcrumb', $return); $return = preg_replace_callback('/\[tag:request:([A-Za-z0-9-_]{1,20}+)\]/', 'request_parse', $return); if (isset($_REQUEST['id']) && $_REQUEST['id'] != '') { //-- парсим теги полей документа в шаблоне рубрики $return = preg_replace_callback('/\[tag:fld:([a-zA-Z0-9-_]+)\]/', 'document_get_field', $return); $return = preg_replace_callback('/\[tag:([r|c|f|t|s]\d+x\d+r*):(.+?)]/', 'callback_make_thumbnail', $return); } $return = preg_replace_callback('/\[tag:block:([A-Za-z0-9-_]{1,20}+)\]/', 'parse_block', $return); if ($eval_sysblock) $return = eval2var('?'.'>' . $return . '<'.'?'); $gen_time = Debug::endTime('SYSBLOCK_' . $id); $GLOBALS['block_generate']['SYSBLOCK'][$id] = $gen_time; return $return; } } ?>