Upcoming Event
Days
Hours
Minutes
Seconds

To



I was saved







<?php
session_start();

ini_set('display_errors', 1);
error_reporting(E_ALL);

define("PRODUCTCODE", 0);
define("PRODUCTNAME", 1);
define("QUANTITY", 2);
define("PRICE", 3);

$itemcount = isset($_SESSION['itemcount']) ? $_SESSION['itemcount'] : 0;
if ($itemcount == 0)
{
header("Location: "."error.php?msg=".rawurlencode("Please add items to your shopping cart before checking out."));
exit;
}

if (!isset($_SESSION['email']))
{
header("Location: "."error.php?msg=".rawurlencode("We did not find your information, please fill the needed information again."));
exit;
}

if( ! ini_get('date.timezone') )
{
date_default_timezone_set('GMT');
}

// create unique order id
$orderid = strtotime("now").$_SERVER['REMOTE_ADDR'];
$orderid = str_replace(".", "", "$orderid");

// get timestamp for this order
$timestamp = date("Y-m-d H:i:s");

// create mail message to customer
$subject = "Powerstone Invoice for order PTS-".$orderid."!";
$title = "Thank you for your order, please keep this message safe, it will serve as your official invoice for now!";
SendEmail($_SESSION['email'], $subject, $title, $orderid, $timestamp, true);

// create mail message to merchant
$subject = "Order confirmation for www.powerstonegh.com";
$title = "The message is sent for your records of a purchase. Please review the purchase below, and fulfill as necessary.";
SendEmail("orders@powerstonegh.com", $subject, $title, $orderid, $timestamp, false);

function SendEmail($mailto, $subject, $title, $orderid, $timestamp, $maskcardno)
{
$header = "From: noreply@powerstonegh.com"."rn";
$header .= "Reply-To: support@powerstonegh.com"."rn";
$header .= "MIME-Version: 1.0"."rn";
$header .= "Content-Type: text/html; charset=iso-8859-1"."rn";
$header .= "Content-Transfer-Encoding: 8bit"."rn";
$header .= "X-Mailer: PHP v".phpversion();

$message = $title."rn"."rn";



$message = '<html><body bgcolor="#E6E6FA">';
$message .= '<table bgcolor="#FFFFFF" border="0" style="width:600px;">';
$message .= "<tr>";
$message .= "<td>"."<img src='https://www.powerstonegh.com/images/paypal.png' alt='Powerstone'>"."<br>"."<center>"."<i>"."Hello ".$_SESSION['fullname'].", thanks so much for the order, this is your invoice containing the records of your recent transaction with us!"."</i>"."</center>"."<br>"."Order ID: PTS-".$orderid."<br>"."Order Date: ".$timestamp."<br>"."<br>"."<strong>"."<i>"."Customer Info"."</i>"."</strong>"."<br>"."Full Name: ".$_SESSION['fullname']."<br>"."Email: ".$_SESSION['email']."<br>"."</td>";


$message .= "</tr>";



$message .= "<td>";
$message .= '<table rules="all" border="1" width= 100%; style="border-color: #666;" cellpadding="10">';
$message .= "<tr style='background: #eee;'>";

$message .= "<td><strong>Product</strong> </td>";

$message .= "<td><strong>Product Description</strong> </td>";

$message .= "<td><strong>Number of Years</strong> </td>";

$message .= "<td><strong>Price</strong></td>";

$message .= "</tr>";


$itemcount = $_SESSION['itemcount'];
$cart = $_SESSION['cart'];

$total = 0;
for ($i=0; $i<$itemcount; $i++)
{


$message .= "<tr>";
$message .= "<td>".$cart[PRODUCTCODE][$i]."</td>";
$message .= "<td>".$cart[PRODUCTNAME][$i]."</td>";
$message .= "<td>".$cart[QUANTITY][$i]."</td>";
$message .= "<td>"."$".number_format($cart[PRICE][$i]*$cart[QUANTITY][$i],2)."</td>";
$message .= "</tr>";

$total = $total + ($cart[PRICE][$i]*$cart[QUANTITY][$i]);
}


$message .= "<tr>";
$message .= "<td>".""."</td>";
$message .= "<td>".""."</td>";
$message .= "<td>"."Order Grand Total"."</td>";
$message .= "<td>"."$".number_format($total)."</td></tr>";
$message .= "</tr>";



$message .= "</table>";

$message .= "<tr>";
$message .= "<td>"."<center>"."Feel free to always contact us through our messaging system should you have any issues, Powerstone, your happiness our priority!"."<br>"."<a href="https://www.powerstonegh.com/hosting.php">"."Hosting"."</a>"." | "."<a href="https://www.powerstonegh.com/webdesign.php">"."Website"."</a>"." | "."<a href="https://www.powerstonegh.com/domaincheck.php">"."Domains"."</a>"."<br>"."<i>"."PTS Technologies (www.powerstonegh.com) support@powerstonegh.com 0271446405"."</i>"."</center>"."</td>";
$message .= "</tr>";
$message .= "</table></body></html>";

mail($mailto, $subject, stripslashes($message), $header);
}

?>
 
3 Comments

😊 😎 πŸ˜ƒ πŸ˜€ 😍 😘 😜 πŸ˜‚ πŸ˜… 😨 😱 😴 😯 πŸ˜‡ 😐 πŸ‘½ 🎩 πŸ’› πŸ’” πŸ’™ πŸ’ͺ πŸ‘ πŸ‘Ž πŸ‘Œ πŸ™ πŸ‘Š πŸ™Œ πŸ‘ πŸ’― πŸŽ‰ πŸŽ„ πŸ”₯ πŸƒ
Load More Comments



Upcoming Event
Days
Hours
Minutes
Seconds

To


Copyright Β© 2021-2025 GEC - Salvation Chapel, All Rights Reserved.
Proudly Made in GhanaπŸ‡¬πŸ‡­ By Powerstone