<div class="content-header">
	<div class="header-section">
		<h1>
			Hot Airports <br><small>Tours Department | <?php echo SITE_NAME; ?> &copy; <?php echo date("Y"); ?></small>
		</h1>
	</div>
</div>

<div class="col-md-6">
<div class="block">
	<div class="block-title">
		<h3><strong><?php echo SITE_NAME; ?>'s </strong>favourite airports</h3>
	</div>
		<table class="table table-responsive table-striped">
            <tbody>
	<?php 
		$count = 1;
		foreach ($hotschedules as $hotschedule) {
			$ap = OperationsData::getAirportInfo($hotschedule->depicao); 
			$code = PassportData::getCountryCode($ap->country);
			$ctryimg = Countries::getCountryImage($code);
			?>
			<tr>
                  <td><?php echo $count; ?>.</td>
                  <td><a class="btn btn-default btn-sm" target="_blank" data-toggle="tooltip" data-placement="top" title="" data-original-title="Click to view Airport Information" href="<?php echo url('airports/get_airport?icao=').''.$hotschedule->depicao; ?>"><i class="fas fa-plane-arrival"></i> <?php echo $hotschedule->depicao; ?></a></td>
                  <td><img src="<?php echo $ctryimg; ?>"> <?php echo $ap->name; ?></td>
                  <td>
                     <form id="schedules_form" action="<?php echo SITE_URL; ?>/index.php/flightsearch/findflights" method="post">
                        <input type="hidden" id="arricao" name="arricao" value="<?php echo $hotschedule->arricao; ?>">
                        <input type="hidden" name="action" value="findflight">                    
                        <input type="submit" name="submit" value="View Flights" class="btn btn-xs btn-primary">
                     </form>
                  </td>
                  <td class="text-right"><label class="label label-primary"><?php echo $hotschedule->timesflown; ?> times</label></td>
               </tr>
         <?php
         $count++;
		}
	?>
			</tbody>
        </table>
</div>	
</div>



<div class="col-md-6">
	<div class="block">
	<div class="block-title">
		<h3><strong>Your</strong> favourite airports</h3>
	</div>
	<table class="table table-responsive table-striped">
            <tbody>
	<?php 
		$count = 1;
		foreach ($pilotpireps as $ppireps) {
			$ap = OperationsData::getAirportInfo($ppireps->arricao); 
			$code = PassportData::getCountryCode($ap->country);
			$ctryimg = Countries::getCountryImage($code);
			?>
			<tr>
                  <td><?php echo $count; ?>.</td>
                  <td><a class="btn btn-default btn-sm" target="_blank" data-toggle="tooltip" data-placement="top" title="" data-original-title="Click to view Airport Information" href="<?php echo url('airports/get_airport?icao=').''.$ppireps->arricao; ?>"><i class="fas fa-plane-arrival"></i> <?php echo $ppireps->arricao; ?></a></td>
                  <td><img src="<?php echo $ctryimg; ?>"> <?php echo $ap->name; ?></td>
                  <td>
                     <form id="schedules_form" action="<?php echo SITE_URL; ?>/index.php/flightsearch/findflights" method="post">
                        <input type="hidden" id="arricao" name="arricao" value="<?php echo $hotschedule->arricao; ?>">
                        <input type="hidden" name="action" value="findflight">                    
                        <input type="submit" name="submit" value="View Flights" class="btn btn-xs btn-primary">
                     </form>
                  </td>
                  <td class="text-right"><label class="label label-primary"><?php echo $hotschedule->timesflown; ?> times</label></td>
               </tr>
         <?php
         $count++;
		}
	?>
			</tbody>
        </table>
</div>
</div>

