<?
/***************************************************************************
 *			print_receipt.php                                  *
 *                                                                         *  
 *									   *
 *   File Info:		  Print receipt                                    *
 *   Copyright:       Copyright 2003 http://www.128concepts.com            *
 *						                           *
 ***************************************************************************/
include ("./config.php");
include ("./tests.php");
$PHPSESSID = session_id();
if ($_SERVER['REQUEST_METHOD'] == "POST") 
{
        # escape data and set variables
        $orderid = addslashes($_POST["orderid"]); 
        $full_name = addslashes($_POST["full_name"]); 
        $email = addslashes($_POST["email"]); 
        $address1 = addslashes($_POST["address1"]); 
        $address2 = addslashes($_POST["address2"]); 
        $city = addslashes($_POST["city"]); 
        $postcode = addslashes($_POST["postcode"]); 
        $phone = addslashes($_POST["phone"]); 
        $pay_type= addslashes($_POST["pay_type"]); 
        $shipzone = addslashes($_POST["shipzone"]);
        $scurrency = addslashes($_POST["scurrency"]);
        $verify = addslashes($_POST["verify"]);
}

if ($wcurrency != "NO")
$oldcurrency = $scurrency;

########## error trap user's clicking wrong choice ############

if ($verify == $shipzone)
{

}
else
{
	include_once("./your-header.inc");
	echo "<br><center><img src=images/bullets.gif border=0><font face=verdana size=2>Opps....Shipping Zone does not match verified shipping zone of '$verify'....<br>Please go back and reinput the correct shipping zone to print the correct details !!!</font></center>";
	include_once("./your-footer.inc");
	exit();
}
$table= "myorders";
$sel_item_totalprice = $sel_item_qty * $sel_item_price;
$conn = @mysql_connect($server,$user,$password)
	or die("Unable to connect to SQL database...");
$rs = @mysql_select_db($database,$conn) 
	or die("Unable to select the database 'mydata'...Please press 'Create Database' to create new database.");
$get_itemtot = "SELECT SUM(SEL_ITEM_TOTALPRICE) FROM $table
		WHERE USER_ID = '$PHPSESSID'";

		if ($scurrency == "cad") $currency = "$";
		if ($scurrency == "aud") $currency = "$";
		if ($scurrency == "usd") $currency = "$";
		if ($scurrency == "gbp") $currency = "£";
		if ($scurrency == "jpy") $currency = "¥";
		if ($scurrency == "eur") $currency = "€";
$itemtot_result = mysql_query($get_itemtot) 
	or die("SQL command failed - Couldn't get total");

$itemtot = mysql_result($itemtot_result,0,"SUM(SEL_ITEM_TOTALPRICE)");
$fmt_itemtot = sprintf("%0.2f",$itemtot);
	
############## non-sql ################
if ($itemtot < $min_cost && $usedata == "NO")
{
	$shipping = $shipcost;
} else 
{
	$shipping = 0;
}

############## non-sql ################
if ($itemtot < $mincost && $usedata == "YES")
{
	$shipping = $shipcost;
} else 
{
	$shipping = 0;
}
########## store shipping inside variable ########

$oldship = $shipping;

##################################################
$fmt_shipping = sprintf("%0.2f",$shipping);
$subtotal = $itemtot + $shipping;
$fmt_subtotal = sprintf("%0.2f",$subtotal);
$get_cart = "SELECT SEL_ITEM, SEL_ITEM_TITLE, SEL_ITEM_QTY, SEL_ITEM_PRICE, 
		SEL_ITEM_TOTALPRICE FROM $table
		WHERE USER_ID = \"$PHPSESSID\"";

$cart_result = mysql_query($get_cart)
	or die("SQL command failed - Couldn't get cart.");
$num_rows = mysql_numrows($cart_result);

################################# Generate a receipt #######################################################

?>

<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">
<HTML>
<HEAD>
<TITLE>Print Order Confirmation</TITLE>
</HEAD>
<BODY bgcolor = #FFFFFF>
<?php
include_once("./header-only.inc");
echo "
<center><img src=images/order-confirm.gif border=0 height=32></center>
<center><p align=justify><img src=images/online-order.gif border=0><font face=verdana size=2>This is copy of your order receipt. Use order number when contacting us!</font></center><br>";

