<?php $pagetitle = 'NOTAMs'; require_once 'includes/header.php'; $a = new Airports(); ?> <h3 class="text-center">NOTAMs</h3> <br> <div class="col-md-10 col-md-offset-1"> <div class="panel panel-info"> <div class="panel-heading"> <h3 class="panel-title">All NOTAMs</h3> </div> <div class="panel-body"> <table class="table table-striped table-responsive table-condensed"> <?php $notams = $a->notams(); $icao = array(); if (count($notams)) { echo '<tr> <td><strong>ICAO</strong></td> <td><strong>Message</strong></td> <td><strong>From</strong></td> <td><strong>Until</strong></td> </tr>'; foreach ($notams as $notam) { echo '<tr><td>'; if (!in_array($notam['icao'], $icao)) { $icao[] = $notam['icao']; echo $notam['icao']; }
<?php $pagetitle = "Pilots"; require_once 'includes/header.php'; $a = new Airports(); $all = $a->all(); $airports = array(); foreach ($all as $air) { if (!in_array($air['icao'], $airports) && $air['icao'] != 'EISN') { $airports[] = $air['icao']; } } $i = 1; foreach ($all as $air) { if ($air['icao'] != 'EISN') { $str .= '[\'' . $air['data']['name'] . '\', '; //0 $str .= $air['data']['lat'] . ', '; //1 $str .= $air['data']['lon'] . ', '; //2 $str .= $i . ', '; //3 $str .= '\'http://www.iaa.ie/safe_reg/iaip/aip_' . strtolower($air['icao']) . '_charts.htm\']'; //4 if ($air['icao'] != end($airports)) { $str .= ', '; } } $i++; }
$action = @$_REQUEST['action']; $from_airports = array(); $to_airports = array(); $user_data = array('flight-type' => isset($_REQUEST['flight-type']) ? $_REQUEST['flight-type'] : 'return', 'from-airport' => '', 'to-airport' => '', 'departure-date' => @$_REQUEST['departure-date'], 'return-date' => @$_REQUEST['return-date'], 'adults' => isset($_REQUEST['adults']) ? $_REQUEST['adults'] : 0, 'children' => isset($_REQUEST['children']) ? $_REQUEST['children'] : 0, 'babies' => isset($_REQUEST['babies']) ? $_REQUEST['babies'] : 0); $fmt = 'l, F d, Y G:i A'; // Tuesday, June 20, 2009 13:04 PM $fmt = 'Y-m-d\\TH:i'; // required to make webforms2 work :-( if ($user_data['departure-date']) { $user_data['departure-date'] = date($fmt, strtotime($user_data['departure-date'])); } if ($user_data['return-date']) { $user_data['return-date'] = date($fmt, strtotime($user_data['return-date'])); } if ($action == 'airport_lookup' || $action == 'search') { $Airports = new Airports(); // manually selected overrides if (@$_REQUEST['selected-from-airport'] && $_REQUEST['selected-from-airport'] != 'none') { $_REQUEST['from-airport'] = $_REQUEST['selected-from-airport']; } if (@$_REQUEST['selected-to-airport'] && $_REQUEST['selected-to-airport'] != 'none') { $_REQUEST['to-airport'] = $_REQUEST['selected-to-airport']; } if (@$_REQUEST['from-airport']) { $user_data['from-airport'] = $_REQUEST['from-airport']; $from_airports = $Airports->find($_REQUEST['from-airport']); if (count($from_airports) == 1) { $user_data['from-airport'] = $from_airports[0]['title']; } } if (@$_REQUEST['to-airport']) {