$_SESSION['back_param'] = $_REQUEST; // Template $mode = isset($_GET['mode']) ? $_GET['mode'] : 'home'; Fx::context()->mode = $mode; $php = 'template/php/' . $mode . '.php'; $tpl = 'template/tpl/' . $mode . '.html'; Fx::ext()->compile(); require_once 'template/main.php'; if (isset($_GET['extension']) && $_GET['extension'] !== '') { $mode = $_GET['extension']; } define('mode', $mode); $extView = ''; $extController = ''; /** Загружаем расширения для страниц */ $ext = Fx::ext()->get('page'); Fx::context()->extensionMenu = array(); if (count($ext)) { foreach ($ext as $v) { if (isset($v['param']['name'])) { Fx::context()->extensionMenu[$v['param']['code']] = $v['param']['name']; } if ($mode === $v['param']['code']) { if (isset($v['param']['view'])) { $extView = $v['url'] . $v['param']['view']; } if (isset($v['param']['controller'])) { $extController = $v['url'] . $v['param']['controller']; } if (isset($v['param']['static']) && is_array($v['param']['static'])) { $extPath = str_replace(root, '', $v['url']);