<?php
require "./Cart.php";

$order = mysql_query("SELECT * FROM Orders WHERE OrderNumber = $ON");
list(     $BuyerID, $UserID, $Date, $OrderTotal, $OrderNumber, $OrderStatus,
     $Name, $Address1, $Address2, $City, $State, $Zip, $DayPhone, $EvePhone,
     $Contact, $PayMethod, $CCType, $CCNum, $CCExpire, $OrderOptions
) = mysql_fetch_row($order);
mysql_free_result($order);
$BNa=$Name;
$BA1=$Address1;
$BA2=$Address2;
$BCi=$City;
$BSt=$State;
$BZi=$Zip;
$BDP=$DayPhone;
$BEP=$EvePhone;
$BCo=$Contact;
$BPM=$PayMethod;
$BCT=$CCType;
$BCN=$CCNum;
$BCE=$CCExpire;

$result = mysql_query("SELECT Email FROM Buyers WHERE BuyerID = $BuyerID");
list($bEmail) = mysql_fetch_row($result);
mysql_free_result($result);

$body =   "----------------\n$text\n----------------\n" .
     "Your Order Number $OrderNumber has changed status to $OrderStatus\n" .
     "To further check your order, please take this link\n" .
     "<a href=http://$SERVER_NAME/$PHP_SELF?topic=receipt.php&ON=$OrderNumber&UID=$UserID>http://$SERVER_NAME/$PHP_SELF?topic=receipt.php&ON=$OrderNumber&UID=$UserID</a>\n" .
     "----------------\n" .
     $MailFooter;
Mail($bEmail, "Order Status for Order Number $OrderNumber", $body, "From: $Email");

adminHeader("$Company","Mail Done");

blueFont('Arial', 'Mail Done');

adminFooter($Relative);
?>
