2 require_once('require/class.Connection.php');
3 require_once('require/class.Spotter.php');
4 require_once('require/class.Language.php');
5 $Spotter = new Spotter();
6 $title = _("Statistics").' - '._("Most common Route by Waypoint");
7 require_once('header.php');
8 if (!isset($filter_name)) $filter_name = '';
9 include('statistics-sub-menu.php');
11 print '<div class="info">
12 <h1>'._("Most common Route by Waypoint").'</h1>
14 <p>'._("Below are the <strong>Top 10</strong> most common routes, based on the waypoint data. Theoretically, since the waypoint data is the full 'planned flight route' this statistic would show the actual most common route.").'</p>';
16 $route_array = $Spotter->countAllRoutesWithWaypoints();
17 if (!empty($route_array))
19 print '<div class="table-responsive">';
20 print '<table class="common-routes-waypoints table-striped">';
23 print '<th>'._("Departure Airport").'</th>';
24 print '<th>'._("Arrival Airport").'</th>';
25 print '<th>'._("# of times").'</th>';
30 foreach($route_array as $route_item)
33 print '<td><strong>'.$i.'</strong></td>';
35 print '<a href="'.$globalURL.'/airport/'.$route_item['airport_departure_icao'].'">'.$route_item['airport_departure_city'].', '.$route_item['airport_departure_country'].' ('.$route_item['airport_departure_icao'].')</a>';
38 print '<a href="'.$globalURL.'/airport/'.$route_item['airport_arrival_icao'].'">'.$route_item['airport_arrival_city'].', '.$route_item['airport_arrival_country'].' ('.$route_item['airport_arrival_icao'].')</a>';
40 print '<td>'.$route_item['route_count'].'</td>';
42 print '<a href="'.$globalURL.'/flightid/'.$route_item['spotter_id'].'">'._("Recent Flight on this route").'</a>';
52 require_once('footer.php');