protected function process() { $this->_page_title = OSCOM::getDef('heading_title'); if (isset($_GET['id']) && is_numeric($_GET['id'])) { $this->_page_contents = 'zones.php'; $this->_page_title .= ': ' . Countries::get($_GET['id'], 'countries_name'); } }
public static function execute(ApplicationAbstract $application) { if (Countries::deleteZone($_GET['zID'])) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id'])); }
public static function execute(ApplicationAbstract $application) { $data = array('name' => $_POST['countries_name'], 'iso_code_2' => $_POST['countries_iso_code_2'], 'iso_code_3' => $_POST['countries_iso_code_3'], 'address_format' => $_POST['address_format']); if (Countries::save(isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null, $data)) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(OSCOM::getLink()); }
public static function execute(ApplicationAbstract $application) { $data = array('name' => $_POST['zone_name'], 'code' => $_POST['zone_code'], 'country_id' => $_GET['id']); if (Countries::saveZone(isset($_GET['zID']) && is_numeric($_GET['zID']) ? $_GET['zID'] : null, $data)) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } OSCOM::redirect(OSCOM::getLink(null, null, 'id=' . $_GET['id'])); }
public static function execute() { if (!isset($_GET['search'])) { $_GET['search'] = ''; } if (!empty($_GET['search'])) { $result = Countries::findZones($_GET['search'], $_GET['id']); } else { $result = Countries::getAllZones($_GET['id']); } $result['rpcStatus'] = RPC::STATUS_SUCCESS; echo json_encode($result); }
public static function execute(ApplicationAbstract $application) { $error = false; foreach ($_POST['batch'] as $id) { if (!Countries::deleteZone($id)) { $error = true; break; } } if ($error === false) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } OSCOM::redirect(OSCOM::getLink(null, null, 'id=' . $_GET['id'])); }
<?php /* osCommerce Online Merchant $osCommerce-SIG$ Copyright (c) 2010 osCommerce (http://www.oscommerce.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 (1991) as published by the Free Software Foundation. */ use osCommerce\OM\Core\ObjectInfo; use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries; use osCommerce\OM\Core\OSCOM; $OSCOM_ObjectInfo = new ObjectInfo(Countries::getZone($_GET['zID'])); ?> <h1><?php echo $OSCOM_Template->getIcon(32) . osc_link_object(OSCOM::getLink(), $OSCOM_Template->getPageTitle()); ?> </h1> <?php if ($OSCOM_MessageStack->exists()) { echo $OSCOM_MessageStack->get(); } ?> <div class="infoBox"> <h3><?php echo osc_icon('trash.png') . ' ' . $OSCOM_ObjectInfo->getProtected('zone_name'); ?>
<?php /** * osCommerce Online Merchant * * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com * @license BSD License; http://www.oscommerce.com/bsdlicense.txt */ use osCommerce\OM\Core\HTML; use osCommerce\OM\Core\ObjectInfo; use osCommerce\OM\Core\OSCOM; use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries; $OSCOM_ObjectInfo = new ObjectInfo(Countries::get($_GET['id'])); ?> <h1><?php echo $OSCOM_Template->getIcon(32) . HTML::link(OSCOM::getLink(), $OSCOM_Template->getPageTitle()); ?> </h1> <?php if ($OSCOM_MessageStack->exists()) { echo $OSCOM_MessageStack->get(); } ?> <div class="infoBox"> <h3><?php echo HTML::icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('countries_name'); ?> </h3>