@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
25 | - foreach($airline_names as $airline_name) |
|
25 | + foreach ($airline_names as $airline_name) |
|
26 | 26 | { |
27 | - if($airline == $airline_name['airline_icao']) |
|
27 | + if ($airline == $airline_name['airline_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | include('airline-sub-menu.php'); |
63 | 63 | print '<div class="column">'; |
64 | 64 | print '<h2>'._("Most Common Routes").'</h2>'; |
65 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
65 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
66 | 66 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
67 | 67 | if (!empty($route_array)) |
68 | 68 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | print '</thead>'; |
79 | 79 | print '<tbody>'; |
80 | 80 | $i = 1; |
81 | - foreach($route_array as $route_item) |
|
81 | + foreach ($route_array as $route_item) |
|
82 | 82 | { |
83 | 83 | print '<tr>'; |
84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,13 +3,13 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
8 | -$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
8 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
9 | 9 | |
10 | 10 | if (!empty($spotter_array)) |
11 | 11 | { |
12 | - $title = sprintf(_("Most Common Arrival Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | + $title = sprintf(_("Most Common Arrival Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | 13 | |
14 | 14 | require_once('header.php'); |
15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
28 | 28 | print '<br />'; |
29 | 29 | print '<div class="info column">'; |
30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
31 | 31 | print '</div>'; |
32 | 32 | |
33 | 33 | include('date-sub-menu.php'); |
34 | 34 | print '<div class="column">'; |
35 | 35 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
36 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
36 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
37 | 37 | $airport_airport_array = $Spotter->countAllArrivalAirportsByDate($date); |
38 | 38 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
39 | 39 | <script> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ["'._("Airport").'", "'._("# of times").'"],'; |
49 | 49 | |
50 | 50 | $airport_data = ''; |
51 | - foreach($airport_airport_array as $airport_item) |
|
51 | + foreach ($airport_airport_array as $airport_item) |
|
52 | 52 | { |
53 | 53 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
54 | 54 | $name = str_replace("'", "", $name); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | print '</thead>'; |
88 | 88 | print '<tbody>'; |
89 | 89 | $i = 1; |
90 | - foreach($airport_airport_array as $airport_item) |
|
90 | + foreach ($airport_airport_array as $airport_item) |
|
91 | 91 | { |
92 | 92 | print '<tr>'; |
93 | 93 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $title = _("Unknown Date"); |
113 | 113 | require_once('header.php'); |
114 | 114 | print '<h1>'._("Error").'</h1>'; |
115 | - print '<p>'._("Sorry, this date does not exist in this database. :(");'</p>'; |
|
115 | + print '<p>'._("Sorry, this date does not exist in this database. :("); '</p>'; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | require_once('footer.php'); |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | header('Location: '.$globalURL.'/aircraft'); |
9 | 9 | die(); |
10 | 10 | } |
11 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
11 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
12 | 12 | $Spotter = new Spotter(); |
13 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
14 | 14 | |
15 | 15 | |
16 | 16 | if (!empty($spotter_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Airlines from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
18 | + $title = sprintf(_("Most Common Airlines from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
21 | 21 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $Stats = new Stats(); |
25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
26 | 26 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
27 | - foreach($aircraft_types as $aircrafttype) |
|
27 | + foreach ($aircraft_types as $aircrafttype) |
|
28 | 28 | { |
29 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
29 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
32 | 32 | } else { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | include('aircraft-sub-menu.php'); |
53 | 53 | print '<div class="column">'; |
54 | 54 | print '<h2>'._("Most Common Airlines").'</h2>'; |
55 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
55 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
56 | 56 | |
57 | 57 | $airline_array = $Spotter->countAllAirlinesByAircraft($aircraft_type); |
58 | 58 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | print '</thead>'; |
71 | 71 | print '<tbody>'; |
72 | 72 | $i = 1; |
73 | - foreach($airline_array as $airline_item) |
|
73 | + foreach ($airline_array as $airline_item) |
|
74 | 74 | { |
75 | 75 | print '<tr>'; |
76 | 76 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Departure Airports from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Departure Airports from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | $airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer); |
49 | 49 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
50 | 50 | <script> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ["'._("Airport").'", "'._("# of times").'"],'; |
60 | 60 | |
61 | 61 | $airport_data = ''; |
62 | - foreach($airport_airport_array as $airport_item) |
|
62 | + foreach ($airport_airport_array as $airport_item) |
|
63 | 63 | { |
64 | 64 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
65 | 65 | $name = str_replace("'", "", $name); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | print '</thead>'; |
99 | 99 | print '<tbody>'; |
100 | 100 | $i = 1; |
101 | - foreach($airport_airport_array as $airport_item) |
|
101 | + foreach ($airport_airport_array as $airport_item) |
|
102 | 102 | { |
103 | 103 | print '<tr>'; |
104 | 104 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Airlines by Country from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Airlines by Country from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | $airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer); |
49 | 49 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
50 | 50 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ["'._("Country").'", "'._("# of times").'"], '; |
57 | 57 | |
58 | 58 | $country_data = ''; |
59 | - foreach($airline_array as $airline_item) |
|
59 | + foreach ($airline_array as $airline_item) |
|
60 | 60 | { |
61 | 61 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
62 | 62 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | print '</thead>'; |
91 | 91 | print '<tbody>'; |
92 | 92 | $i = 1; |
93 | - foreach($airline_array as $airline_item) |
|
93 | + foreach ($airline_array as $airline_item) |
|
94 | 94 | { |
95 | 95 | print '<tr>'; |
96 | 96 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
20 | 20 | $previous = null; |
21 | 21 | print '<div class="alphabet-legend">'; |
22 | - foreach($aircraft_types as $value) { |
|
22 | + foreach ($aircraft_types as $value) { |
|
23 | 23 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
24 | 24 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
25 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
25 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
26 | 26 | { |
27 | 27 | if ($previous !== null) print ' | '; |
28 | 28 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | } |
32 | 32 | print '</div>'; |
33 | 33 | $previous = null; |
34 | - foreach($aircraft_types as $value) { |
|
34 | + foreach ($aircraft_types as $value) { |
|
35 | 35 | //$firstLetter = substr($value['aircraft_name'], 0, 1); |
36 | 36 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
37 | 37 | if ($firstLetter != "") |
38 | 38 | { |
39 | - if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
39 | + if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
|
40 | 40 | { |
41 | 41 | if ($previous !== null) print '</div>'; |
42 | 42 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | ["'._("Month").'", "'._("# of Fatalities").'"], '; |
24 | 24 | |
25 | 25 | $date_data = ''; |
26 | -foreach($date_array as $date_item) |
|
26 | +foreach ($date_array as $date_item) |
|
27 | 27 | { |
28 | - $date_data .= '[ "'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'",'.$date_item['count'].'],'; |
|
28 | + $date_data .= '[ "'.date('F, Y', strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'",'.$date_item['count'].'],'; |
|
29 | 29 | } |
30 | 30 | $date_data = substr($date_data, 0, -1); |
31 | 31 | print $date_data; |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | |
51 | 51 | if (!empty($date_array)) |
52 | 52 | { |
53 | - foreach($date_array as $key => $row) { |
|
53 | + foreach ($date_array as $key => $row) { |
|
54 | 54 | $years[$key] = $row['year']; |
55 | 55 | $months[$key] = $row['month']; |
56 | 56 | $counts[$key] = $row['count']; |
57 | 57 | } |
58 | 58 | // array_multisort($years,SORT_DESC,$months,SORT_DESC,$date_array); |
59 | - array_multisort($counts,SORT_DESC,$date_array); |
|
59 | + array_multisort($counts, SORT_DESC, $date_array); |
|
60 | 60 | print '<div class="table-responsive">'; |
61 | 61 | print '<table class="common-date table-striped">'; |
62 | 62 | print '<thead>'; |
@@ -66,12 +66,12 @@ discard block |
||
66 | 66 | print '</thead>'; |
67 | 67 | print '<tbody>'; |
68 | 68 | $i = 1; |
69 | - foreach($date_array as $date_item) |
|
69 | + foreach ($date_array as $date_item) |
|
70 | 70 | { |
71 | 71 | print '<tr>'; |
72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
73 | 73 | print '<td>'; |
74 | - print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$date_item['month'].'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
|
74 | + print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$date_item['month'].'">'.date('F, Y', strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
|
75 | 75 | print '</td>'; |
76 | 76 | print '<td>'; |
77 | 77 | print $date_item['count']; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | ["'._("Year").'", "'._("# of Fatalities").'"], '; |
24 | 24 | |
25 | 25 | $date_data = ''; |
26 | -foreach($date_array as $date_item) |
|
26 | +foreach ($date_array as $date_item) |
|
27 | 27 | { |
28 | 28 | $date_data .= '[ "'.$date_item['year'].'",'.$date_item['count'].'],'; |
29 | 29 | } |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | |
51 | 51 | if (!empty($date_array)) |
52 | 52 | { |
53 | - foreach($date_array as $key => $row) { |
|
53 | + foreach ($date_array as $key => $row) { |
|
54 | 54 | $years[$key] = $row['year']; |
55 | 55 | $counts[$key] = $row['count']; |
56 | 56 | } |
57 | 57 | //array_multisort($years,SORT_DESC,$date_array); |
58 | - array_multisort($counts,SORT_DESC,$date_array); |
|
58 | + array_multisort($counts, SORT_DESC, $date_array); |
|
59 | 59 | print '<div class="table-responsive">'; |
60 | 60 | print '<table class="common-date table-striped">'; |
61 | 61 | print '<thead>'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | print '</thead>'; |
66 | 66 | print '<tbody>'; |
67 | 67 | $i = 1; |
68 | - foreach($date_array as $date_item) |
|
68 | + foreach ($date_array as $date_item) |
|
69 | 69 | { |
70 | 70 | print '<tr>'; |
71 | 71 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | print '<th class="more"></th>'; |
96 | 96 | print '</thead>'; |
97 | -} else if (strtolower($current_page) == "upcoming"){ |
|
97 | +} else if (strtolower($current_page) == "upcoming") { |
|
98 | 98 | print '<thead>'; |
99 | 99 | if ($_GET['sort'] == "airline_name_asc") |
100 | 100 | { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | */ |
146 | 146 | print '</thead>'; |
147 | -} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){ |
|
147 | +} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
|
148 | 148 | print '<thead>'; |
149 | 149 | print '<th class="aircraft_thumbnail"></th>'; |
150 | 150 | print '<th class="logo">'._("Airline").'</th>'; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | print '</thead>'; |
182 | 182 | } else { |
183 | 183 | |
184 | - if ($hide_th_links === true){ |
|
184 | + if ($hide_th_links === true) { |
|
185 | 185 | print '<thead>'; |
186 | 186 | print '<th class="aircraft_thumbnail"></th>'; |
187 | 187 | if ($_GET['sort'] == "airline_name_asc") |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | } |
363 | 363 | |
364 | 364 | print '<tbody>'."\n"; |
365 | -foreach($spotter_array as $spotter_item) |
|
365 | +foreach ($spotter_array as $spotter_item) |
|
366 | 366 | { |
367 | 367 | if (isset($globalTimezone)) |
368 | 368 | { |
@@ -393,13 +393,13 @@ discard block |
||
393 | 393 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
394 | 394 | } |
395 | 395 | if (isset($spotter_item['airline_name'])) { |
396 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
396 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
397 | 397 | } else { |
398 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
398 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
399 | 399 | } |
400 | 400 | } else { |
401 | 401 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
402 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
402 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
403 | 403 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
404 | 404 | if (isset($spotter_item['airline_name'])) { |
405 | 405 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | print '<img src="'.$globalURL.'/images/placeholder_thumb.png" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" />'."\n"; |
414 | 414 | print '</td>'."\n"; |
415 | 415 | } |
416 | - } elseif(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed"){ |
|
416 | + } elseif (strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed") { |
|
417 | 417 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
418 | 418 | $spotter_item['squawk'] = '-'; |
419 | 419 | } |
@@ -429,17 +429,17 @@ discard block |
||
429 | 429 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
430 | 430 | } |
431 | 431 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
432 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
432 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
433 | 433 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
434 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
434 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
435 | 435 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
436 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
436 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
437 | 437 | } else { |
438 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
438 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
439 | 439 | } |
440 | 440 | } else { |
441 | 441 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
442 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
442 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
443 | 443 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
444 | 444 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
445 | 445 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | } |
503 | 503 | print '</td>'."\n"; |
504 | 504 | // Aircraft type |
505 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
505 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
506 | 506 | print '<td class="type">'."\n"; |
507 | 507 | if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) { |
508 | 508 | print '<span class="nomobile">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</span>'."\n"; |
@@ -526,22 +526,22 @@ discard block |
||
526 | 526 | } |
527 | 527 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
528 | 528 | if ($spotter_item['departure_airport_time'] > 2460) { |
529 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
530 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
529 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
530 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
531 | 531 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
532 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
532 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
533 | 533 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
534 | 534 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
535 | 535 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
536 | 536 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
537 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
537 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
538 | 538 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
539 | 539 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
540 | 540 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
541 | 541 | if ($spotter_item['departure_airport_time'] > 2460) { |
542 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
542 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
543 | 543 | } else { |
544 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
544 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
545 | 545 | } |
546 | 546 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
547 | 547 | } |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | $latitude = $spotter_item['latitude']; |
557 | 557 | $longitude = $spotter_item['longitude']; |
558 | 558 | } |
559 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
559 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
560 | 560 | } else $distance = ''; |
561 | 561 | if ($distance != '') { |
562 | 562 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -597,20 +597,20 @@ discard block |
||
597 | 597 | } |
598 | 598 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
599 | 599 | if ($spotter_item['arrival_airport_time'] > 2460) { |
600 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
600 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
601 | 601 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
602 | 602 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
603 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
603 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
604 | 604 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
605 | 605 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
606 | 606 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
607 | 607 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
608 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
608 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
609 | 609 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
610 | 610 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
611 | 611 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
612 | 612 | if ($spotter_item['arrival_airport_time'] > 2460) { |
613 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
613 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
614 | 614 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
615 | 615 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
616 | 616 | } |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | $latitude = $spotter_item['latitude']; |
624 | 624 | $longitude = $spotter_item['longitude']; |
625 | 625 | } |
626 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
626 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
627 | 627 | } else $distance = ''; |
628 | 628 | if ($distance != '') { |
629 | 629 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | print '</td>'."\n"; |
639 | 639 | if ((isset($globalIvAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalVAM) && $globalVAM) || (isset($globalphpVMS) && $globalphpVMS)) { |
640 | 640 | // Route stop |
641 | - if(strtolower($current_page) != "upcoming"){ |
|
641 | + if (strtolower($current_page) != "upcoming") { |
|
642 | 642 | print '<td class="route_stop">'."\n"; |
643 | 643 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') { |
644 | 644 | print '<span class="nomobile">-</span>'."\n"; |
@@ -663,21 +663,21 @@ discard block |
||
663 | 663 | } else { |
664 | 664 | //if (!isset($globalUnitDistance) || $globalUnitDistance == 'km') { |
665 | 665 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
666 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
667 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
666 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
667 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
668 | 668 | //} elseif ($globalUnitDistance == 'mi') { |
669 | 669 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
670 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
671 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
670 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
671 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
672 | 672 | //} elseif ($globalUnitDistance == 'nm') { |
673 | 673 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
674 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
675 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
674 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
675 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
676 | 676 | } |
677 | 677 | } |
678 | 678 | print '</td>'."\n"; |
679 | 679 | } |
680 | - if(strtolower($current_page) != "upcoming"){ |
|
680 | + if (strtolower($current_page) != "upcoming") { |
|
681 | 681 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
682 | 682 | print '<td class="pilot">'."\n"; |
683 | 683 | if ((!isset($spotter_item['pilot_id']) || $spotter_item['pilot_id'] == '') && (!isset($spotter_item['pilot_name']) || $spotter_item['pilot_name'] == '')) { |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
713 | 713 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
714 | 714 | print '<td class="message"><p>'."\n"; |
715 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
715 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
716 | 716 | print '</p><p class="decode">'; |
717 | 717 | $decode_array = json_decode($spotter_item['decode']); |
718 | 718 | foreach ($decode_array as $key => $value) { |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | print '</td>'."\n"; |
723 | 723 | } else { |
724 | 724 | print '<td class="message">'."\n"; |
725 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
725 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
726 | 726 | print '</td>'."\n"; |
727 | 727 | } |
728 | 728 | } |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | } |
748 | 748 | print '</td>'."\n"; |
749 | 749 | print '<td class="message">'."\n"; |
750 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
750 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
751 | 751 | print '</td>'."\n"; |
752 | 752 | } |
753 | 753 | if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") { |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | print '</td>'."\n"; |
774 | 774 | */ |
775 | 775 | print '<td class="message">'."\n"; |
776 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
776 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
777 | 777 | print '</td>'."\n"; |
778 | 778 | } |
779 | 779 | // Date |