function _setData() { global $osC_Database, $osC_Language; $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . ' <thead>' . ' <tr>' . ' <th>' . $osC_Language->get('summary_error_log_table_heading_date') . '</th>' . ' <th>' . $osC_Language->get('summary_error_log_table_heading_message') . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>'; $counter = 0; foreach (osc_toObjectInfo(osC_ErrorLog_Admin::getAll())->get('entries') as $log) { $this->_data .= ' <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . ' <td style="white-space: nowrap;">' . osc_icon('error.png') . ' ' . osc_output_string_protected($log['date']) . '</td>' . ' <td>' . osc_output_string_protected(substr($log['message'], 0, 60)) . '..</td>' . ' </tr>'; $counter++; if ($counter == 6) { break; } } $this->_data .= ' </tbody>' . '</table>'; }
public static function find($search) { global $osC_Database; $in_group = array(); foreach (osc_toObjectInfo(self::getAllGroups())->get('entries') as $group) { $in_group[] = $group['configuration_group_id']; } $result = array('entries' => array()); $Qcfg = $osC_Database->query('select * from :table_configuration where (configuration_key like :configuration_key or configuration_value like :configuration_value) and configuration_group_id in (:configuration_group_id) order by configuration_key'); $Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION); $Qcfg->bindValue(':configuration_key', '%' . $search . '%'); $Qcfg->bindValue(':configuration_value', '%' . $search . '%'); $Qcfg->bindRaw(':configuration_group_id', implode(',', $in_group)); $Qcfg->execute(); while ($Qcfg->next()) { $result['entries'][] = $Qcfg->toArray(); if (!osc_empty($Qcfg->value('use_function'))) { $result['entries'][sizeof($result['entries']) - 1]['configuration_value'] = osc_call_user_func($Qcfg->value('use_function'), $Qcfg->value('configuration_value')); } } $result['total'] = $Qcfg->numberOfRows(); $Qcfg->freeResult(); return $result; }
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\OSCOM; use osCommerce\OM\Core\Site\Admin\Application\Languages\Languages; use osCommerce\OM\Core\Site\Admin\Application\Currencies\Currencies; use osCommerce\OM\Core\ObjectInfo; $languages_array = array(array('id' => '0', 'text' => OSCOM::getDef('none'))); foreach (osc_toObjectInfo(Languages::getAll(-1))->get('entries') as $l) { if ($l['languages_id'] != $_GET['id']) { $languages_array[] = array('id' => $l['languages_id'], 'text' => $l['name'] . ' (' . $l['code'] . ')'); } } $currencies_array = array(); foreach (osc_toObjectInfo(Currencies::getAll(-1))->get('entries') as $c) { $currencies_array[] = array('id' => $c['currencies_id'], 'text' => $c['title']); } $OSCOM_ObjectInfo = new ObjectInfo(Languages::get($_GET['id'])); ?> <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(); } ?>
<?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\Languages\Languages; use osCommerce\OM\Core\OSCOM; $OSCOM_ObjectInfo = new ObjectInfo(Languages::get($_GET['id'])); $groups_array = array(); foreach (osc_toObjectInfo(Languages::getGroups($OSCOM_ObjectInfo->getInt('languages_id')))->get('entries') as $group) { $groups_array[] = array('id' => $group['content_group'], 'text' => $group['content_group']); } ?> <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(); } ?>
public static function export($id, $groups, $include_language_data = true) { $language = self::get($id); $export_array = array(); if ($include_language_data === true) { $export_array['language']['data'] = array('title-CDATA' => $language['name'], 'code-CDATA' => $language['code'], 'locale-CDATA' => $language['locale'], 'character_set-CDATA' => $language['charset'], 'text_direction-CDATA' => $language['text_direction'], 'date_format_short-CDATA' => $language['date_format_short'], 'date_format_long-CDATA' => $language['date_format_long'], 'time_format-CDATA' => $language['time_format'], 'default_currency-CDATA' => Currencies::get($language['currencies_id'], 'code'), 'numerical_decimal_separator-CDATA' => $language['numeric_separator_decimal'], 'numerical_thousands_separator-CDATA' => $language['numeric_separator_thousands']); if ($language['parent_id'] > 0) { $export_array['language']['data']['parent_language_code'] = self::get($language['parent_id'], 'code'); } } foreach (osc_toObjectInfo(self::getDefinitions($id, $groups))->get('entries') as $def) { $export_array['language']['definitions']['definition'][] = array('key' => $def['definition_key'], 'value-CDATA' => $def['definition_value'], 'group' => $def['content_group']); } $xml = XML::fromArray($export_array, $language['charset']); header('Content-disposition: attachment; filename=' . $language['code'] . '.xml'); header('Content-Type: application/force-download'); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . strlen($xml)); header('Pragma: no-cache'); header('Expires: 0'); echo $xml; exit; }
<?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. */ $zones_array = array(); foreach (osc_toObjectInfo(osC_ZoneGroups_Admin::getAll(-1))->get('entries') as $group) { $zones_array[] = array('id' => $group['geo_zone_id'], 'text' => $group['geo_zone_name']); } ?> <h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?> </h1> <?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } ?>
public static function updateRates($service) { global $osC_Database; $updated = array('0' => array(), '1' => array()); foreach (osc_toObjectInfo(self::getAll(-1))->get('entries') as $currency) { $rate = call_user_func('quote_' . $service . '_currency', $currency['code']); if (!empty($rate)) { $Qupdate = $osC_Database->query('update :table_currencies set value = :value, last_updated = now() where currencies_id = :currencies_id'); $Qupdate->bindTable(':table_currencies', TABLE_CURRENCIES); $Qupdate->bindValue(':value', $rate); $Qupdate->bindInt(':currencies_id', $currency['currencies_id']); $Qupdate->setLogging($_SESSION['module'], $currency['currencies_id']); $Qupdate->execute(); $updated[1][] = array('title' => $currency['title'], 'code' => $currency['code']); } else { $updated[0][] = array('title' => $currency['title'], 'code' => $currency['code']); } } osC_Cache::clear('currencies'); return $updated; }
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> <?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } ?>
<?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">
<?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } ?> <div style="padding-bottom: 10px;"> <span><form id="liveSearchForm"><input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><input type="button" value="Reset" class="operationButton" onclick="osC_DataTable.reset();" /></form></span> </div> <div id="infoPane" class="ui-corner-all" style="float: left; width: 150px;"> <ul> <?php foreach (osc_toObjectInfo(osC_Configuration_Admin::getAllGroups())->get('entries') as $group) { echo '<li id="cfgGroup' . (int) $group['configuration_group_id'] . '" style="list-style: circle;">' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&gID=' . (int) $group['configuration_group_id']), osc_output_string_protected($group['configuration_group_title'])) . '</li>'; } ?> </ul> </div> <script type="text/javascript"><!-- $('#cfgGroup<?php echo (int) $_GET['gID']; ?> ').css('listStyle', 'disc').find('a').css({'fontWeight': 'bold', 'textDecoration': 'none'}); //--></script>
<?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\Site\Admin\Application\Languages\Languages; use osCommerce\OM\Core\OSCOM; $groups_array = array(); foreach (osc_toObjectInfo(Languages::getDefinitionGroups($_GET['id']))->get('entries') as $value) { $groups_array[] = $value['content_group']; } ?> <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
/* $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. */ $osC_ObjectInfo = new osC_ObjectInfo(osC_Languages_Admin::get($_GET['lID'])); $groups_array = array(); foreach (osc_toObjectInfo(osC_Languages_Admin::getDefinitionGroups($osC_ObjectInfo->getInt('languages_id')))->get('entries') as $group) { $groups_array[] = array('id' => $group['content_group'], 'text' => $group['content_group']); } ?> <h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?> </h1> <?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } ?>
public static function updateRates($service) { $OSCOM_Database = Registry::get('Database'); $updated = array('0' => array(), '1' => array()); foreach (osc_toObjectInfo(self::getAll(-1))->get('entries') as $currency) { $rate = call_user_func('quote_' . $service . '_currency', $currency['code']); if (!empty($rate)) { $Qupdate = $OSCOM_Database->query('update :table_currencies set value = :value, last_updated = now() where currencies_id = :currencies_id'); $Qupdate->bindValue(':value', $rate); $Qupdate->bindInt(':currencies_id', $currency['currencies_id']); $Qupdate->setLogging(null, $currency['currencies_id']); $Qupdate->execute(); $updated[1][] = array('title' => $currency['title'], 'code' => $currency['code']); } else { $updated[0][] = array('title' => $currency['title'], 'code' => $currency['code']); } } Cache::clear('currencies'); return $updated; }
<?php foreach ($osC_Language->getAll() as $l) { echo $osC_Language->showImage($l['code']) . '<br />' . osc_draw_textarea_field('value[' . $l['id'] . ']') . '<br />'; } ?> </div> <div> <div style="width: 35%; float: left;"><label for="group"><?php echo $osC_Language->get('field_definition_group'); ?> </label> <?php $groups_array = array(); foreach (osc_toObjectInfo(osC_Languages_Admin::getDefinitionGroups($_GET[$osC_Template->getModule()]))->get('entries') as $value) { $groups_array[] = array('id' => $value['content_group'], 'text' => $value['content_group']); } if (!empty($groups_array)) { echo osc_draw_pull_down_menu('group', $groups_array); } ?> </div> <div style="width: 35%; float: left;"><label for="group_new"><?php echo $osC_Language->get('field_definition_new_group'); ?> </label><?php echo osc_draw_input_field('group_new'); ?> </div>