<?php
/*
  $Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $

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

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
//get currencies value
//echo "dddd=".$currency;
	$currency_value = 0;
	$sql_c = "SELECT	currencies.value AS curGBP FROM currencies 	WHERE currencies.code = '".$currency."'";
	$result_c=mysql_query( $sql_c )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql_c = " . htmlentities($sql_c) );
	$row_c = mysql_fetch_array( $result_c );
	$currency_value=$row_c['curGBP'];
//get currencies value end
//echo "ddd==ddd=".$currency_value;


	$itemhand_value = 0;
	$itemhand_round_value=0;
	$itemhand_round_value_str="";
	$sql_ih = "select configuration_value from configuration where configuration_key='MODULE_SHIPPING_ITEM_COST'";
	$result_ih=mysql_query( $sql_ih )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql_ih = " . htmlentities($sql_ih) );
	$row_ih = mysql_fetch_array( $result_ih );
	$itemhand_value=$row_ih['configuration_value'];
//echo "itemhand_value=".$itemhand_value;
$itemhand_round_value=round($itemhand_value*$currency_value,2);
if ($currency=='USD')
{
	$itemhand_round_value_str="$ ".round($itemhand_round_value,2);
}
else
{
	$itemhand_round_value_str=$currency." ".$itemhand_round_value;
}
//echo "itemhand_round_value=".$itemhand_round_value;

	$itemcost_value = 0;
	$itemcost_round_value = 0;
	$itemcost_round_value_str="";
	$sql_ic = "select configuration_value from configuration where configuration_key='MODULE_SHIPPING_ITEM_HANDLING'";
	$result_ic=mysql_query( $sql_ic )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql_ic = " . htmlentities($sql_ic) );
	$row_ic = mysql_fetch_array( $result_ic );
	$itemcost_value=$row_ic['configuration_value'];

//echo "itemcost=".$itemcost_value;
$itemcost_round_value=round(($itemcost_value+$itemhand_value)*$currency_value,2);
if ($currency=='USD')
{
	$itemcost_round_value_str="$ ".$itemcost_round_value;
}
else
{
	$itemcost_round_value_str=$currency." ".$itemcost_round_value;
}
?>
<!-- shopping_cart //-->
<div class="nav_right">
<h3>::Low Shipping::</h3>
<div id="shippingrate">
<ul>
<li><?=BOX_LOWERSHIPPING_FIRST?> </li>
<li><?=$itemcost_round_value_str?></li>
</ul>
<ul>
<li><?=BOX_LOWERSHIPPING_ADD?></li>
<li><?=$itemhand_round_value_str?></li>
</ul>
</div>

</div>
<!-- shopping_cart_eof //-->
