Leitgedanken/msd2/myoos/includes/blocks/block_currencies.php
2023-01-23 11:03:31 +01:00

54 lines
1.7 KiB
PHP

<?php
/* ----------------------------------------------------------------------
MyOOS [Shopsystem]
https://www.oos-shop.de
Copyright (c) 2003 - 2019 by the MyOOS Development Team.
----------------------------------------------------------------------
Based on:
File: currencies.php,v 1.16 2003/02/12 20:27:31 hpdl
----------------------------------------------------------------------
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
----------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined( 'OOS_VALID_MOD' ) OR die( 'Direct Access to this location is not allowed.' );
$currency_block = FALSE;
if (isset($oCurrencies) && is_object($oCurrencies)) {
reset($oCurrencies->currencies);
$aCurrencies = array();
foreach($oCurrencies->currencies as $sKey => $value) {
$aCurrencies[] = array('id' => $sKey, 'text' => $value['title']);
}
if (count($aCurrencies) >= 2) {
$currency_block = TRUE;
$currency_get_parameters = oos_get_all_get_parameters(array('language', 'currency'));
$currency_all_get_parameters = oos_remove_trailing($currency_get_parameters);
$smarty->assign('currencies_contents', $aCurrencies);
$smarty->assign('currency_get_parameters', $currency_all_get_parameters);
} else {
$blockstable = $oostable['block'];
$dbconn->Execute("UPDATE " . $blockstable . "
SET block_status = 0
WHERE block_file = 'currencies'");
}
}
$smarty->assign('currency_block', $currency_block);