<?php
/*
  $Id: currencies.php,v 1.2 2006/07/16 05:09:34 ryu Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
  
  modified for Koshoten.net2
  http://www.koshoten.net/
*/

  if (isset($currencies) && is_object($currencies)) {
?>
<!-- currenciesBox -->
<?php
    $cssid = 'currenciesBox';
    $infobox_header = BOX_HEADING_CURRENCIES;

    reset($currencies->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($currencies->currencies)) {
      $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }

    $hidden_get_variables = '';
    reset($_GET);
    while (list($key, $value) = each($_GET)) {
      if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
        $hidden_get_variables .= tep_draw_hidden_field($key, $value);
      }
    }

    $infobox_contents = array();
    $infobox_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'),
                                 'text' => tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();"') . $hidden_get_variables . tep_hide_session_id());

    new infoBox($cssid, $infobox_contents, $infobox_header);
?>
<!-- /currenciesBox -->
<?php
  }
?>
