if (empty($postcode_location_id)) { $suffix = ".manage"; } else { $suffix = ".update?postcode_location_id={$postcode_location_id}"; } } if ($mode == 'delete') { if (!empty($_REQUEST['postcode_location_id'])) { fn_delete_postcode_location($_REQUEST['postcode_location_id']); } $suffix = '.manage'; } return array(CONTROLLER_STATUS_OK, 'postcode_checker' . $suffix); } if ($mode == 'manage') { list($postcode_locations, $search) = fn_get_postcode_locations($_REQUEST, Registry::get('settings.Appearance.admin_elements_per_page'), DESCR_SL); //Tygh::$app['view']->assign('sl_settings', fn_get_postcode_locator_settings()); Tygh::$app['view']->assign('postcode_locations', $postcode_locations); Tygh::$app['view']->assign('search', $search); } elseif ($mode == 'add') { // [Page sections] Registry::set('navigation.tabs', array('detailed' => array('title' => __('general'), 'js' => true), 'addons' => array('title' => __('addons'), 'js' => true))); // [/Page sections] } elseif ($mode == 'update') { $postcode_location = fn_get_postcode_location($_REQUEST['postcode_location_id'], DESCR_SL); if (empty($postcode_location)) { return array(CONTROLLER_STATUS_NO_PAGE); } Tygh::$app['view']->assign('postcode_location', $postcode_location); // [Page sections] $tabs = array('detailed' => array('title' => __('general'), 'js' => true), 'addons' => array('title' => __('addons'), 'js' => true));
<?php /*************************************************************************** * * * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev * * * * This is commercial software, only users who have purchased a valid * * license and accept to the terms of the License Agreement can install * * and use this program. * * * **************************************************************************** * PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE * * "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. * ****************************************************************************/ use Tygh\Registry; if (!defined('BOOTSTRAP')) { die('Access denied'); } if ($mode == 'search') { fn_add_breadcrumb(__('postcode_locator')); list($postcode_locations, $search) = fn_get_postcode_locations($_REQUEST); //Tygh::$app['view']->assign('sl_settings', fn_get_postcode_locator_settings()); Tygh::$app['view']->assign('postcode_locations', $postcode_locations); Tygh::$app['view']->assign('postcode_locator_search', $search); }