<?php
/***************************************************************************
 *			thanks.php                        	           *
 *                     	          				           *
 *   File Info:		  Thank you page                                   *
 *   Copyright:       Copyright 2003 http://www.128concepts.com            *
 *						                           *
 ***************************************************************************/
include ("config.php");
include ("./your-header.inc");
include ("./tests.php");

if ($_SERVER['REQUEST_METHOD'] == "POST") 
{
        # escape data and set variables
        $paypal = addslashes($_POST["item_number"]);
	  $nochex = addslashes($_POST["ordernumber"]);
	  if ($paypal)
		$order_id = $paypal;
	  if ($nochex)
		$order_id = $nochex;
 
}

if($order_id)
{
echo"<p align=\"center\"><br><br>Thank you for your order!<br><b>Cart order id:</b> $order_id<br><b></p><p align=\"center\">Please state you order id with any correspondence concerning your order.<br></p>";

# part that update and set customer order as been paid !!!!!

$table= "history";
$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.");

$sql = "UPDATE $table set stat = 'payment received' where orderid = '$order_id'";
$updme = mysql_query($sql,$conn);
echo("<br><center><font color = $highlight>We have updated your customer history to show that your order '$order_id' - payment has been received....</font></center>");

}

echo"
 <p align=justify style=word-spacing: 0; line-height: 100%; margin-left: 35; margin-right: 10; margin-top: 0; margin-bottom: 0><font face=Verdana>Thank you for placing your order 
      with $sitecompany. You will receive an email confirmation to inform you of 
      dispatch date once we receive payment from you. Please note the actual 
      time your order be dispatched is dependent on us ($sitecompany) has 
      confirmation your payment has been received.</font></p>
<p align=justify style=word-spacing: 0; line-height: 100%; margin-left: 35; margin-right: 10; margin-top: 0; margin-bottom: 0><font face=Verdana>We
      will deliver your order by Royal Mail First Class post and normally
      delivery times vary from 1 to 2 working days. If you wish to contact us
      with any enquiry regarding your order, please direct your email to <a href=mailto:$admin_sales> $admin_sales</a>. </font></p>
<p align=justify style=word-spacing: 0; line-height: 100%; margin-left: 35; margin-right: 10; margin-top: 0; margin-bottom: 0><font face=Verdana>If your order is not received or has 
      not reached you after you receive your email message confirming the 
      dispatch date. Please be patient as posting service sometimes can be 
      delayed. If you do not receive your order after 7 working days. Please 
      send us am email message with your order invoice number, your name, 
      address and email to us. We will send you replacement order to your 
      delivery address. We thank you for your custom and any we will answer any
      technical / sales queries via email or snail mail. Note answers via snail 
      mail may take longer. We will answer all email queries within 48 hours. 
      You can try our forum and post your queries within the forum.</font></p>
<p align=justify style=word-spacing: 0; line-height: 100%; margin-left: 35; margin-right: 10; margin-top: 0; margin-bottom: 0>&nbsp;</p>
<p align=justify><font face=Verdana>Press the <b>'home'</b>button to return to the EZ Shopper main store.</font><a href=./store.php><img border=0 src=./images/home_button.gif width=60 height=24></a> </p>
";
include("./your-footer.inc");

?>