<?php 
require_once("header.php");
require_once("session_check.php");

//FETCH DATA FROM DATABASE
$fetch_record = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `sc_orders` WHERE `order_id` = '".$_REQUEST['order_id']."'"));
$fetch_user = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `sc_users` WHERE `user_id` = '".$fetch_record['user_id']."'"));
$fetch_service = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `sc_services` WHERE `service_id` = '".$fetch_record['service_id']."'"));
?>

<?php require_once("left_panel.php");?>
<div class="content">
	<div class="workplace">
		<div class="row-fluid">
			<div class="span12">
				<div class="head clearfix">
					<div class="isw-documents"></div>					
					<h1>Customer Details</h1>					
				</div>
				<form action="" method="post" enctype="multipart/form-data">
				<div class="block-fluid">
					<div class="row-form clearfix">
						<div class="span3">Order ID</div>
						<div class="span9"><?php echo stripslashes($fetch_record['orderid']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Name</div>
						<div class="span9"><?php echo stripslashes($fetch_user['full_name']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Phone No.</div>
						<div class="span9"><?php echo stripslashes($fetch_user['phone']);?></div>                            
					</div>
					<div class="row-form clearfix">
						<div class="span3">Email Address</div>
						<div class="span9"><?php echo stripslashes($fetch_user['email']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Address</div>
						<div class="span9"><?php echo stripslashes($fetch_user['address']);?></div> 
					</div>
					<div class="row-form clearfix">
						<div class="span3">Landmark</div>
						<div class="span9"><?php echo stripslashes($fetch_user['landmark']);?></div> 
					</div>
					<div class="row-form clearfix">
						<div class="span3">City</div>
						<div class="span9"><?php echo stripslashes($fetch_user['city']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">State</div>
						<div class="span9"><?php echo stripslashes($fetch_user['state']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Pincode</div>
						<div class="span9"><?php echo stripslashes($fetch_user['zip']);?></div> 
					</div>
				</div>
				<div>&nbsp;</div>
				<div class="head clearfix">
					<div class="isw-documents"></div>					
					<h1>Order Details</h1>					
				</div>
				<div class="block-fluid">
					<div class="row-form clearfix">
						<div class="span3">Service</div>
						<div class="span9"><?php echo stripslashes($fetch_service['service_name']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Service Type</div>
						<div class="span9"><?php echo stripslashes($fetch_record['service_type']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Consultation Payment Receipt</div>
						<div class="span9"><a href="../uploads/payment_receipt/<?php echo $fetch_record['payment_receipt'];?>" target="_blank">Click To Open</a></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Total Cost</div>
						<div class="span9">Rs. <?php echo stripslashes($fetch_record['price']);?></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">Deduct From Wallet</div>
						<div class="span9">Rs. 0.00</div>
					</div>
					<div class="row-form clearfix">
						<div class="span3"><b>Grand Total</b></div>
						<div class="span9"><b>Rs. <?php echo stripslashes($fetch_record['price']);?></b></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3"><b>Order Date</b></div>
						<div class="span9"><b><?php echo date('d.m.Y h:i A',strtotime($fetch_record['post_date']));?></b></div>
					</div>
					<div class="row-form clearfix">
						<div class="span3">&nbsp;</div>
						<div class="span9">						
							<button class="btn" type="button" name="back" onclick="window.location.href='order_list.php'">Back To Orders List</button>
						</div>
					</div>
				</div>
				</form>
			</div>
		</div>
	</div>
</div> 

<?php require_once("footer.php"); ?>