public static function getAll() { if (!isset($_GET['search'])) { $_GET['search'] = ''; } if (!isset($_GET['page']) || !is_numeric($_GET['page'])) { $_GET['page'] = 1; } if (!empty($_GET['search'])) { $result = osC_Languages_Admin::find($_GET['search'], $_GET['page']); } else { $result = osC_Languages_Admin::getAll($_GET['page']); } $result['rpcStatus'] = RPC_STATUS_SUCCESS; echo json_encode($result); }
<?php /* $Id: $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2009 osCommerce 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. */ $languages_array = array(array('id' => '0', 'text' => $osC_Language->get('none'))); foreach (osc_toObjectInfo(osC_Languages_Admin::getAll(-1))->get('entries') as $l) { if ($l['languages_id'] != $_GET['lID']) { $languages_array[] = array('id' => $l['languages_id'], 'text' => $l['name'] . ' (' . $l['code'] . ')'); } } $currencies_array = array(); foreach (osc_toObjectInfo(osC_Currencies_Admin::getAll(-1))->get('entries') as $c) { $currencies_array[] = array('id' => $c['currencies_id'], 'text' => $c['title']); } $osC_ObjectInfo = new osC_ObjectInfo(osC_Languages_Admin::get($_GET['lID'])); ?> <h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?> </h1>