$buffer = str_replace('<wbr />', '­', $buffer); } if (strpos($buffer, '<textarea') && _TYPE_ == 'ajax') { return $buffer; } return str_replace(array("\t", " ", "\n", "\r", "<!--br-->"), array("", " ", "", "", "\n"), $buffer); } include_once ROOT_DIR . SL . 'engine' . SL . 'backwards_compatibility.php'; mb_internal_encoding('UTF-8'); if (strpos($_SERVER["REQUEST_URI"], 'art/download') === false && !strpos($_SERVER["REQUEST_URI"], '/rss/') && _TYPE_ != 'cron' && _TYPE_ != 'api' && !(_TYPE_ == 'ajax' && $_GET['f'] == 'download')) { ob_start('myoutput'); } include_once ROOT_DIR . SL . 'engine' . SL . 'config.php'; def::import($def); if (!def::site('domain')) { def::set('site', 'domain', $_SERVER['SERVER_NAME']); } define('SITE_DIR', str_replace(array('/', '\\'), SL, rtrim(def::site('dir'), '/'))); if (def::site('domain') != $_SERVER['SERVER_NAME'] && _TYPE_ != 'cron' && !empty($_SERVER['REMOTE_ADDR']) && $_SERVER['SERVER_NAME'] != 'upload.4otaku.org') { engine::redirect('http://' . $def['site']['domain'] . $_SERVER["REQUEST_URI"], true); } if (_TYPE_ != 'cron' && _TYPE_ != 'api') { $check = new check_values(); include_once ROOT_DIR . SL . 'engine' . SL . 'twig_init.php'; } if (_TYPE_ != 'cron') { list($get, $post) = query::get_globals($_GET, $_POST); } include_once ROOT_DIR . SL . 'engine' . SL . 'metafunctions.php'; // Тут мы работаем с сессиями if (_TYPE_ != 'cron' && _TYPE_ != 'api') {