<?php require 'require/class.Connection.php'; require 'require/class.Spotter.php'; $Spotter = new Spotter(); $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); $spotter_array = $Spotter->getSpotterDataByRegistration($_GET['registration'], "0,1", $sort); $aircraft_array = $Spotter->getAircraftInfoByRegistration($_GET['registration']); if (!empty($spotter_array)) { $title = 'Most Common Routes from aircraft with registration ' . $_GET['registration']; require 'header.php'; print '<div class="info column">'; print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>'; print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>'; print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>'; print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>'; print '</div>'; include 'registration-sub-menu.php'; print '<div class="column">'; print '<h2>Most Common Routes</h2>'; print '<p>The statistic below shows the most common routes of aircraft with registration <strong>' . $_GET['registration'] . '</strong>.</p>'; $route_array = $Spotter->countAllRoutesByRegistration($_GET['registration']); if (!empty($route_array)) { print '<div class="table-responsive">'; print '<table class="common-routes table-striped">'; print '<thead>'; print '<th></th>'; print '<th>Departure Airport</th>'; print '<th>Arrival Airport</th>'; print '<th># of Times</th>'; print '<th></th>';
<?php require 'require/class.Connection.php'; require 'require/class.Spotter.php'; $Spotter = new Spotter(); $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); if (isset($_GET['registration'])) { $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); } else { $spotter_array = array(); } if (!empty($spotter_array)) { $title = 'Most Common Departure Airports by Country of aircraft with registration ' . $_GET['registration']; require 'header.php'; print '<div class="info column">'; print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>'; print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>'; print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>'; print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>'; print '</div>'; include 'registration-sub-menu.php'; print '<div class="column">'; print '<h2>Most Common Departure Airports by Country</h2>'; ?> <p>The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong><?php print $_GET['registration']; ?> </strong>.</p> <?php
<?php require 'require/class.Connection.php'; require 'require/class.Spotter.php'; $spotter_array = Spotter::getSpotterDataByRegistration($_GET['registration'], "0,1", $_GET['sort']); $aircraft_array = Spotter::getAircraftInfoByRegistration($_GET['registration']); if (!empty($spotter_array)) { $title = 'Most Common Departure Airports of aircraft with registration ' . $_GET['registration']; require 'header.php'; print '<div class="info column">'; print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>'; print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>'; print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>'; print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>'; print '</div>'; include 'registration-sub-menu.php'; print '<div class="column">'; print '<h2>Most Common Departure Airports</h2>'; ?> <p>The statistic below shows all departure airports of flights with aircraft registration <strong><?php print $_GET['registration']; ?> </strong>.</p> <?php $airport_airport_array = Spotter::countAllDepartureAirportsByRegistration($_GET['registration']); ?> <script> google.load("visualization", "1", {packages:["geochart"]}); google.setOnLoadCallback(drawCharts); $(window).resize(function(){ drawCharts();
print '<div class="detail date">'; print '<div class="title">Date (UTC)</div>'; print '<div>'; date_default_timezone_set('UTC'); print date("M j, Y G:i", strtotime($spotter_item['date_iso_8601'])); print '</div>'; print '</div>'; print '</div>'; } print '</div>'; // print '<div id="archive-map"></div>'; if ($spotter_array[0]['registration'] != "" && $spotter_array[0]['registration'] != "NA" && $spotter_array[0]['registration'] != "N/A") { print '<div class="last-flights">'; print '<h3>Last 5 Flights of this Aircraft (' . $spotter_array[0]['registration'] . ')</h3>'; $hide_th_links = true; $spotter_array = $Spotter->getSpotterDataByRegistration($spotter_array[0]['registration'], "0,5", ""); include 'table-output.php'; print '<div class="more">'; print '<a href="' . $globalURL . '/registration/' . $spotter_array[0]['registration'] . '" class="btn btn-default btn" role="button">See all Flights»</a>'; print '</div>'; print '</div>'; } /* ?> <div class="column"> <div class="share"> <span class='st_facebook' displayText='Facebook'></span> <span class='st_twitter' displayText='Tweet'></span> <span class='st_googleplus' displayText='Google +'></span> <span class='st_pinterest' displayText='Pinterest'></span> <span class='st_email' displayText='Email'></span>
if (!isset($_GET['limit'])) { $limit_start = 0; $limit_end = 25; $absolute_difference = 25; } else { $limit_explode = explode(",", $_GET['limit']); $limit_start = $limit_explode[0]; $limit_end = $limit_explode[1]; } $absolute_difference = abs($limit_start - $limit_end); $limit_next = $limit_end + $absolute_difference; $limit_previous_1 = $limit_start - $absolute_difference; $limit_previous_2 = $limit_end - $absolute_difference; $page_url = $globalURL . '/registration/' . $_GET['registration']; if (isset($_GET['sort'])) { $spotter_array = $Spotter->getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, $_GET['sort']); } else { $spotter_array = $Spotter->getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, ''); } $aircraft_array = $Spotter->getAircraftInfoByRegistration($_GET['registration']); if (!empty($spotter_array)) { $title = 'Detailed View of aircraft with registration ' . $_GET['registration']; require 'header.php'; print '<div class="info column">'; print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>'; print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>'; print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>'; print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>'; print '</div>'; include 'registration-sub-menu.php'; print '<div class="table column">';
$limit_end = 25; $absolute_difference = 25; } else { $limit_explode = explode(",", $_GET['limit']); $limit_start = $limit_explode[0]; $limit_end = $limit_explode[1]; } $absolute_difference = abs($limit_start - $limit_end); $limit_next = $limit_end + $absolute_difference; $limit_previous_1 = $limit_start - $absolute_difference; $limit_previous_2 = $limit_end - $absolute_difference; $page_url = $globalURL . '/registration/' . $_GET['registration']; if (isset($_GET['sort'])) { $spotter_array = Spotter::getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, $_GET['sort']); } else { $spotter_array = Spotter::getSpotterDataByRegistration($_GET['registration'], $limit_start . "," . $absolute_difference, ''); } $aircraft_array = Spotter::getAircraftInfoByRegistration($_GET['registration']); if (!empty($spotter_array)) { $title = 'Detailed View of aircraft with registration ' . $_GET['registration']; require 'header.php'; print '<div class="info column">'; print '<h1>' . $_GET['registration'] . ' - ' . $aircraft_array[0]['aircraft_name'] . ' (' . $aircraft_array[0]['aircraft_icao'] . ')</h1>'; print '<div><span class="label">Name</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_name'] . '</a></div>'; print '<div><span class="label">ICAO</span><a href="' . $globalURL . '/aircraft/' . $aircraft_array[0]['aircraft_icao'] . '">' . $aircraft_array[0]['aircraft_icao'] . '</a></div>'; print '<div><span class="label">Manufacturer</span><a href="' . $globalURL . '/manufacturer/' . strtolower(str_replace(" ", "-", $aircraft_array[0]['aircraft_manufacturer'])) . '">' . $aircraft_array[0]['aircraft_manufacturer'] . '</a></div>'; print '</div>'; include 'registration-sub-menu.php'; print '<div class="table column">'; print '<p>The table below shows the detailed information of all flights of aircraft with the registration <strong>' . $_GET['registration'] . '</strong>.</p>'; include 'table-output.php';