} } } else { $auth['first_expire_check'] = false; } } 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']; }
} $response->setData($order); $response->returnResponse('order'); } elseif ($object == 'products') { $product = fn_twg_get_api_product_data($_REQUEST['id'], $lang_code); if (empty($product)) { $response->addError('ERROR_OBJECT_WAS_NOT_FOUND', str_replace('[object]', $object, __('twgadmin_object_was_not_found'))); $response->returnResponse(); } $response->setData($product); $response->returnResponse('product'); } elseif ($object == 'users') { if (fn_allowed_for('ULTIMATE')) { $controller = 'profiles'; Registry::set('runtime.controller', 'profiles'); if (!fn_ult_check_store_permission(array('user_id' => $_REQUEST['id']), $controller)) { $notification = reset(fn_get_notifications()); $response->addError('ERROR_OBJECT_WAS_NOT_FOUND', $notification['message']); $response->returnResponse(); } } $user_data = fn_twg_get_user_info($_REQUEST['id']); $response->setData($user_data); $response->returnResponse(); } } } function fn_twg_get_logs($params = array()) { $items_per_page = TWG_RESPONSE_ITEMS_LIMIT; $page = empty($params['page']) ? 1 : $params['page'];