  <style>
@media (min-width: 200px) {
.Profile-container{
	padding:0px 0px;
} 	
}
@media (min-width: 600px) {
.Profile-container{
	padding:5% 5%;
} 	
}
@media (min-width: 990px) and (max-width: 1799px) {
.Profile-container{
	padding:0% 10%;
} 
}

@media (min-width: 1800px) {  


.Profile-container{
	padding:0px 15%;
} 
}

.Profile-order{
	
	background-color:#f6f6f6;
	padding:5px;
	border:1px solid #e0e0e0;
	position:relative;
	box-sizing: border-box;
	float:inherit;
	font-size:15px;
}

.Profile-title-xs{
	
	background-color:#D8FAFF;
	padding:10px;
	border:1px solid #e0e0e0;
	position:relative;
	box-sizing: border-box;
	float:inherit;
	font-size:15px;
	font-weight:bold
}

.Profile-info-xs{
	
	background-color:#f6f6f6;
	padding:10px;
	border:1px solid #e0e0e0;
	position:relative;
	box-sizing: border-box;
	float:inherit;
	font-size:15px;
}


.Profile{
	margin:20px 0px;
	}
	
.Profile-list-xs{
	padding:0px 0px;
	margin-bottom:10px}
	
	.Profile-xs{
	margin:20px 0px;
		padding:0px 0px
	}


.table-l{
	font-size:15px;
	width:40%;
	font-weight:bold
}

.table-mar{
	font-size:15px;
	width:60%;
}

.table-m{
	font-size:15px;
	width:40%;
}

.table-r{
	font-size:15px;
	width:40%;
}

.Profile-in-r{
	background:#FFFFFF;
	border:1px solid #e0e0e0;
	border-radius: 5px;
}

.rp-info{
	padding:20px 0px;
	}
	
.
	
