MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b2680/childrendccom.domain.com/client_access/
File Upload :
Current < : /hermes/sb_web/b2680/childrendccom.domain.com/client_access/order_details.php

<?php
session_start();
include("../includes/database.php");
include("../functions/functions.php");

if(!$_SESSION["customer_email"]){
	header("location: ../checkout.php?error=Please-Provide-Your-Login-Details-Thanks.");
}else{

$user_a = @$_SESSION["customer_email"];

$user_ip_a = getIp();

$get_user_a = "select * from customers where customer_email = '$user_a' AND customer_ip = '$user_ip_a'";
$run_user_a = mysqli_query($con, $get_user_a);
$row_a = mysqli_fetch_array($run_user_a);

$cust_id_a = $row_a["customer_id"];
$cust_name_a = $row_a["customer_name"];
$cust_image_a = $row_a["customer_image"];
$cust_email_a = $row_a["customer_email"];
$cust_pass_a = $row_a["customer_pass"];
$cust_address_a = $row_a["customer_address"];
$cust_gender_a = $row_a["customer_gender"];
$cust_location_a = $row_a["customer_location"];
$cust_phone_a = $row_a["customer_phone"];

?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $cust_name_a; ?>'s Order Details | <?php echo $comp_title; ?></title>

<?php include("includes/head.php"); ?>

</head> 
<body class="cbp-spmenu-push">
<div class="main-content">
	
	<!--left-fixed -navigation-->
	<div class=" sidebar" role="navigation">
		<div class="navbar-collapse">
			<?php include("includes/menu.php"); ?>
		</div>
	</div>
	<!--left-fixed -navigation-->
	
	<!-- header-starts -->
		<?php include("includes/header.php"); ?>
	<!-- //header-ends -->
	
	<!-- main content start-->
	<div id="page-wrapper">
		<div class="main-page">
		
			<div class="grid_3 grid_5 widget-shadow">
				<h3 class="hdg"><?php echo $cust_name_a; ?>'s Order Details</h3><hr />
				
				<div class="">
					<table class='table table-responsive table-bordered'>
						<tr align='center'>
							<td width="10%"><b>Invoice No.</b></td>
							<td width="25%"><b>Prod. Name</b></td>
							<td width="20%"><b>Prod. Image</b></td>
							<td width="15%"><b>Qty</b></td>
							<td width="15%"><b>Price</b></td>
							<td width="15%"><b>Total</b></td>
						</tr>
						
					<?php
						
						$inv_number = $_GET['order_details'];
						$inv_number = base64_decode($inv_number);
						
						$get_orders = "select * from pending_orders where invoice_no = '$inv_number'";
						$run_orders = mysqli_query($con, $get_orders);
						while($row_inv = mysqli_fetch_array($run_orders)){
							
							$produ_id = $row_inv["product_id"];
							$pro_qty = $row_inv["quantity"];
							
							$qu = "select * from product where product_id = '$produ_id'";
							$run_qu = mysqli_query($con, $qu);
							$row_qu = mysqli_fetch_array($run_qu);
							
							$prod_name = $row_qu["product_name"];
							$prod_image = $row_qu["product_image"];
							$prod_price = $row_qu["product_price"];
							
							$actual_price = $prod_price * $pro_qty;
							
							$prod_price = number_format((float) $prod_price);
							$actual_price = number_format((float) $actual_price);
							
							echo "
									
									<tr align='center'>
										<td>#<b>$inv_number</b></td>
										<td><b>$prod_name</b></td>
										<td><img src='../images/product_images/$prod_image' width='50' height='50' /></td>
										<td><b>$pro_qty</b></td>
										<td><b>$currency $prod_price</b></td>
										<td><b>$currency $actual_price</b></td>
									</tr>
									
								";
							
						}

					?>
					</table>
				</div>
				
				<div class="well">
					<center><a href="my_orders.php" class="btn btn-primary">Click to Go Back</a></center>
				</div>
			</div>
			
			<div class="clearfix"> </div>
		</div>
	</div>
	<!--footer-->
	<?php include("includes/footer.php"); ?>
	<!--//footer-->
</div>

</body>
</html>
<?php } ?>