<link href="<?php echo base_url("assets/css/reservation.css");?>" rel="stylesheet">
<style>
.btn-home {
    background-color: #e6a02b;
    border-radius: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    height: 37px;
    line-height: 37px;
    padding: 0 15px;
}

.btn-home:hover{
	background-color: #e6a02b;
	color: #fff;
}
	
.btn-yellow {
    border-color: #e6a02b;
}
.modal-footer {
    background-color: #e3e2e2;
}
</style>

<!-- Checkout Modal Start -->
<div class="container">
	<div class="modal-header">
		<h4 id="myModalLabel" class="modal-title">Complete reservation</h4>
	</div>
    
    <div class="checkout-info-box">
		<h3>
			<i class="fa fa-info-circle"></i>
			Upon completing this reservation enquiry, you will receive::
		</h3>
		<p>Your rental voucher to produce on arrival at the rental desk and a toll-free customer support number.</p>
	</div>
    
    <div class="thank">
    	<h1>Thank You!</h1>
      	<h4>We'll respond to your request shortly. In the meantime...</h4>
   	</div>  
    
    <!--Location & Date-->
	<div class="col-lg-12">
    	<div class="col-lg-6" id="location-date-info">
		<h3>Location & Date & Time</h3>
        <?php 
			if(!$reservation->pickupname){
			echo"
				<div class='info-box'>
					<span class='glyphicon glyphicon-map-marker'></span>
						<h4 class='info-box-title'>Pick-Up Location</h4>
						<p id='pickup-location-ph' class='info-box-description'>".$reservation->pick_up_other."</p>
				</div>
			";
				}else{
			echo"
				<div class='info-box'>
					<span class='glyphicon glyphicon-map-marker'></span>
						<h4 class='info-box-title'>Pick-Up Location</h4>
						<p id='pickup-location-ph' class='info-box-description'>".$reservation->pickupname."</p>
				</div>
			";
				
			}
		?>
        
        <?php 
		  if(!$reservation->dropOffname){
			echo'<div class="info-box">
				<span class="glyphicon glyphicon-map-marker"></span>
					<h4 class="info-box-title">Drop-Off Location</h4>
					<p id="dropoff-location-ph" class="info-box-description">'.$reservation->drop_off_other.'</p>
				</div>';
			}else{
			echo'<div class="info-box">
				<span class="glyphicon glyphicon-map-marker"></span>
					<h4 class="info-box-title">Drop-Off Location</h4>
					<p id="dropoff-location-ph" class="info-box-description">'.$reservation->dropOffname.'</p>
				</div>';
			}?>
        
        
        <div class="info-box">
		<span class="glyphicon glyphicon-calendar"></span>
			<h4 class="info-box-title">Pick-Up Time</h4>
			<p class="info-box-description">
			<span id="pick-up-date-ph"><?php echo date("d/M/Y", strtotime("".$reservation->from_date.""))?></span>
            <input type="hidden" value="<?php echo $reservation->from_date;?>" name="from-date">
			at
			<span id="pick-up-time-ph"><?php echo date("H:i",strtotime($reservation->from_time.'+30 minutes'));?> <?php echo"(";?><?php echo date("g:i a", strtotime($reservation->from_time.'+30 minutes'))?><?php echo")";?></span>
			</p>
		</div>
		
        <?php 
		if(!$reservation->to_date OR $reservation->to_time=="00:00:00" ){
			}else{
		echo'<div class="info-box">
			  <span class="glyphicon glyphicon-calendar"></span>
				<h4 class="info-box-title">Drop-Off Time</h4>
				<p class="info-box-description">
				<span id="drop-off-date-ph">'.date("d/M/Y", strtotime("".$reservation->to_date."")).'</span> at<span id="drop-off-time-ph"> '.date("H:i",strtotime($reservation->to_time)).' ('.date("g:i a", strtotime("".$reservation->to_time."")).')</span>
			</p>
		</div>';	
			
		}
		?>
        
        <div class="info-box">
		<span class="glyphicon glyphicon-list-alt"></span>
			<h4 class="info-box-title">Service For</h4>
          		<p id="dropoff-location-ph" class="info-box-description"><?php echo $reservation->servicename?></p>
        </div>
           
	</div>
	<!--exit-Location & Date-->
    
    <!--vehicle-->
    <div class="col-lg-6" id="location-date-info">
    	<h3>
			Car Type:
			<span id="selected-car-ph"><?php echo $reservation->carname?></span>
		</h3>
        <div class="clearfix"></div>
        <div class="vehicle-image">
			<img id="selected-vehicle-image" class="img-responsive" alt="Vehicle" src="<?php echo base_url("assets/img/slide/".$reservation->imagename."");?>">
		</div>
    </div>
	<!--exit-vehicle-->
    
    <!--information-detail-->
    <?php
    	$sql = $this->db->query("SELECT * FROM `tblreservation_detail` WHERE `trn_id`=".$reservation->trn_id." LIMIT 1");
		foreach($sql->result() as $detail)
		{
		
	 ?>  
    	<div class="form-group col-lg-8" id="location-date-info">
        	<h3>GUEST INFORMATION</h3>
           
            	<div class="col-lg-4">
            		<h4 class="info-box-title">First Name:</h4>
                    <p class="info-box-description"><?php echo $detail->guest_firstname;?></p>
                </div>
                
                <div class="col-lg-4">
                	<h4 class="info-box-title">Last Name: </h4>
                    <p class="info-box-description"><?php echo $detail->guest_lastname;?></p>
                </div>
                
                <div class="col-lg-4">
                	<h4 class="info-box-title">Phone Number:</h4>
                    <p class="info-box-description"><?php echo $detail->guest_phone;?></p>
                </div>
                
                <div class="col-lg-4">
                	<h4 class="info-box-title">City:</h4>
                    <p class="info-box-description"><?php echo $detail->guest_city;?></p>
                </div>
                
                <div class="col-lg-4">
                	<h4 class="info-box-title">Email Address:</h4>
                    <p class="info-box-description"><?php echo $detail->guest_email;?></p>
                </div> 
                <?php }?> 
    
        </div>
	
    	<div class="form-group col-lg-8" id="location-date-info">
        	<h3>CONTACT INFORMATION</h3>
            <div class="col-lg-4">
               <h4 class="info-box-title">First Name:</h4>
               <p class="info-box-description"><?php echo $detail->contact_firstname;?></p>
            </div> 
           	 
            <div class="col-lg-4">
               <h4 class="info-box-title">Last Name:</h4>
               <p class="info-box-description"><?php echo $detail->contact_lastname;?></p>
            </div> 
            
            <div class="col-lg-4">
               <h4 class="info-box-title">Phone Number:</h4>
               <p class="info-box-description"><?php echo $detail->contact_phone;?></p>
            </div> 
            
            <div class="col-lg-4">
               <h4 class="info-box-title">City:</h4>
               <p class="info-box-description"><?php echo $detail->contact_city;?></p>
            </div>    
            
            <div class="col-lg-4">
               <h4 class="info-box-title">Email Address:</h4>
               <p class="info-box-description"><?php echo $detail->contact_email;?></p>
            </div>  
              
        </div>
	<!--exit-information-detail-->      
	</div>
        
        <div class="modal-footer col-lg-12" >
            <span class="btn-border btn-gray">
            <button class="btn-home btn-yellow" onclick="Redirect();" type="button">Return Home</button>
            </span>
		</div>
        
    </div>
	<!-- Checkout Modal end -->