# generate your company details

if ($usedata == "YES")
{
$add = "<table border=0 cellspacing=0 cellpadding=5 align = center>";
$add.="<tr><td><strong><font face=verdana size=2>Company:</font<</strong></td><td><font face=verdana size=2>$sitecompany</font></td></tr>";
$add.= "<tr><td><strong><font face=verdana size=2>Address:</font></strong></td><td><font face=verdana size=2>$siteaddress</font></td></tr>";
$add.= "<tr><td><strong><font face=verdana size=2>City/Town:</font></strong></td><td><font face=verdana size=2>$sitetown</font></td></tr>";
if ($scurrency = "usd")
	$add.= "<tr><td><strong><font face=verdana size=2>State:</font></strong></td><td><font face=verdana size=2>$sitecounty</font></td></tr>";
else
	$add.= "<tr><td><strong><font face=verdana size=2>Country:</font></strong></td><td><font face=verdana size=2>$sitecounty</font></td></tr>";
if ($scurrency ="usd")
	$add.="<tr><td><strong><font face=verdana size=2>Zip Code:</font></strong></td><td><font face=verdana size=2>$sitepostcode</font></td></tr>";
else
	$add.="<tr><td><strong><font face=verdana size=2>Post Code:</font></strong></td><td><font face=verdana size=2>$sitepostcode</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>Country:</font></strong></td><td><font face=verdana size=2>$sitecountry</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>Company Number:</font></strong></td><td><font face=verdana size=2>$sitetel</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>Company Email:</font></strong></td><td><font face=verdana size=2>$siteemail</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>URL:</font></strong></td><td><font face=verdana size=2>$site_url</font></td></tr>";
$add.="<tr><td><strong>";
$add.= "</table>";
}
if ($usedata == "NO")
{
$add = "<table border=0 cellspacing=0 cellpadding=5 align = center>";
$add.= "<tr><td><strong><font face=verdana size=2>Company:</font></strong></td><td><font face=verdana size=2>$site_company</font></td></tr>";
$add.= "<tr><td><strong><font face=verdana size=2>Address:</font></strong></td><td><font face=verdana size=2>$site_address</font></td></tr>";
$add.= "<tr><td><strong><font face=verdana size=2>City/Town:</font></strong></td><td><font face=verdana size=2>$site_town</font></td></tr>";
if ($site_currency = "usd")
	$add.= "<tr><td><strong><font face=verdana size=2>State:</font></strong></td><td><font face=verdana size=2>$site_county</font></td></tr>";
else
	$add.= "<tr><td><strong><font face=verdana size=2>County:</strong></td><td><font face=verdana size=2>$site_county</font></td></tr>";
if ($site_currency ="usd")
	$add.="<tr><td><strong><font face=verdana size=2>Zip Code:</font></strong></td><td><font face=verdana size=2>$site_postcode</font></td></tr>";
else
	$add.="<tr><td><strong><font face=verdana size=2>Post Code:</font></strong></td><td><font face=verdana size=2>$site_postcode</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>Country:</font></strong></td><td><font face=verdana size=2>$site_country</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>Company Number:</font></strong></td><td><font face=verdana size=2>$site_tel</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>Company Email:</font></strong></td><td><font face=verdana size=2>$site_email</font></td></tr>";
$add.="<tr><td><strong><font face=verdana size=2>URL:</font></strong></td><td><font face=verdana size=2>$site_url</font></td></tr>";
$add.="<tr><td><strong>";
$add.= "</table><br>";
}
echo $add;

$date_added = date("jS M, Y");
# generate invoice/delivey information

echo "<br><center><font color = navy face=verdana size=5>Invoice And Deliver To:</font></center><img src=images/line.gif border=0 width=100% height=1>
	<table border=0 cellspacing=0 cellpadding=5 align = center>

<tr>
<td><strong><font face=verdana size=2>Full Name:</font></strong></td>
<td><font face=verdana size=2>$full_name</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>E-Mail Address:</font></strong></td>
<td><font face=verdana size=2>$email</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>Address Line 1:</font></strong></td>
<td><font face=verdana size=2>$address1</font></td>
</tr>


