
<link href="<?php echo base_url("assets/css/reservation.css");?>" rel="stylesheet">
<!-- Checkout Modal Start -->
<div class="container">
	<div class="modal-header">
		<h4 id="myModalLabel" class="modal-title">Reservation Detail</h4>
	</div>
    
    <!--Location & Date-->
	<div class="col-lg-6" id="location-date-info">
		<h3>Location & Date & Time</h3>
        <?php 
			if(!$reservation->pickupname)
			{
				echo"<div class='info-box'>";
						echo"<span class='glyphicon glyphicon-map-marker'></span>";
						echo"<h4 class='info-box-title'>Pick-Up Location</h4>";
						echo"<p id='pickup-location-ph' class='info-box-description'>".$reservation->pick_up_other."</p>";
				echo"</div>";
		    }else{
				echo"<div class='info-box'>";
						echo"<span class='glyphicon glyphicon-map-marker'></span>";
						echo"<h4 class='info-box-title'>Pick-Up Location</h4>";
						echo"<p id='pickup-location-ph' class='info-box-description'>".$reservation->pickupname."</p>";
				echo"</div>";	
			}
		?>
        
        <?php 
		  if(!$reservation->dropOffname){
				echo'<div class="info-box">';
					echo'<span class="glyphicon glyphicon-map-marker"></span>';
					echo'<h4 class="info-box-title">Drop-Off Location</h4>';
					echo'<p id="dropoff-location-ph" class="info-box-description">'.$reservation->drop_off_other.'</p>';
				echo'</div>';
		   }else{
				echo'<div class="info-box">';
					echo'<span class="glyphicon glyphicon-map-marker"></span>';
					echo'<h4 class="info-box-title">Drop-Off Location</h4>';
					echo'<p id="dropoff-location-ph" class="info-box-description">'.$reservation->dropOffname.'</p>';
				echo'</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>
			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">';
				  echo'<span class="glyphicon glyphicon-calendar"></span>';
				  echo'<h4 class="info-box-title">Drop-Off Time</h4>';
					echo'<p class="info-box-description">';
						echo'<span id="drop-off-date-ph">';
							echo''.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."")).')';
						echo'</span>';
					echo'</p>';
			echo'</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 class="info-box">
		<span class="glyphicon glyphicon-usd"></span>
			<h4 class="info-box-title">Price</h4>
            <?php 
			if(!$price){
				echo'<p id="pickup-location-ph" class="info-box-description">';
					echo"<span>Please Contact Us</span>";
					echo"<br>";
					echo"<span>Phone: 095-232425</span>";
					echo"<br>";
					echo"<span>Email: sales@channellimo.com</span>";
				echo'</p>';
			}else{
			   if($peaktime)
			   {
					$total = $peaktime->amount+$price->price;
					echo' <p id="pickup-location-ph" class="info-box-description">';
						echo"Total: ".$total."$"." ("."PeakTime:".$peaktime->amount."$".")";
					echo'</p>';
			   }
			   else
			   {
					$total = $price->price;	
					echo'<p id="pickup-location-ph" class="info-box-description">';
						echo"Total: ".$total."$";
					echo'</p>';
			   }
			}
			?>
            <p style="font-size:12px;color:red;">Our fleet will get around(<?php echo date("g:i a", strtotime("".$reservation->from_time.""))?> to <?php echo date("g:i a", strtotime($reservation->from_time.'+30 minutes'))?>)</p>
		</div>
        
	</div>
	<!--exit-Location & Date-->
    
    <!--vehicle-->
    <div class="col-lg-6" id="vehicle-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-->
	<!--</form>-->
    
	<div class="col-lg-10" id="checkout-personal-info">
    	<div id="checkout-form-msg" class="alert hidden"> test </div>
		<h3>GUEST INFORMATION</h3>
         <?php $attributes = array('id' => 'reservation');?>
         <?php echo form_open('reservation',$attributes);?>
     
        	<div class="form-group left">
                <?php echo form_error('firstname','<div class="error">', '</div>'); ?>
                <?php echo form_label('First Name: <span class="error">* </span>', 'firstname');?>
                <?php echo form_input('firstname',$this->input->post('firstname'),'placeholder="Enter your first name" required="" id="firstname" class="form-control"');?>
			</div>
          
			<div class="form-group right">
            	<?php echo form_error('lastname','<div class="error">', '</div>'); ?>
                <?php echo form_label('Last Name: <span class="error">* </span>', 'lastname');?>
                <?php echo form_input('lastname',$this->input->post('lastname'),'placeholder="Enter your last name" required="" id="lastname" class="form-control"');?>
			</div>
             
			<div class="form-group left">
            	<?php echo form_error('phonenumber','<div class="error">', '</div>'); ?>             
                <?php echo form_label('Phone Number: <span class="error">* </span>', 'phonenumber');?>
                <?php echo form_input('phonenumber',$this->input->post('phonenumber'),'placeholder="Enter your phone number" required="" id="phonenumber" class="form-control"');?>
			</div>
        
     
        <div class="form-group right">
            <?php echo form_error('city','<div class="error">', '</div>'); ?>
            <?php echo form_label('City: <span class="error">* </span>', 'city');?>
            <?php echo form_input('city',$this->input->post('city'),'placeholder="Enter your City" required="" id="city" class="form-control"');?>
        </div>
        <div class="clearfix"></div>
        
        <div class="form-group left">
           <?php echo form_error('email','<div class="error">', '</div>'); ?>
           <?php echo form_label('Email Address: <span class="error">* </span>', 'email');?>
           <?php echo form_input('email',$this->input->post('email'),'placeholder="Enter your email address" required="" id="email" class="form-control"');?>
        </div>
                 
        <div class="form-group right">
           <?php echo form_error('email_confirm','<div class="error">', '</div>'); ?>
           <?php echo form_label('Confirm Email Address: <span class="error">* </span>', 'email_confirm');?>
           <?php echo form_input('email_confirm',$this->input->post('email_confirm'),'placeholder="Confirm your email address" required="" id="email_confirm" class="form-control"');?>
        </div>

        <!--hide-from-->
        <div class="col-lg-12">
        <h3>CONTACT INFORMATION
        	<div class="checkbox" style="color:#716D6E;">
                 <?php echo form_error('guest','<div class="error">', '</div>'); ?>
                 <input id="guest" type="checkbox" name="guest" checked="checked" >
                 <label for="guest" >Same as guest information*</label>
                 <label id="guest-error" class="error" for="guest"></label>
              </div>
        </h3>
        </div>
        
       <div class="col-lg-12" id="show_from" style="display:none;">
        	<div class="form-group left">
            	<?php echo form_error('con_firstname','<div class="error">', '</div>'); ?>
            	<?php echo form_label('First Name: <span class="error">* </span>', 'con_firstname');?>
                <?php echo form_input('con_firstname',$this->input->post('con_firstname'),'placeholder="Enter your first name" required="" id="con_firstname" class="form-control"');?>
			</div>
            
			<div class="form-group right">
            	<?php echo form_error('con_lastname','<div class="error">', '</div>'); ?>
                <?php echo form_label('Last Name: <span class="error">* </span>', 'con_lastname');?>
                <?php echo form_input('con_lastname',$this->input->post('con_lastname'),'placeholder="Enter your last name" required="" id="con_lastname" class="form-control"');?>
			</div>
            
			<div class="form-group left">
                <?php echo form_error('con_phonenumber','<div class="error">', '</div>'); ?>
                <?php echo form_label('Phone Number: <span class="error">* </span>', 'con_phonenumber');?>
                <?php echo form_input('con_phonenumber',$this->input->post('con_phonenumber'),'placeholder="Enter your phone number" required="" id="con_phonenumber" class="form-control"');?>
			</div>
        
        <div class="form-group right">
        	<?php echo form_error('con_city','<div class="error">', '</div>'); ?>
            <?php echo form_label('City: <span class="error">* </span>', 'con_city');?>
            <?php echo form_input('con_city',$this->input->post('con_city'),'placeholder="Enter your City" required="" id="con_city" class="form-control"');?>
        </div>
        <div class="clearfix"></div>
        
        <div class="form-group left">
           <?php echo form_error('con_email','<div class="error">', '</div>'); ?>
           <?php echo form_label('Email Address: <span class="error">* </span>', 'con_email');?>
           <?php echo form_input('con_email',$this->input->post('con_email'),'placeholder="Enter your email address" required="" id="con_email" class="form-control"');?>
        </div>
                 
        <div class="form-group right">
           <?php echo form_error('con_email_confirm','<div class="error">', '</div>'); ?>
           <?php echo form_label('Confirm Email Address: <span class="error">* </span>', 'con_email_confirm');?>
           <?php echo form_input('con_email_confirm',$this->input->post('con_email_confirm'),'placeholder="Confirm your email address" required="" id="con_email_confirm" class="form-control"');?>
        </div>
        
      </div>
      <!--exit-hide-from-->  
      
      <div class="modal-footer col-lg-12">
      	<div class="checkbox" style="float:left;">
           <?php echo form_error('agree','<div class="error">', '</div>'); ?>
           <input id="agree" type="checkbox" name="agree" value="yes">
           <label for="agree">I agree to the Terms and Conditions<span class="error">* </span></label>
           <label id="agree-error" class="error" for="agree"></label>
        </div>
              
        <span class="btn-border btn-gray">
        	<?php echo form_button('cancel', 'Cancel','class="btn btn-default btn-gray" onclick="Redirect();"');?>
			<!--<button class="btn btn-default btn-gray"  type="button" onclick="Redirect();">Cancel</button>-->
		</span>
		<span class="btn-border btn-yellow">
        	<?php echo form_submit('payment', 'Payment Now','class="btn btn-primary btn-yellow"');?>
			<!--<button class="btn btn-primary btn-yellow" type="submit">Payment Now</button>-->
		</span>
      </div>
    <!--</form>-->
    <?php echo form_close();?>
        
  </div>

</div>          
<!-- Checkout Modal end -->

