<?php
// if no order id defined in the session
// redirect to main page
if (!isset($_SESSION['orderId'])) {
/* header('Location: ' . WEB_ROOT); */
echo "<script>location.href='http://www.uigapersonalportal.com'</script>";
exit;
}
//$orderId = (int)$_GET['oid'];
$orderId = $_SESSION['orderId'];
$sqlOrderInfo = "SELECT *
FROM tbl_order o, tbl_order_item oi, tbl_product p
WHERE o.od_id = '$orderId'
AND oi.od_id = o.od_id
AND p.pd_id = oi.pd_id";
$resultOrderInfo = dbQuery($sqlOrderInfo);
$Info = dbFetchAssoc($resultOrderInfo);
$name = $Info['od_shipping_first_name']." ".$Info['od_shipping_last_name'];
//$product_name = $Info['pd_name'];
//$product_desc = $Info['pd_description'];
//$price = $Info[' pd_price'];
//$qty = $Info['od_qty'];
$email = $Info['od_shipping_email'];
//$total = $qty * $price;
//$link ="http://www.uigapersonalportal.com/index.php?view=account_verification&id=$id";
$heading = "UigaFanClub ITEM ORDER";
$link = "http://www.uigapersonalportal.com/order_details.php?oid=$orderId";
$sendto = $email; // this is the email address collected from the form
$ccto = "hide@address.com"; //you can cc it to yourself
$subject = "UigaFanClub Item Order"; // Subject
$message = "$heading\n\nHello, $name!\n\nPlease click the link below for your order status.\n$link";
$header = "From: UigaFanClub <hide@address.com>\r\n";
$header .= "Reply-to: hide@address.com\r\n";
// This is the function to send the email
mail($sendto, $subject, $message, $header);
/*
$orderId = $_GET['id'];
$sqlOrderInfo = "SELECT *
FROM tbl_order o, tbl_order_item oi, tbl_product p
WHERE o.od_id = '$orderId'
AND oi.od_id = o.od_id
AND p.pd_id = oi.pd_id";
$resultOrderInfo = dbQuery($sqlOrderInfo);
$Info = dbFetchAssoc($resultOrderInfo);
$name = $Info['od_shipping_first_name']." ".$Info['od_shipping_last_name'];
//$product_name = $Info['pd_name'];
//$product_desc = $Info['pd_description'];
//$price = $Info[' pd_price'];
//$qty = $Info['od_qty'];
$email = $Info['od_shipping_email'];
//$total = $qty * $price;
//$link ="http://www.uigapersonalportal.com/index.php?view=account_verification&id=$id";
$heading = "UigaFanClub ITEM ORDER";
$link = "http://www.uigapersonalportal.com/order_details.php?oid=$orderId";
$sendto = $email; // this is the email address collected from the form
$ccto = "hide@address.com"; //you can cc it to yourself
$subject = "UigaFanClub Item Order"; // Subject
$message = "$heading\n\nHello, $name!\n\nPlease click the link below for your order status.\n$link";
$header = "From: UigaFanClub <hide@address.com>\r\n";
$header .= "Reply-to: hide@address.com\r\n";
// This is the function to send the email
mail($sendto, $subject, $message, $header); */
//mail($ccto);
/* // send notification email
if ($shopConfig['sendOrderEmail'] == 'y') {
$subject = "[New Order] " . $_SESSION['orderId'];
$email = $shopConfig['email'];
$message = "You have a new order. Check the order detail here \n http://" . $_SERVER['HTTP_HOST'] . WEB_ROOT . 'admin/order/index.php?view=detail&oid=' . $_SESSION['orderId'] ;
mail($email, $subject, $message, "From: $email\r\nReturn-path: $email");
}
*/
//SendEmailOrderInfo();
unset($_SESSION['orderId']);
?>
<table width="440" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="boldblacktext"><p> </p>
<p>Thank you for shopping with us! We will send the purchased
item(s) immediately. The order details was sent to the following e-mail address, <u><?php echo $email;?></u>. To continue shopping please <a href="index2.php?view=categoryList" id="link">click
here</a></p>
<p> </p></td>
</tr>
</table>