1 <span
class="sub-menu-statistic column mobile">
2 <a href
="#" onclick
="showSubMenu(); return false;"><?php
echo _("Statistics"); ?
> <i
class="fa fa-plus"></i
></a
>
4 <div
class="stats_airline">
6 if (!isset($type) ||
$type != 'satellite') {
8 <form id
="changedate" method
="post">
9 <input type
="month" name
="date" onchange
="statsdatechange(this);" value
="<?php if (isset($year) && $year != '') echo $year.'-'; ?><?php if (isset($month) && $month != '') echo $month; ?>" />
15 if (!isset($type) ||
$type == 'aircraft') {
17 <form id
="changeairline" method
="post">
18 <!--<select name
="airline" class="selectpicker" onchange
="this.form.submit()">-->
19 <select name
="airline" class="selectpicker" onchange
="statsairlinechange(this)">
21 if (isset($airline_icao) && ($airline_icao == '' ||
$airline_icao == 'all')) {
22 print '<option value="all" selected>All</option>';
24 print '<option value="all">All</option>';
26 print '<option disabled>──────────</option>';
27 require_once('require/class.Stats.php');
28 $Spotter = new Spotter();
29 $alliances = $Spotter->getAllAllianceNames();
30 if (!empty($alliances)) {
31 foreach($alliances as $alliance) {
32 if (isset($airline_icao) && str_replace('_',' ',str_replace('alliance_','',$airline_icao)) == $alliance['alliance']) {
33 print '<option value="alliance_'.str_replace(' ','_',$alliance['alliance']).'" selected>'.$alliance['alliance'].'</option>';
35 print '<option value="alliance_'.str_replace(' ','_',$alliance['alliance']).'">'.$alliance['alliance'].'</option>';
38 print '<option disabled>──────────</option>';
41 if (!isset($filter_name)) $filter_name = '';
42 $airlines = $Stats->getAllAirlineNames($filter_name);
43 foreach($airlines as $airline) {
44 if ($airline['airline_icao'] != '') {
45 if (isset($airline_icao) && $airline_icao != 'all' && $airline_icao == $airline['airline_icao']) {
46 print '<option value="'.$airline['airline_icao'].'" selected>'.$airline['airline_name'].'</option>';
48 print '<option value="'.$airline['airline_icao'].'">'.$airline['airline_name'].'</option>';
60 if (!isset($year) ||
(isset($year) && $year == '') && !isset($month) ||
(isset($month) && $month == '')) {
62 <div
class="sub-menu sub-menu-container">
65 if (!isset($type) ||
$type == 'aircraft') {
68 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-aircraft
" || strtolower($current_page) == "statistics
-registration
" || strtolower($current_page) == "statistics
-manufacturer
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#" >
69 <?php
echo _("Aircraft"); ?
> <span
class="caret"></span
>
71 <ul
class="dropdown-menu">
72 <li
><a href
="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Aircraft"); ?
></a
></li
>
73 <li
><a href
="<?php print $globalURL; ?>/statistics/registration<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Registration"); ?
></a
></li
>
74 <li
><a href
="<?php print $globalURL; ?>/statistics/manufacturer<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Manufacturer"); ?
></a
></li
>
75 <li
><a href
="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Country"); ?
></a
></li
>
79 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-airline
" || strtolower($current_page) == "statistics
-airline
-country
" || strtolower($current_page) == "statistics
-callsign
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
80 <?php
echo _("Airline"); ?
> <span
class="caret"></span
>
82 <ul
class="dropdown-menu" role
="menu">
84 if (!isset($airline_icao) ||
$airline_icao == 'all') {
86 <li
><a href
="<?php print $globalURL; ?>/statistics/airline<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Airline"); ?
></a
></li
>
87 <li
><a href
="<?php print $globalURL; ?>/statistics/airline-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Airline by Country"); ?
></a
></li
>
91 <li
><a href
="<?php print $globalURL; ?>/statistics/callsign<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Callsign"); ?
></a
></li
>
95 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-airport
-departure
" || strtolower($current_page) == "statistics
-airport
-departure
-country
" || strtolower($current_page) == "statistics
-airport
-arrival
" || strtolower($current_page) == "statistics
-airport
-arrival
-country
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
96 <?php
echo _("Airport"); ?
> <span
class="caret"></span
>
98 <ul
class="dropdown-menu" role
="menu">
99 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-departure<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Departure Airport"); ?
></a
></li
>
100 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-departure-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Departure Airport by Country"); ?
></a
></li
>
101 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-arrival<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Arrival Airport"); ?
></a
></li
>
102 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-arrival-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Arrival Airport by Country"); ?
></a
></li
>
105 <li
class="dropdown">
106 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-route
-airport
" || strtolower($current_page) == "statistics
-route
-waypoint
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
107 <?php
echo _("Route"); ?
> <span
class="caret"></span
>
109 <ul
class="dropdown-menu" role
="menu">
110 <li
><a href
="<?php print $globalURL; ?>/statistics/route-airport<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Route by Airport"); ?
></a
></li
>
111 <li
><a href
="<?php print $globalURL; ?>/statistics/route-waypoint<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Route by Waypoint"); ?
></a
></li
>
114 <li
class="dropdown">
115 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-date
" || strtolower($current_page) == "statistics
-time
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
116 <?php
echo _("Date & Time"); ?
> <span
class="caret"></span
>
118 <ul
class="dropdown-menu" role
="menu">
119 <li
><a href
="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Date"); ?
></a
></li
>
120 <li
><a href
="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php
echo _("Time"); ?
></a
></li
>
124 if (isset($globalAccidents) && $globalAccidents && (!isset($airline_icao) ||
$airline_icao == '' ||
$airline_icao == 'all')) {
126 <li
class="dropdown">
127 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-fatalities
-year
" || strtolower($current_page) == "statistics
-fatalities
-month
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
128 <?php
echo _("Fatalities"); ?
> <span
class="caret"></span
>
130 <ul
class="dropdown-menu" role
="menu">
131 <li
><a href
="<?php print $globalURL; ?>/statistics/fatalities/year"><?php
echo _("Fatalities by Year"); ?
></a
></li
>
132 <li
><a href
="<?php print $globalURL; ?>/statistics/fatalities/month"><?php
echo _("Fatalities last 12 months"); ?
></a
></li
>
139 } elseif ($type == 'marine' ||
$type == 'tracker') {
141 <li
class="dropdown">
142 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-date
" || strtolower($current_page) == "statistics
-time
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
143 <?php
echo _("Date & Time"); ?
> <span
class="caret"></span
>
145 <ul
class="dropdown-menu" role
="menu">
146 <li
><a href
="<?php print $globalURL; ?>/<?php print $type; ?>/statistics/date"><?php
echo _("Date"); ?
></a
></li
>
147 <li
><a href
="<?php print $globalURL; ?>/<?php print $type; ?>/statistics/time"><?php
echo _("Time"); ?
></a
></li
>
151 if ($type == 'marine') {
153 <li
><a href
="<?php print $globalURL; ?>/<?php print $type; ?>/statistics/type"><?php
echo _("Type"); ?
></a
></li
>
155 if (isset($globalVM) && $globalVM) {
157 <li
><a href
="<?php print $globalURL; ?>/<?php print $type; ?>/statistics/race"><?php
echo _("Race"); ?
></a
></li
>
171 <div
class="sub-menu sub-menu-container">
174 if (!isset($type) ||
$type == 'aircraft') {
176 <li
class="dropdown">
177 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-aircraft
" || strtolower($current_page) == "statistics
-registration
" || strtolower($current_page) == "statistics
-manufacturer
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#" >
178 <?php
echo _("Aircraft"); ?
> <span
class="caret"></span
>
180 <ul
class="dropdown-menu">
181 <li
><a href
="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Aircraft"); ?
></a
></li
>
182 <li
><a href
="<?php print $globalURL; ?>/statistics/registration<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Registration"); ?
></a
></li
>
183 <li
><a href
="<?php print $globalURL; ?>/statistics/manufacturer<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Manufacturer"); ?
></a
></li
>
184 <!-- <li
><a href
="<?php print $globalURL; ?>/statistics/country"><?php
echo _("Country"); ?
></a
></li
> -->
187 <li
class="dropdown">
188 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-airline
" || strtolower($current_page) == "statistics
-airline
-country
" || strtolower($current_page) == "statistics
-callsign
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
189 <?php
echo _("Airline"); ?
> <span
class="caret"></span
>
191 <ul
class="dropdown-menu" role
="menu">
193 if (!isset($airline_icao) ||
$airline_icao == 'all') {
195 <li
><a href
="<?php print $globalURL; ?>/statistics/airline<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Airline"); ?
></a
></li
>
196 <li
><a href
="<?php print $globalURL; ?>/statistics/airline-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Airline by Country"); ?
></a
></li
>
200 <li
><a href
="<?php print $globalURL; ?>/statistics/callsign<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Callsign"); ?
></a
></li
>
203 <li
class="dropdown">
204 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-airport
-departure
" || strtolower($current_page) == "statistics
-airport
-departure
-country
" || strtolower($current_page) == "statistics
-airport
-arrival
" || strtolower($current_page) == "statistics
-airport
-arrival
-country
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
205 <?php
echo _("Airport"); ?
> <span
class="caret"></span
>
207 <ul
class="dropdown-menu" role
="menu">
208 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-departure<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Departure Airport"); ?
></a
></li
>
209 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-departure-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Departure Airport by Country"); ?
></a
></li
>
210 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-arrival<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Arrival Airport"); ?
></a
></li
>
211 <li
><a href
="<?php print $globalURL; ?>/statistics/airport-arrival-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php
echo _("Arrival Airport by Country"); ?
></a
></li
>
215 <li
class="dropdown">
216 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-route
-airport
" || strtolower($current_page) == "statistics
-route
-waypoint
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
217 <?php
echo _("Route"); ?
> <span
class="caret"></span
>
219 <ul
class="dropdown-menu" role
="menu">
220 <li
><a href
="<?php print $globalURL; ?>/statistics/route-airport"><?php
echo _("Route by Airport"); ?
></a
></li
>
221 <li
><a href
="<?php print $globalURL; ?>/statistics/route-waypoint"><?php
echo _("Route by Waypoint"); ?
></a
></li
>
226 <li
class="dropdown">
227 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-date
" || strtolower($current_page) == "statistics
-time
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
228 <?php
echo _("Date & Time"); ?
> <span
class="caret"></span
>
230 <ul
class="dropdown-menu" role
="menu">
231 <li
><a href
="<?php print $globalURL; ?>/statistics/date"><?php
echo _("Date"); ?
></a
></li
>
232 <li
><a href
="<?php print $globalURL; ?>/statistics/time"><?php
echo _("Time"); ?
></a
></li
>
237 if (isset($globalAccidents) && $globalAccidents && (!isset($airline_icao) ||
$airline_icao == '' ||
$airline_icao == 'all')) {
240 <li
class="dropdown">
241 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-fatalities
-year
" || strtolower($current_page) == "statistics
-fatalities
-month
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
242 <?php
echo _("Fatalities"); ?
> <span
class="caret"></span
>
244 <ul
class="dropdown-menu" role
="menu">
245 <li
><a href
="<?php print $globalURL; ?>/statistics/fatalities/year"><?php
echo _("Fatalities by Year"); ?
></a
></li
>
246 <li
><a href
="<?php print $globalURL; ?>/statistics/fatalities/month"><?php
echo _("Fatalities last 12 months"); ?
></a
></li
>
254 } elseif ($type == 'marine' ||
$type == 'tracker') {
256 <li
class="dropdown">
257 <a
class="dropdown-toggle <?php if(strtolower($current_page) == "statistics
-date
" || strtolower($current_page) == "statistics
-time
"){ print 'active'; } ?>" data
-toggle
="dropdown" href
="#">
258 <?php
echo _("Date & Time"); ?
> <span
class="caret"></span
>
260 <ul
class="dropdown-menu" role
="menu">
261 <li
><a href
="<?php print $globalURL; ?>/<?php print $type; ?>/statistics/date"><?php
echo _("Date"); ?
></a
></li
>
262 <li
><a href
="<?php print $globalURL; ?>/<?php print $type; ?>/statistics/time"><?php
echo _("Time"); ?
></a
></li
>