public static function execute() { if (!isset($_GET['search'])) { $_GET['search'] = ''; } if (!isset($_GET['page']) || !is_numeric($_GET['page'])) { $_GET['page'] = 1; } if (!empty($_GET['search'])) { $result = ZoneGroups::find($_GET['search'], $_GET['page']); } else { $result = ZoneGroups::getAll($_GET['page']); } $result['rpcStatus'] = RPC::STATUS_SUCCESS; echo json_encode($result); }
<?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\ZoneGroups\ZoneGroups; $zones_array = array(); foreach (ObjectInfo::to(ZoneGroups::getAll(-1))->get('entries') as $group) { $zones_array[] = array('id' => $group['geo_zone_id'], 'text' => $group['geo_zone_name']); } ?> <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
<?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\ZoneGroups\ZoneGroups; use osCommerce\OM\Core\OSCOM; $zones_array = array(); foreach (osc_toObjectInfo(ZoneGroups::getAll(-1))->get('entries') as $group) { $zones_array[] = array('id' => $group['geo_zone_id'], 'text' => $group['geo_zone_name']); } ?> <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">