} if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (fn_allowed_for('ULTIMATE')) { fn_ult_parse_request($_REQUEST); } return; } list($static, $actions, $selected_items) = BackendMenu::instance(Registry::get('runtime.controller'), Registry::get('runtime.mode'))->generate($_REQUEST); Registry::set('navigation', array('static' => $static, 'dynamic' => array('actions' => $actions), 'selected_tab' => $selected_items['section'], 'subsection' => $selected_items['item'])); if (fn_allowed_for('ULTIMATE')) { if (!fn_ult_check_store_permission($_REQUEST, $redirect_controller)) { return array(CONTROLLER_STATUS_REDIRECT, $redirect_controller . '.manage'); } } // Navigation is passed in view->display method to allow its modification in controllers Tygh::$app['view']->assign('quick_menu', fn_get_quick_menu_data()); // update request history // save only current and previous page requests in history if (!defined('AJAX_REQUEST')) { $current_dispatch = Registry::get('runtime.controller') . '.' . Registry::get('runtime.mode'); if (!empty($_SESSION['request_history']['current']['dispatch'])) { $hist_dispatch = !empty($_SESSION['request_history']['current']['dispatch']) ? $_SESSION['request_history']['current']['dispatch'] : ''; if ($hist_dispatch != $current_dispatch) { // replace previously saved reuest if new page is opened $_SESSION['request_history']['prev'] = $_SESSION['request_history']['current']; } } $_SESSION['request_history']['current'] = array('dispatch' => $current_dispatch, 'params' => $_REQUEST); } // generate breadcrumbs $prev_request = !empty($_SESSION['request_history']['prev']['params']) ? $_SESSION['request_history']['prev']['params'] : array();
foreach ($_REQUEST as $var_name => $var_value) { $context_vars['%' . strtoupper($var_name)] = $var_value; } $context_vars['%CONTROLLER'] = CONTROLLER; $context_vars['%MODE'] = MODE; $context_vars['%INDEX_SCRIPT'] = $index_script; foreach ($actions as $item) { if (empty($item) || !empty($item['extra']) && strpos(Registry::get('config.current_url'), (string) $item['extra']) === false) { continue; } $_cache[] = (string) $item['title']; $navigation['dynamic']['actions'][(string) $item['title']] = array('href' => strtr((string) $item['href'], $context_vars), 'meta' => !empty($item['meta']) ? (string) $item['meta'] : '', 'target' => !empty($item['target']) ? (string) $item['target'] : ''); } fn_preload_lang_vars($_cache); // Navigation is passed in view->display method to allow its modification in controllers $view->assign('quick_menu', fn_get_quick_menu_data()); $schema = fn_get_schema('last_edited_items', 'schema'); $last_items_cnt = LAST_EDITED_ITEMS_COUNT; if (empty($_SESSION['last_edited_items'])) { $stored_items = fn_get_user_additional_data('L'); $last_edited_items = empty($stored_items) ? array() : $stored_items; $_SESSION['last_edited_items'] = $last_edited_items; } else { $last_edited_items = $_SESSION['last_edited_items']; } $last_items = array(); foreach ($last_edited_items as $_k => $v) { if (!empty($v['func'])) { $func = array_shift($v['func']); if (function_exists($func)) { $content = call_user_func_array($func, $v['func']);
} if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (fn_allowed_for('ULTIMATE')) { fn_ult_parse_request($_REQUEST); } return; } list($static, $actions, $selected_items) = BackendMenu::instance(Registry::get('runtime.controller'), Registry::get('runtime.mode'))->generate($_REQUEST); Registry::set('navigation', array('static' => $static, 'dynamic' => array('actions' => $actions), 'selected_tab' => $selected_items['section'], 'subsection' => $selected_items['item'])); if (fn_allowed_for('ULTIMATE')) { if (!fn_ult_check_store_permission($_REQUEST, $redirect_controller)) { return array(CONTROLLER_STATUS_REDIRECT, $redirect_controller . '.manage'); } } // Navigation is passed in view->display method to allow its modification in controllers Registry::get('view')->assign('quick_menu', fn_get_quick_menu_data()); // update request history // save only current and previous page requests in history if (!defined('AJAX_REQUEST')) { $current_dispatch = Registry::get('runtime.controller') . '.' . Registry::get('runtime.mode'); if (!empty($_SESSION['request_history']['current']['dispatch'])) { $hist_dispatch = !empty($_SESSION['request_history']['current']['dispatch']) ? $_SESSION['request_history']['current']['dispatch'] : ''; if ($hist_dispatch != $current_dispatch) { // replace previously saved reuest if new page is opened $_SESSION['request_history']['prev'] = $_SESSION['request_history']['current']; } } $_SESSION['request_history']['current'] = array('dispatch' => $current_dispatch, 'params' => $_REQUEST); } // generate breadcrumbs $prev_request = !empty($_SESSION['request_history']['prev']['params']) ? $_SESSION['request_history']['prev']['params'] : array();