<?php
include_once dirname(__FILE__) . '/elements/header.php';

$FORM = array();
$CLIENT = $tpl['arr'];
ob_start(); //initiates output buffering
echo __('front_To_Airport');
$front_to_value = ob_get_clean(); //returns the contents of the buffer and turns off output buffering

ob_start(); //initiates output buffering
echo __('front_from_airport');
$front_from_value = ob_get_clean(); //returns the contents of the buffer and turns off output buffering

ob_start(); //initiates output buffering
echo __('front_returned');
$front_retuen_value = ob_get_clean(); //returns the contents of the buffer and turns off output buffering
?>
<div class="pjTbs-body">
	<div class="pjTbs-box-title text-center"><?php __('front_your_reservations');?></div><!-- /.pjTbs-box-title -->
	
	<div class="table-responsive">
		<table class="table table-bordered">
			<thead>
				<tr>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('lblFleet', false, true); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('front_typed', false, true); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('front_pickup_address', false, true); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('front_dropoff_address', false, true); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('lblDistance', false, true); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('lblDateTime', false, false); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('lblStatus'); ?></th>
					<th style="color:black; vertical-align:middle; text-align:center;"><?php __('lblCreatedOn'); ?></th>
				</tr>
			</thead>
			<tbody>
				<?php
				
				if(!empty($tpl['arr']))
				{
				    $statuses = __('booking_statuses', true, false);
				    foreach($tpl['arr'] as $k => $v)
				    {
				        $seconds = 2 * 60 * 60;
				        ?>
				        <tr>
				        	<td><?php echo pjSanitize::html($v['fleet']);?></td>
				        	<td><?php echo pjSanitize::html($v['check_type']);?></td>
				        	<td><?php echo pjSanitize::html($v['pickup_address']);?></td>
				        	<td><?php echo pjSanitize::html($v['return_address']);?></td>
				        	<td><?php echo (int) $v['distance'] . ' km';;?></td>
				        	<td><?php echo date($tpl['option_arr']['o_date_format'] . ', ' . $tpl['option_arr']['o_time_format'], strtotime($v['booking_date']));?></td>
				        	<td><?php echo $v['booking_status'];?></td>
				        	<td><?php echo date($tpl['option_arr']['o_date_format'] . ', ' . $tpl['option_arr']['o_time_format'], strtotime($v['booking_created']));?></td>
				        </tr>
				        <?php
				    }
				}else{
				    ?>
				    <tr>
				    	<td colspan="6"><?php __('lblNoRecordsFound')?></td>
				    </tr>
				    <?php
				}
				?>
			</tbody>
		</table>
	</div>
	
	<div class="pjTbs-body-actions">
		<div class="row">
			<div class="col-sm-3 col-xs-12">
				<a href="#" class="btn btn-secondary btn-block pjTbsBtnBack" data-load="loadSearch"><?php __('front_btn_back');?></a>
			</div><!-- /.col-sm-3 -->
		</div><!-- /.row -->
	</div><!-- /.pjTbs-body-actions -->
</div>

<script language="javascript" type="text/javascript">
    pjQ.$( document ).ready(function() {
        // alert("The URL of this page is: " + window.location.href);
        if( "https://flyingstar-flughafentransfer.de/#!/loadFleets"                                     || 
            "https://flyingstar-flughafentransfer.de/flughafentransfer-frankfurt.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-bingen.php#!/loadFleets"         ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-bischofsheim.php#!/loadFleets"   ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-floersheim.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-gross-gerau.php#!/loadFleets"     ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-heidelberg.php#!/loadFleets"     ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-ingelheim.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-kaiserslautern.php#!/loadFleets" ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-karlsruhe.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-ludwigshafen.php#!/loadFleets"   ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-mainz.php#!/loadFleets"          ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-mannheim.php#!/loadFleets"       ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-wiesbaden.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-worms.php#!/loadFleets"          ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-ruesselsheim.php#!/loadFleets"    ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-stuttgart.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-nuernberg.php#!/loadFleets"       ||
            "https://flyingstar-flughafentransfer.de/flughafentransfer-wuerzburg.php#!/loadFleets"       ||
            
            "https://flyingstar-flughafentransfer.de/en/#!/loadFleets"                                     ||    
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-frankfurt.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-bingen.php#!/loadFleets"         ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-bischofsheim.php#!/loadFleets"   ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-floersheim.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-gross-gerau.php#!/loadFleets"    ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-heidelberg.php#!/loadFleets"     ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-ingelheim.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-kaiserslautern.php#!/loadFleets" ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-karlsruhe.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-ludwigshafen.php#!/loadFleets"   ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-mainz.php#!/loadFleets"          ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-mannheim.php#!/loadFleets"       ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-wiesbaden.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-worms.php#!/loadFleets"          ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-ruesselsheim.php#!/loadFleets"    ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-stuttgart.php#!/loadFleets"      ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-nuernberg.php#!/loadFleets"       ||
            "https://flyingstar-flughafentransfer.de/en/airporttransfer-wuerzburg.php#!/loadFleets"
            == window.location.href){
            hide_info();
        }
    });
     
    function hide_info(){
        // alert('hello');
        document.getElementById("contain_data1").style.display = 'none';
    }
</script>