<tr>
<td><strong><font face=verdana size=2>Address Line 2:</font></strong></td>
<td><font face=verdana size=2>$address2</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>City:</font></strong></td>
<td><font face=verdana size=2>$city</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>Post/Zip Code:</font></strong></td>
<td><font face=verdana size=2>$postcode</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>Payment Type:</font></strong></td>
<td><font face=verdana size=2>$pay_type</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>Contact Number:</font></strong></td>
<td><font face=verdana size=2>$phone</font></td>
</tr>

<tr>
<td><strong><font face=verdana size=2>Date:</font></strong></td><td><font face=verdana size=2>$date_added</font></td></tr>

<tr><td><strong><font face=verdana size=2>Order Number:</font></strong></td><td><font face=verdana size=2>$orderid</font></td></tr>
</table><img src=images/line.gif border=0 width=100% height=1>";

if ($fmt_itemtot > 0){
echo "<center><img src=images/cart-contents.gif border=0 height=32></center>

<table border=0 cellpadding=10 cellspacing=0 align = center bgcolor=$backcolor>

<tr>
<td align=center><strong><font face=verdana size=2>ITEM</font></strong></td>
<td align=center><strong><font face=verdana size=2>TITLE</font></strong></td>
<td align=center><strong><font face=verdana size=2>QTY</font></strong></td>
<td align=center><strong><font face=verdana size=2>ITEM PRICE</font></strong></td>
<td align=center width=100><strong><font face=verdana size=2>TOTAL COST</font></strong></td>
</tr>

";

while ($row = mysql_fetch_array($cart_result)) {

	$sel_item = $row["SEL_ITEM"];
	$sel_item_title = $row["SEL_ITEM_TITLE"];	
	$sel_item_qty = $row["SEL_ITEM_QTY"];
	$sel_item_price = $row["SEL_ITEM_PRICE"];
	$sel_item_price = number_format($sel_item_price,2);
	$sel_item_totalprice = $row["SEL_ITEM_TOTALPRICE"];
	$fmt_item_totalprice = sprintf("%0.2f",$sel_item_totalprice);
	$tables = "stocks";
	$get_carts = "SELECT size,color from $tables where (sitem like '$sel_item' or sitem like '$sel_item_title')";
	$carts = @mysql_query($get_carts,$conn)
		or die("Unable to get product and stock information for shopping cart....");
	
	$prow = mysql_fetch_array($carts);
	$color = $prow["color"];
	$size = $prow["size"];
	if ($wcurrency == "NO")
	{
		echo "
		<tr>
		<td><font face=verdana size=2>$sel_item color:$color size:$size</font></td>
		<td><font face=verdana size=2>$sel_item_title</font></td>
		<td align=right><font face=verdana size=2>$sel_item_qty</font<</td>
		<td align=right><font face=verdana size=2>($currency) $sel_item_price</font></td>
		<td align=right><font face=verdana size=2>($currency) $fmt_item_totalprice</font></td>	
		</tr>
		";
	}
	else
	{
		echo "
		<tr>
		<td><font face=verdana size=2>$sel_item color:$color size:$size</font></td>
		<td><font face=verdana size=2>$sel_item_title</font></td>
		<td align=right><font face=verdana size=2>$sel_item_qty</font<</td>
		<td align=right><font face=verdana size=2>($wcurrency) $sel_item_price</font></td>
		<td align=right><font face=verdana size=2>($wcurrency) $fmt_item_totalprice</font></td>	
		</tr>
		";
	}
	$items .= "$sel_item_qty $sel_item ($sel_item_title) at $sel_item_price each\n";
	
}
	######## normal currency #######

	if ($wcurrency == "NO")
	{
	#### shipping option shipping calculation ####

		if ($shipopt != "NO")
		{
			$table = "myorders";
			$get_carts = "SELECT SEL_ITEM, SEL_ITEM_TITLE, SEL_ITEM_QTY, SEL_ITEM_PRICE, SEL_ITEM_TOTALPRICE FROM $table WHERE USER_ID =  '$PHPSESSID'";

			$cart_results = mysql_query($get_carts)
			or die("SQL command failed - Couldn't get cart.");
			$sitems = array();
			$sqty = array();
			$count = 0;
			$shiptotal = 0;
			$shiptotals = 0;
			while ($row = mysql_fetch_array($cart_results)) 
			{
				$sel_item = $row["SEL_ITEM"];
				$sel_item_qty = $row["SEL_ITEM_QTY"];
				$sitems[$count] = $sel_item;
				$sqty[$count] = $sel_item_qty;
				$count += 1;
			}
		

			$i = 0;
			foreach ($sitems as $value)
			{
				$table = "stocks";
				$sqls = "SELECT * from $table where sitem = '$value'";
				$get_cats = mysql_query($sqls)
				or die("SQL command failed - Couldn't get category for item.");
				while ($frow = mysql_fetch_array($get_cats))
				{
					$category = $frow["scat"];
				}
				$table = "shipopts";
				$sql1 = "SELECT * from $table where shipitem = '$category'";
				$get_ship = mysql_query($sql1)
				or die("SQL command failed - Couldn't get shipping price for item.");
				while ($rows = mysql_fetch_array($get_ship))
				{
					$iprice = $rows["shipitemprice"];
				}
				$sqt = $sqty[$i] * $iprice;
				$shiptotals = $shiptotals + $sqt;
				$i++;
			}
			$shiptotal = $shiptotals + $shiprates;
			$ship = $shiptotal;
			if ($wcurrency != "NO")
			{
				if ($scurrency == "gbp")
				{
					$tship = $ship * $conv1;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "usd")
				{
					$tship = $ship * $conv2;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "eur")
				{
					$tship = $ship * $conv3;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "jpy")
				{
					$tship = $ship * $conv4;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "cad")
				{
					$tship = $ship * $conv1;
					$tship = number_format($tship,2);
				}
				$ship = $tship;
			}
		}
	if ($shipopt == "NO") {
	echo "
	<tr>
	<td colspan=4 align=right><strong><font face=verdana size=2>Item Total:</font></strong></td>
	<td align=right><strong><font face=verdana size=2>$currency $fmt_itemtot</font></strong></td></tr>

	<tr><td colspan=4 align=right><strong><font face=verdana size=2>Shipping:</font></strong></td>
	<td align=right>";
	
		if ($shipping != "0") {
			echo "<strong><font face=verdana size=2>$currency $fmt_shipping</font></strong>";
		} else {
			echo "<strong><font face=verdana size=2>FREE!</font></strong>";
		}
	
	echo "
	</td></tr>

	<tr><td colspan=4 align=right><strong><font face=verdana size=2>Subtotal:</font></strong></td>
	<td align=right><strong><font face=verdana size=2>$currency $fmt_subtotal</font></strong></td></tr>

	<tr><td colspan=5 align=center><strong><font color = $highlight face=verdana>THANK YOU FOR YOUR ORDER!</font></strong></td></tr>

	</table>"; }

	if ($shipopt == "YES")
	{
		echo "
	<tr>
	<td colspan=4 align=right><strong><font face=verdana size=2>Item Total:</font></strong></td>
	<td align=right><strong><font face=verdana size=2>$currency $fmt_itemtot</font></strong></td></tr>

	<tr><td colspan=4 align=right><strong><font face=verdana size=2>Shipping:</font></strong></td>
	<td align=right>";
	echo "<strong><font face=verdana size=2>$currency $shiptotal</font></strong>";
	$fmt_subtotal = $fmt_itemtot + $shiptotal;
	$fmt_subtotal = number_format($fmt_subtotal,2);
	echo "
	</td></tr>

	<tr><td colspan=4 align=right><strong><font face=verdana size=2>Subtotal:</font></strong></td>
	<td align=right><strong><font face=verdana size=2>$currency $fmt_subtotal</font></strong></td></tr>

	<tr><td colspan=5 align=center><strong><font color = $highlight face=verdana>THANK YOU FOR YOUR ORDER!</font></strong></td></tr>

	</table>";
	}
echo ("<br><font face=verdana size=2 color=darkgreen>We recommend you use the browser's PRINT button to print this invoice receipt. Then press the BACK button on the browser to continue payment processing your order.</font>");
exit();
}else
		{

			
	echo "
	<tr>
	<td colspan=4 align=right><font face=verdana size=2><strong>Item Total:</strong></font></td>
	<td align=right><strong><font face=verdana size=2>($wcurrency) $fmt_itemtot</font></strong></td>";
	$scurrency = $oldcurrency;
	if ($scurrency == "gbp")
	{	
		$convert = $fmt_itemtot * $conv1;	
		$convert = number_format($convert,2);
		echo "<tr><td colspan=4 align=right><strong><font face=verdana size=2>Item Total: $currency</font></strong></td>
		<td align=right>";
		echo "<font size = 2 face = Verdana><center>$currency$convert</center></font></td></tr>";
	}	
	if ($scurrency == "usd")
	{
		$convert = $fmt_itemtot * $conv2;
		$convert = number_format($convert,2);
		echo "<tr><td colspan=4 align=right><strong><font face=verdana size=2>Item Total: $currency</font></strong></td>
		<td align=right>";
		echo "<font size = 2 face = Verdana><center>$currency$convert</center></font></td></tr>";
	}
	if ($scurrency == "eur")
	{
		$convert = $fmt_itemtot * $conv3;
		$convert = number_format($convert,2);
		echo "<tr><td colspan=4 align=right><strong><font face=verdana size=2>Item Total: $currency</font></strong></td>
		<td align=right>";
		echo "<font size = 2 face = Verdana><center>$currency$convert</center></font></td></tr>";
	}
	if ($scurrency == "jpy")
	{
		$convert = $fmt_itemtot * $conv4;
		$convert = number_format($convert,2);
		echo "<tr><td colspan=4 align=right><strong><font face=verdana size=2>Item Total: $currency</font></strong></td>
		<td align=right>";
		echo "<font size = 2 face = Verdana><center>$currency$convert</center></font></td></tr>";
	}
	if ($scurrency == "cad")
	{
		$convert = $fmt_itemtot * $conv5;
		$convert = number_format($convert,2);
		echo "<tr><td colspan=4 align=right><strong><font face=verdana size=2>Item Total: $currency</font></strong></td>
		<td align=right>";
		echo "<font size = 2 face = Verdana><center>$currency$convert</font></td></tr>";
	}

	echo "<tr><td colspan=4 align=right><strong><font face=verdana size=2>Shipping: </font></strong></td>
	<td align=right>";
	}	
		$shipping = $oldship;
		
		#### non-shipping option shipping calculation ####

		if ($shipopt == "NO"){
		if ($shipping != "0") 
		{
			if ($wcurrency == "NO")
			{
				echo "<strong>$currency $fmt_shipping</strong>";
			}
			else
			{	# calculations for shipping in world currency
				
				############## zone 1 ################
				if ($shipzone == "zone1" && $scurrency == "gbp") 
					$ship = $conv1 * $zone1;	
				if ($shipzone == "zone1" && $scurrency == "usd") 
					$ship = $conv2 * $zone1;	
				if ($shipzone == "zone1" && $scurrency == "eur") 
					$ship = $conv3 * $zone1;	
				if ($shipzone == "zone1" && $scurrency == "jpy") 
					$ship = $conv4 * $zone1;	
				if ($shipzone == "zone1" && $scurrency == "cad") 
					$ship = $conv5 * $zone1;	
				
				############## zone 2 ################
				if ($shipzone == "zone2" && $scurrency == "gbp") 
					$ship = $conv1 * $zone2;	
				if ($shipzone == "zone2" && $scurrency == "usd") 
					$ship = $conv2 * $zone2;	
				if ($shipzone == "zone2" && $scurrency == "eur") 
					$ship = $conv3 * $zone2;	
				if ($shipzone == "zone2" && $scurrency == "jpy") 
					$ship = $conv4 * $zone2;	
				if ($shipzone == "zone2" && $scurrency == "cad") 
					$ship = $conv5 * $zone2;	

				############## zone 3 ################
				if ($shipzone == "zone3" && $scurrency == "gbp") 
					$ship = $conv1 * $zone3;	
				if ($shipzone == "zone3" && $scurrency == "usd") 
					$ship = $conv2 * $zone3;	
				if ($shipzone == "zone3" && $scurrency == "eur") 
					$ship = $conv3 * $zone3;	
				if ($shipzone == "zone3" && $scurrency == "jpy") 
					$ship = $conv4 * $zone3;	
				if ($shipzone == "zone3" && $scurrency == "cad") 
					$ship = $conv5 * $zone3;				
				$ship = number_format($ship,2);
				echo "<center><font size = 2 face = Verdana>$currency$ship</font></center>";
		
			}
		} else 
		{
			echo "<center><strong><font face=verdana size=2>FREE!</font></strong></center>";
		}
		}

		#### shipping option shipping calculation ####

		if ($shipopt != "NO")
		{
			$table = "myorders";
			$get_carts = "SELECT SEL_ITEM, SEL_ITEM_TITLE, SEL_ITEM_QTY, SEL_ITEM_PRICE, SEL_ITEM_TOTALPRICE FROM $table WHERE USER_ID =  '$PHPSESSID'";

			$cart_results = mysql_query($get_carts)
			or die("SQL command failed - Couldn't get cart.");
			$sitems = array();
			$sqty = array();
			$count = 0;
			$shiptotal = 0;
			$shiptotals = 0;
			while ($row = mysql_fetch_array($cart_results)) 
			{
				$sel_item = $row["SEL_ITEM"];
				$sel_item_qty = $row["SEL_ITEM_QTY"];
				$sitems[$count] = $sel_item;
				$sqty[$count] = $sel_item_qty;
				$count += 1;
			}
		

			$i = 0;
			foreach ($sitems as $value)
			{
				$table = "stocks";
				$sqls = "SELECT * from $table where sitem = '$value'";
				$get_cats = mysql_query($sqls)
				or die("SQL command failed - Couldn't get category for item.");
				while ($frow = mysql_fetch_array($get_cats))
				{
					$category = $frow["scat"];
				}
				$table = "shipopts";
				$sql1 = "SELECT * from $table where shipitem = '$category'";
				$get_ship = mysql_query($sql1)
				or die("SQL command failed - Couldn't get shipping price for item.");
				while ($rows = mysql_fetch_array($get_ship))
				{
					$iprice = $rows["shipitemprice"];
				}
				$sqt = $iprice;
				$shiptotals = $shiptotals + $sqt;
				$i++;
			}
			$shiptotal = $shiptotals + $shiprates;
			$ship = $shiptotal;
			if ($wcurrency == "NO")
			echo "<center><font size = 2 face = Verdana>$currency$ship</font></center>";
			if ($wcurrency != "NO")
			{
				if ($scurrency == "gbp")
				{
					$tship = $ship * $conv1;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "usd")
				{
					$tship = $ship * $conv2;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "eur")
				{
					$tship = $ship * $conv3;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "jpy")
				{
					$tship = $ship * $conv4;
					$tship = number_format($tship,2);
				}
				if ($scurrency == "cad")
				{
					$tship = $ship * $conv1;
					$tship = number_format($tship,2);
				}
				$ship = $tship;
				echo "<center><font size = 2 face = Verdana>$currency$ship</font></center>";
			}
		}
		$fmt_subtotal = $convert + $ship;
		$fmt_subtotal = number_format($fmt_subtotal,2);
		echo "
		</td></tr>
		<tr><td colspan=4 align=right><strong><font color=navy face=verdana size=2>Subtotal:</font></strong></td>
		<td align=right><center><font size = 2 face = Verdana>$currency $fmt_subtotal</font></center></td></tr>
		<tr><td colspan=5 align=center><strong><font color = $highlight>THANK YOU FOR YOUR ORDER!</font></strong></td></tr>
		</table>";
	}
	else
	{
		echo("<br><br><center><font face = verdana size = 5 color = $highlight>You have no items in your shopping cart !!!</font></center>");
	}

	echo ("<br><br><p align=justify><img src=images/bullets.gif border=0><font face=verdana size=2>We recommend you use the browser's PRINT button to print this invoice receipt. Then press the BACK button on the browser to continue payment processing your order.</font></p>");
?>
</BODY>
</HTML>