/*@media (min-width: 200px) {
.btn-center{
	padding:20px 18%;
} 	
}
@media (min-width: 600px) and (max-width: 990px) {
.btn-center{
	padding:20px 37%;
} 	
}
@media (min-width: 990px) and (max-width: 1799px) {
.btn-center{
	padding:20px 42%;
} 
}

@media (min-width: 1800px) {  

.btn-center{
	padding:20px 45%;
} 
}*/


  </style>
  
  
  <?php 
  if(isset($_SESSION["username"])){
  $query="select * from orders where username='".$_SESSION["username"]."' and record='".$_GET["order"]."'";
  $result=mysqli_query($conn,$query);
  $row=mysqli_fetch_assoc($result);
  
	if($row["status"]=='bank'){$status='Bank Transfer';$status1='Pending';$status2='Pending';}
	if($row["status"]=='perpare'){$status='PayPal';$status1='Pending';$status2='Pending';}
	if($row["status"]=='doing'){$status='PayPal';$status1='Completed';$status2='Pending';}
	if($row["status"]=='bank doing'){$status='Bank Transfer';$status1='Completed';$status2='Pending';}						
	if($row["status"]=='bank done'){$status='PayPal';$status1='Completed';$status2='Receipt of Products';}
	if($row["status"]=='paypal done'){$status='Bank Transfer';$status1='Completed';$status2='Receipt of Products';}

  echo '
  <div class="Profile-container" style="padding:0px 0px !important">

      <div  role="tabpanel" class="Profile-all col-lg-12 col-md-12 col-sm-12 col-xs-12" id="Profile"  style="padding:0px 0px">
      <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style=" padding:0px 0px">
                <div class="Profile col-lg-6 col-md-6 col-sm-12 hidden-xs">
  <strong><h1>Order Details</h1></strong>
                <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Order Date
                            </td>
                            <td class="table-mar">
                            '.$row["time"].'
                            </td>

                        </tr>
                        </table>
               		</div>
                     
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Order Number
                            </td>
                            <td class="table-mar">
                            '.$row["paypal id"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Username
                            </td>
                            <td class="table-mar">
                            '.$row["username"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Payment Method
                            </td>
                            <td class="table-mar">
                            '.$status.'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Payment Status
                            </td>
                            <td class="table-mar">
                            '.$status1.'
                            </td>

                        </tr>
                        </table>
                	</div>

                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Delivery Status
                            </td>
                            <td class="table-mar">
                            '.$status2.'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                </div>
      </div>         
                <div class="Profile-xs hidden-lg hidden-md hidden-sm col-xs-12">
  <strong><h1>Order Details</h1></strong>
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Order Date
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["time"].'
                </div>
				</div> 
                </div>               
                     
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Order Number
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["paypal id"].'
                </div>
				</div> 
                </div>               
                    
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Username
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["username"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                payment method
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$status.'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Payment status
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$status1.'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Delivery status
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$status2.'
                </div>
				</div> 
                </div>               

                                        
                </div>




                <div class="Profile col-lg-6 col-md-6 col-sm-12 hidden-xs">
  <strong><h1>Customer Information</h1></strong>
                <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Customer`s First Name
                            </td>
                            <td class="table-mar">
                            '.$row["customer Fname"].'
                            </td>

                        </tr>
                        </table>
               		</div>
                     
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Customer`s Last Name
                            </td>
                            <td class="table-mar">
                            '.$row["customer Lname"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Customer`s Email
                            </td>
                            <td class="table-mar">
                            '.$row["customer email"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Customer`s Phone
                            </td>
                            <td class="table-mar">
                            '.$row["customer phone"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Billing Address
                            </td>
                            <td class="table-mar">
                            '.$row["customer address"].'
                            </td>

                        </tr>
                        </table>
                	</div>

                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Company Name
                            </td>
                            <td class="table-mar">
                            '.$row["company name"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                </div>
                
                <div class="Profile-xs hidden-lg hidden-md hidden-sm col-xs-12">
  <strong><h1>Customer Information</h1></strong>
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Customer`s First Name
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["customer Fname"].'
                </div>
				</div> 
                </div>               
                     
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Customer`s Last Name
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["customer Lname"].'
                </div>
				</div> 
                </div>               
                    
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Customer`s Email
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["customer email"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Customer`s Phone
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["customer phone"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Billing Address
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["customer address"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Company Name
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["company name"].'
                </div>
				</div> 
                </div>      
                                                                 
                </div>
                
                
                <div class="Profile col-lg-6 col-md-6 col-sm-12 hidden-xs" style="float:right">
  <strong><h1>Recipient Information</h1></strong>
                <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Recipient`s First Name
                            </td>
                            <td class="table-mar">
                            '.$row["recipient Fname"].'
                            </td>

                        </tr>
                        </table>
               		</div>
                     
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Recipient`s Last Name
                            </td>
                            <td class="table-mar">
                            '.$row["recipient Lname"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Recipient`s Email
                            </td>
                            <td class="table-mar">
                            '.$row["email"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Recipient`s phone
                            </td>
                            <td class="table-mar">
                            '.$row["phone"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Delivery Address
                            </td>
                            <td class="table-mar">
                            '.$row["address"].'
                            </td>

                        </tr>
                        </table>
                	</div>

                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Delivery Date
                            </td>
                            <td class="table-mar">
                            '.$row["delivery date"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Delivery Time Slot
                            </td>
                            <td class="table-mar">
                            '.$row["delivery time"].'
                            </td>

                        </tr>
                        </table>
                	</div>

                    <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr>
                            <td class="table-l">
                            Remarks
                            </td>
                            <td class="table-mar">
                            '.$row["remarks"].'
                            </td>

                        </tr>
                        </table>
                	</div>
                    
                </div>
                
                <div class="Profile-xs hidden-lg hidden-md hidden-sm col-xs-12">
  <strong><h1>Recipient Information</h1></strong>
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Recipient`s First Name
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["recipient Fname"].'
                </div>
				</div> 
                </div>               
                     
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
				Recipient`s Last Name
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["recipient Lname"].'
                </div>
				</div> 
                </div>               
                    
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Recipient`s Email
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["email"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Recipient`s phone
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["phone"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Delivery Address
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["address"].'
                </div>
				</div> 
                </div>               

                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Delivery Date
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["delivery date"].'
                </div>
				</div> 
                </div>   
                
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Delivery Time Slot
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["delivery time"].'
                </div>
				</div> 
                </div>  
                
                <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                Remarks
                </div>
				</div>
                <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div>
                '.$row["remarks"].'
                </div>
				</div> 
                </div>      
    
                                                                 
                </div>';
               
			   
		$sql = "select * from bought_item where paypal_id = '".$row["paypal id"]."'";
		$query = mysqli_query($conn,$sql);
		$delivery_fee_count=0;
		if (mysqli_num_rows($query) > 0) {
			echo '
			<div class="Profile col-lg-12 col-md-12 col-sm-12 hidden-xs" style="float:right">
  				<strong><h1>Production Details</h1></strong>
                
                	<div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr class="OS-top"  style="font-weight:bold">
                            <td class="OS-top-pn col-lg-6 col-md-6 col-sm-6 col-xs-6">
                            Product Name
                            </td>
                            <td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">
                            Unit Price
                            </td>
                            <td class="OS-top-q  col-lg-2 col-md-2 col-sm-2 col-xs-2">
							Quantity
                            </td>
                            <td class="OS-top-s  col-lg-2 col-md-2 col-sm-2 col-xs-2">
                            Subtotal
                        </tr>
                        </table>
               		</div>
					';
			while($row2 = mysqli_fetch_assoc($query)) {
				echo'<div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color:#FBFBFB !important">
                    <table width="100%" bgcolor="#F1F1F1">';
				echo '<tr class="OS-top">';
				echo '<td class="OS-top-pn col-lg-6 col-md-6 col-sm-6 col-xs-6">';
				echo $row2["product_name"];
				echo "</td>";
				echo '<td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">';
				echo "HK$".$row2["price"];
				echo "</td>";
				echo '<td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">';
				echo $row2["amount"];
				echo "</td>";
				$amount = $row2["amount"]*$row2["price"];
				echo '<td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">HK$'.$amount."</td>";
				echo "</tr>";
				$delivery_fee_count=$delivery_fee_count+($row2["amount"]*$row2["price"]);
				echo '                        </table>
               		</div>';
			}
			if($delivery_fee_count<500){
				$delivery_fee_count=$delivery_fee_count+38;
				echo'<div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color:#FBFBFB !important">
                    <table width="100%" bgcolor="#F1F1F1">';
				echo '<tr class="OS-top">';
				echo '<td class="OS-top-pn col-lg-6 col-md-6 col-sm-6 col-xs-6">';
				echo "Delivery Fee";
				echo "</td>";
				echo '<td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">';
				echo "HK$38";
				echo "</td>";
				echo '<td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">';
				echo "1";
				echo "</td>";
				echo '<td class="OS-top-up col-lg-2 col-md-2 col-sm-2 col-xs-2">HK$38</td>';
				echo "</tr>";				
				echo '                        </table>
               		</div>';

			}
			if($row["coupon_code"]!=NULL){
				echo'<div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color:#FBFBFB !important">
                    <table width="100%" bgcolor="#F1F1F1">';
				echo '<tr class="OS-top"  style="font-weight:bold">';
				echo '<td>';
				echo "&nbsp;&nbsp;&nbsp;Coupon ".$row["coupon_name"]." was used";
				echo "</td>";
				echo "</tr>";
				echo '                        </table>
               		</div>';

			}
			echo '  <div class="Profile-order col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%">
                    	<tr class="OS-top"  style="font-weight:bold">
                            <td class="OS-top-pn col-lg-8 col-md-8 col-sm-8 col-xs-8">'."總計</td>".'                            <td class="OS-top-s  col-lg-4 col-md-4 col-sm-4 col-xs-4">'."
HK$".$delivery_fee_count."</td>
				  </tr>";
			echo "</table></div></div>";
		}

//small order detail
		$sql = "select * from bought_item where paypal_id = '".$row["paypal id"]."'";
		$query = mysqli_query($conn,$sql);
		$delivery_fee_count=0;
		if (mysqli_num_rows($query) > 0) {
			echo '
<div class="Profile-xs hidden-lg hidden-md hidden-sm col-xs-12">
	<strong><h1>Production Details</h1></strong>
    <div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="col-xs-7" style="padding:0px 0px">
            Item
            </div>
            <div class="col-xs-2" style="padding:0px 0px">
            Qty
            </div>
            <div class="col-xs-3" style="padding:0px 0px; text-align:right">
            Price
            </div>
        </div>
					';
			while($row2 = mysqli_fetch_assoc($query)) {
				echo'                
        <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="col-xs-7" style="padding:0px 0px">
                '.$row2["product_name"].'
            </div>
            <div class="col-xs-2" style="padding:0px 0px">
                '.$row2["amount"].'
            </div>
            <div class="col-xs-2" style="padding:0px 0px">
                HK$'.$row2["price"].'
            </div>
        </div>                
';
			}
			if($delivery_fee_count<500){
				$delivery_fee_count=$delivery_fee_count+38;
				echo'                
				<div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div class="col-xs-7" style="padding:0px 0px">
				Delivery Fee	
				</div>
				<div class="col-xs-2" style="padding:0px 0px">
				1
				</div>
				<div class="col-xs-3" style="padding:0px 0px; text-align:right">
				HK$38
                </div>
                </div>         
';
			}
			if($row["coupon_code"]!=NULL){
				echo'<div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <table width="100%" bgcolor="#F1F1F1">';
				echo '<tr class="OS-top"  style="font-weight:bold">';
				echo '<td>';
				echo "&nbsp;&nbsp;&nbsp;Coupon ".$row["coupon_name"]." was used";
				echo "</td>";
				echo "</tr>";
				echo '</table>
               		</div>';

			}
			
			echo'</div>';

			echo '
<div class="Profile-list-xs col-lg-12 col-md-12 col-sm-12 col-xs-12" style="text-align:right">
        <div class="Profile-title-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div>
            	Total
            </div>
        </div>
        <div class="Profile-info-xs col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div>
            	'."HK$".$delivery_fee_count.'
            </div>
        </div> 
    </div>      
';			

	echo'</div>';

		}			
//end

echo "</div></div>";
}
?>
            
