@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | var data = google.visualization.arrayToDataTable([ |
23 | 23 | ["'._("Aircraft Manufacturer").'", "'._("# of times").'"], '; |
24 | 24 | $manufacturer_data = ''; |
25 | -foreach($manufacturers_array as $manufacturer_item) |
|
25 | +foreach ($manufacturers_array as $manufacturer_item) |
|
26 | 26 | { |
27 | 27 | $manufacturer_data .= '[ "'.$manufacturer_item['aircraft_manufacturer'].'",'.$manufacturer_item['aircraft_manufacturer_count'].'],'; |
28 | 28 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | print '</thead>'; |
56 | 56 | print '<tbody>'; |
57 | 57 | $i = 1; |
58 | - foreach($manufacturers_array as $manufacturer_item) |
|
58 | + foreach ($manufacturers_array as $manufacturer_item) |
|
59 | 59 | { |
60 | 60 | print '<tr>'; |
61 | 61 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Arrival Airports by Country of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports by Country of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByIdent($ident); |
29 | 29 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
30 | 30 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | var data = google.visualization.arrayToDataTable([ |
36 | 36 | ["'._("Country").'", "'._("# of times").'"], '; |
37 | 37 | $country_data = ''; |
38 | - foreach($airport_country_array as $airport_item) |
|
38 | + foreach ($airport_country_array as $airport_item) |
|
39 | 39 | { |
40 | 40 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
41 | 41 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | print '</thead>'; |
70 | 70 | print '<tbody>'; |
71 | 71 | $i = 1; |
72 | - foreach($airport_country_array as $airport_item) |
|
72 | + foreach ($airport_country_array as $airport_item) |
|
73 | 73 | { |
74 | 74 | print '<tr>'; |
75 | 75 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | date_default_timezone_set('UTC'); |
30 | 30 | } |
31 | 31 | //print_r($hour_array); |
32 | -foreach($hour_array as $hour_item) |
|
32 | +foreach ($hour_array as $hour_item) |
|
33 | 33 | { |
34 | 34 | $hour_data .= '[ "'.$hour_item['hour_name'].':00",'.$hour_item['hour_count'].'],'; |
35 | 35 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print '</thead>'; |
67 | 67 | print '<tbody>'; |
68 | 68 | $i = 1; |
69 | - foreach($hour_array as $hour_item) |
|
69 | + foreach ($hour_array as $hour_item) |
|
70 | 70 | { |
71 | 71 | print '<tr>'; |
72 | 72 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | $airport_airport_array = $Spotter->countAllArrivalAirportsByIdent($ident); |
29 | 29 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
30 | 30 | <script> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | ["'._("Airport").'", "'._("# of times").'"],'; |
40 | 40 | |
41 | 41 | $airport_data = ''; |
42 | - foreach($airport_airport_array as $airport_item) |
|
42 | + foreach ($airport_airport_array as $airport_item) |
|
43 | 43 | { |
44 | 44 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
45 | 45 | $name = str_replace("'", "", $name); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | print '</thead>'; |
79 | 79 | print '<tbody>'; |
80 | 80 | $i = 1; |
81 | - foreach($airport_airport_array as $airport_item) |
|
81 | + foreach ($airport_airport_array as $airport_item) |
|
82 | 82 | { |
83 | 83 | print '<tr>'; |
84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | $page_url = $globalURL.'/acars-archive'; |
10 | 10 | |
11 | -if(!isset($_GET['limit'])) |
|
11 | +if (!isset($_GET['limit'])) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
@@ -36,8 +36,12 @@ |
||
36 | 36 | if (!empty($spotter_array)) { |
37 | 37 | include('table-output.php'); |
38 | 38 | print '<div class="pagination">'; |
39 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'/'.$_GET['sort'].'">«'._("Previous Page").'</a>'; |
|
40 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'/'.$_GET['sort'].'">'._("Next Page").'»</a>'; |
|
39 | + if ($limit_previous_1 >= 0) { |
|
40 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'/'.$_GET['sort'].'">«'._("Previous Page").'</a>'; |
|
41 | + } |
|
42 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
43 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'/'.$_GET['sort'].'">'._("Next Page").'»</a>'; |
|
44 | + } |
|
41 | 45 | print '</div>'; |
42 | 46 | } |
43 | 47 | print '</div>'; |
@@ -48,73 +48,73 @@ |
||
48 | 48 | print '</div>'; |
49 | 49 | print '<div><span>'._("Altitude").'</span>'; |
50 | 50 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
51 | - print $spotter_item['altitude'].'feet'; |
|
51 | + print $spotter_item['altitude'].'feet'; |
|
52 | 52 | } else { |
53 | - print round($spotter_item['altitude']*0.3048).' m'; |
|
53 | + print round($spotter_item['altitude']*0.3048).' m'; |
|
54 | 54 | } |
55 | 55 | print '</div>'; |
56 | 56 | print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
57 | 57 | print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],3).', '.round($spotter_item['longitude'],3).'</div>'; |
58 | 58 | if (isset($spotter_item['home_link']) && $spotter_item['home_link'] != '' && isset($spotter_item['wikipedia_link']) && $spotter_item['wikipedia_link'] != '') { |
59 | - print '<div><span>'._("Links").'</span>'; |
|
60 | - print '<a href="'.$spotter_item['home_link'].'">'._("Homepage").'</a>'; |
|
61 | - print ' - '; |
|
62 | - print '<a href="'.$spotter_item['wikipedia_link'].'">Wikipedia</a>'; |
|
63 | - print '</div>'; |
|
59 | + print '<div><span>'._("Links").'</span>'; |
|
60 | + print '<a href="'.$spotter_item['home_link'].'">'._("Homepage").'</a>'; |
|
61 | + print ' - '; |
|
62 | + print '<a href="'.$spotter_item['wikipedia_link'].'">Wikipedia</a>'; |
|
63 | + print '</div>'; |
|
64 | 64 | } elseif (isset($spotter_item['home_link']) && $spotter_item['home_link'] != '') { |
65 | - print '<div><span>'._("Links").'</span>'; |
|
66 | - print '<a href="'.$spotter_item['home_link'].'">'._("Homepage").'</a>'; |
|
67 | - print '</div>'; |
|
65 | + print '<div><span>'._("Links").'</span>'; |
|
66 | + print '<a href="'.$spotter_item['home_link'].'">'._("Homepage").'</a>'; |
|
67 | + print '</div>'; |
|
68 | 68 | } elseif (isset($spotter_item['wikipedia_link']) && $spotter_item['wikipedia_link'] != '') { |
69 | - print '<div><span>'._("Links").'</span>'; |
|
70 | - print '<a href="'.$spotter_item['wikipedia_link'].'">Wikipedia</a>'; |
|
71 | - print '</div>'; |
|
69 | + print '<div><span>'._("Links").'</span>'; |
|
70 | + print '<a href="'.$spotter_item['wikipedia_link'].'">Wikipedia</a>'; |
|
71 | + print '</div>'; |
|
72 | 72 | } |
73 | 73 | print '</div>'; |
74 | 74 | |
75 | 75 | if (isset($metar_parse)) { |
76 | - print '<div class="waypoints">'; |
|
77 | - print '<div><span>METAR</span>'; |
|
78 | - print '<i>'.$metar_info[0]['metar'].'</i><br />'; |
|
79 | - print '<b>'.$metar_info[0]['metar_date'].'</b><br />'; |
|
76 | + print '<div class="waypoints">'; |
|
77 | + print '<div><span>METAR</span>'; |
|
78 | + print '<i>'.$metar_info[0]['metar'].'</i><br />'; |
|
79 | + print '<b>'.$metar_info[0]['metar_date'].'</b><br />'; |
|
80 | 80 | // print_r($metar_parse); |
81 | - if (isset($metar_parse['wind'])) { |
|
82 | - print _("Wind:").' '; |
|
81 | + if (isset($metar_parse['wind'])) { |
|
82 | + print _("Wind:").' '; |
|
83 | 83 | if (isset($metar_parse['wind']['direction'])) { |
84 | - $direction = $Spotter->parseDirection($metar_parse['wind']['direction']); |
|
85 | - print $direction[0]['direction_fullname']; |
|
86 | - print ' ('.$metar_parse['wind']['direction'].'°) '; |
|
87 | - } |
|
88 | - if (isset($metar_parse['wind']['speed'])) { |
|
89 | - print $metar_parse['wind']['speed'].' m/s'; |
|
90 | - } |
|
84 | + $direction = $Spotter->parseDirection($metar_parse['wind']['direction']); |
|
85 | + print $direction[0]['direction_fullname']; |
|
86 | + print ' ('.$metar_parse['wind']['direction'].'°) '; |
|
87 | + } |
|
88 | + if (isset($metar_parse['wind']['speed'])) { |
|
89 | + print $metar_parse['wind']['speed'].' m/s'; |
|
90 | + } |
|
91 | 91 | print '<br/>'; |
92 | - } |
|
93 | - if (isset($metar_parse['visibility'])) { |
|
94 | - print _("Visibility:").' '.$metar_parse['visibility'].' m'."<br/>"; |
|
95 | - } |
|
96 | - if (isset($metar_parse['weather'])) { |
|
97 | - print _("Weather:").' '.$metar_parse['weather']."<br/>"; |
|
98 | - } |
|
99 | - if (isset($metar_parse['temperature'])) { |
|
100 | - print _("Temperature:").' '.$metar_parse['temperature'].' °C'."<br/>"; |
|
101 | - } |
|
102 | - if (isset($metar_parse['dew'])) { |
|
103 | - print _("Dew point:").' '.$metar_parse['dew'].' °C'."<br/>"; |
|
104 | - } |
|
105 | - if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
|
92 | + } |
|
93 | + if (isset($metar_parse['visibility'])) { |
|
94 | + print _("Visibility:").' '.$metar_parse['visibility'].' m'."<br/>"; |
|
95 | + } |
|
96 | + if (isset($metar_parse['weather'])) { |
|
97 | + print _("Weather:").' '.$metar_parse['weather']."<br/>"; |
|
98 | + } |
|
99 | + if (isset($metar_parse['temperature'])) { |
|
100 | + print _("Temperature:").' '.$metar_parse['temperature'].' °C'."<br/>"; |
|
101 | + } |
|
102 | + if (isset($metar_parse['dew'])) { |
|
103 | + print _("Dew point:").' '.$metar_parse['dew'].' °C'."<br/>"; |
|
104 | + } |
|
105 | + if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
|
106 | 106 | $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
107 | 107 | print _("Humidity:").' '.$humidity.'%'."<br/>"; |
108 | - } |
|
109 | - if (isset($metar_parse['QNH'])) { |
|
110 | - print _("Pressure:").' '.$metar_parse['QNH'].' hPa'."<br/>"; |
|
111 | - } |
|
108 | + } |
|
109 | + if (isset($metar_parse['QNH'])) { |
|
110 | + print _("Pressure:").' '.$metar_parse['QNH'].' hPa'."<br/>"; |
|
111 | + } |
|
112 | 112 | /* |
113 | 113 | if (isset($metar_parse['QNH'])) { |
114 | 114 | print 'Pressure : '.$metar_parse['QNH'].' hPa'."<br/>"; |
115 | 115 | } |
116 | 116 | */ |
117 | - print '</div>'; |
|
117 | + print '</div>'; |
|
118 | 118 | /* |
119 | 119 | Wind: from the NNE (020 degrees) at 5 MPH (4 KT) (direction variable):0 |
120 | 120 | Visibility: greater than 7 mile(s):0 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | $Spotter = new Spotter(); |
7 | 7 | |
8 | 8 | if (isset($_GET['airport_icao'])) { |
9 | - $icao = filter_input(INPUT_GET,'airport_icao',FILTER_SANITIZE_STRING); |
|
9 | + $icao = filter_input(INPUT_GET, 'airport_icao', FILTER_SANITIZE_STRING); |
|
10 | 10 | $spotter_array = $Spotter->getAllAirportInfo($icao); |
11 | 11 | if (isset($globalMETAR) && $globalMETAR) { |
12 | 12 | $METAR = new METAR(); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | print '</div>'; |
56 | 56 | print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
57 | -print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],3).', '.round($spotter_item['longitude'],3).'</div>'; |
|
57 | +print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'], 3).', '.round($spotter_item['longitude'], 3).'</div>'; |
|
58 | 58 | if (isset($spotter_item['home_link']) && $spotter_item['home_link'] != '' && isset($spotter_item['wikipedia_link']) && $spotter_item['wikipedia_link'] != '') { |
59 | 59 | print '<div><span>'._("Links").'</span>'; |
60 | 60 | print '<a href="'.$spotter_item['home_link'].'">'._("Homepage").'</a>'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | print _("Dew point:").' '.$metar_parse['dew'].' °C'."<br/>"; |
104 | 104 | } |
105 | 105 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
106 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
106 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
107 | 107 | print _("Humidity:").' '.$humidity.'%'."<br/>"; |
108 | 108 | } |
109 | 109 | if (isset($metar_parse['QNH'])) { |
@@ -12,7 +12,9 @@ |
||
12 | 12 | $METAR = new METAR(); |
13 | 13 | $metar_info = $METAR->getMETAR($icao); |
14 | 14 | //print_r($metar_info); |
15 | - if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
15 | + if (isset($metar_info[0]['metar'])) { |
|
16 | + $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
17 | + } |
|
16 | 18 | //print_r($metar_parse); |
17 | 19 | } |
18 | 20 | } |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airline'])) { |
6 | - header('Location: '.$globalURL.'/airline'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airline'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | var data = google.visualization.arrayToDataTable([ |
74 | 74 | ["'._("Airport").'", "'._("# of times").'"],'; |
75 | - $airport_data = ''; |
|
75 | + $airport_data = ''; |
|
76 | 76 | foreach($airport_airport_array as $airport_item) |
77 | 77 | { |
78 | 78 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airline'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Arrival Airports from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Arrival Airports from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
20 | 20 | print '<option></option>'; |
21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
22 | - foreach($airline_names as $airline_name) |
|
22 | + foreach ($airline_names as $airline_name) |
|
23 | 23 | { |
24 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
24 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
25 | 25 | { |
26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | include('airline-sub-menu.php'); |
60 | 60 | print '<div class="column">'; |
61 | 61 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
62 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
62 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
63 | 63 | $airport_airport_array = $Spotter->countAllArrivalAirportsByAirline($airline); |
64 | 64 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
65 | 65 | <script> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | var data = google.visualization.arrayToDataTable([ |
74 | 74 | ["'._("Airport").'", "'._("# of times").'"],'; |
75 | 75 | $airport_data = ''; |
76 | - foreach($airport_airport_array as $airport_item) |
|
76 | + foreach ($airport_airport_array as $airport_item) |
|
77 | 77 | { |
78 | 78 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
79 | 79 | $name = str_replace("'", "", $name); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | print '</thead>'; |
113 | 113 | print '<tbody>'; |
114 | 114 | $i = 1; |
115 | - foreach($airport_airport_array as $airport_item) |
|
115 | + foreach ($airport_airport_array as $airport_item) |
|
116 | 116 | { |
117 | 117 | print '<tr>'; |
118 | 118 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -40,8 +40,7 @@ |
||
40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
41 | 41 | { |
42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
43 | - } |
|
44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
45 | 44 | { |
46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
47 | 46 | } |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airline'])) { |
6 | - header('Location: '.$globalURL.'/airline'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airline'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
62 | 62 | print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
63 | 63 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirline($airline); |
64 | - print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
|
64 | + print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
|
65 | 65 | <script> |
66 | 66 | google.load("visualization", "1", {packages:["geochart"]}); |
67 | 67 | google.setOnLoadCallback(drawCharts); |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airline'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Departure Airports from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Departure Airports from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
20 | 20 | print '<option></option>'; |
21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
22 | - foreach($airline_names as $airline_name) |
|
22 | + foreach ($airline_names as $airline_name) |
|
23 | 23 | { |
24 | - if($airline == $airline_name['airline_icao']) |
|
24 | + if ($airline == $airline_name['airline_icao']) |
|
25 | 25 | { |
26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | include('airline-sub-menu.php'); |
60 | 60 | print '<div class="column">'; |
61 | 61 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
62 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
62 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
63 | 63 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirline($airline); |
64 | 64 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
65 | 65 | <script> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | var data = google.visualization.arrayToDataTable([ |
74 | 74 | ["'._("Airport").'", "'._("# of times").'"],'; |
75 | 75 | $airport_data = ''; |
76 | - foreach($airport_airport_array as $airport_item) |
|
76 | + foreach ($airport_airport_array as $airport_item) |
|
77 | 77 | { |
78 | 78 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
79 | 79 | $name = str_replace("'", "", $name); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | print '</thead>'; |
113 | 113 | print '<tbody>'; |
114 | 114 | $i = 1; |
115 | - foreach($airport_airport_array as $airport_item) |
|
115 | + foreach ($airport_airport_array as $airport_item) |
|
116 | 116 | { |
117 | 117 | print '<tr>'; |
118 | 118 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -40,8 +40,7 @@ |
||
40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
41 | 41 | { |
42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
43 | - } |
|
44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
45 | 44 | { |
46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
47 | 46 | } |
@@ -361,17 +361,17 @@ discard block |
||
361 | 361 | else { |
362 | 362 | $planespotter_url_array = explode("_", $spotter_item['image']); |
363 | 363 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
364 | - $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
364 | + $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
365 | 365 | } |
366 | 366 | if (isset($spotter_item['airline_name'])) { |
367 | 367 | 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>'; |
368 | 368 | } else { |
369 | 369 | 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>'; |
370 | 370 | } |
371 | - } else { |
|
372 | - if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
373 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
374 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
371 | + } else { |
|
372 | + if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
373 | + $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
374 | + } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
375 | 375 | if (isset($spotter_item['airline_name'])) { |
376 | 376 | 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>'; |
377 | 377 | } else { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | } |
388 | 388 | if(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
389 | 389 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
390 | - $spotter_item['squawk'] = '-'; |
|
390 | + $spotter_item['squawk'] = '-'; |
|
391 | 391 | } |
392 | 392 | if ($spotter_item['image_thumbnail'] != "") |
393 | 393 | { |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | else { |
399 | 399 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
400 | 400 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
401 | - $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
401 | + $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
402 | 402 | } |
403 | 403 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
404 | 404 | 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>'; |
@@ -410,9 +410,9 @@ discard block |
||
410 | 410 | 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>'; |
411 | 411 | } |
412 | 412 | } else { |
413 | - if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
414 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
415 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
413 | + if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
414 | + $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
415 | + } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
416 | 416 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
417 | 417 | 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>'; |
418 | 418 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | print '</td>'."\n"; |
427 | 427 | } else { |
428 | 428 | print '<td class="aircraft_thumbnail">'."\n"; |
429 | - // print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
|
429 | + // print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
|
430 | 430 | //} |
431 | 431 | if (!isset($spotter_item['airline_name']) && !isset($spotter_item['aircraft_name'])) { |
432 | 432 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" 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:").' '._("Not available").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n"; |
@@ -523,13 +523,13 @@ discard block |
||
523 | 523 | } |
524 | 524 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
525 | 525 | if ($distance != '') { |
526 | - if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
527 | - echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
528 | - } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
529 | - echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
530 | - } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
531 | - echo '<br/><i>'.$distance.' km</i>'; |
|
532 | - } |
|
526 | + if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
527 | + echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
528 | + } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
529 | + echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
530 | + } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
531 | + echo '<br/><i>'.$distance.' km</i>'; |
|
532 | + } |
|
533 | 533 | } |
534 | 534 | } |
535 | 535 | print '</td>'."\n"; |
@@ -588,13 +588,13 @@ discard block |
||
588 | 588 | } |
589 | 589 | $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
590 | 590 | if ($distance != '') { |
591 | - if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
592 | - echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
593 | - } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
594 | - echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
595 | - } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
596 | - echo '<br/><i>'.$distance.' km</i>'; |
|
597 | - } |
|
591 | + if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
592 | + echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
593 | + } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
594 | + echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
595 | + } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
596 | + echo '<br/><i>'.$distance.' km</i>'; |
|
597 | + } |
|
598 | 598 | } |
599 | 599 | } |
600 | 600 | print '</td>'."\n"; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | print '<th class="more"></th>'; |
95 | 95 | print '</thead>'; |
96 | -} else if (strtolower($current_page) == "upcoming"){ |
|
96 | +} else if (strtolower($current_page) == "upcoming") { |
|
97 | 97 | print '<thead>'; |
98 | 98 | if ($_GET['sort'] == "airline_name_asc") |
99 | 99 | { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | print '<th class="time"><a href="'.$page_url.'/'.$limit_start.','.$limit_end.'/date_asc">'._("Expected Time").'</a> <i class="fa fa-sort small"></i></th>'; |
142 | 142 | } |
143 | 143 | print '</thead>'; |
144 | -} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){ |
|
144 | +} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
|
145 | 145 | print '<thead>'; |
146 | 146 | print '<th class="aircraft_thumbnail"></th>'; |
147 | 147 | print '<th class="logo">'._("Airline").'</th>'; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | print '</thead>'; |
153 | 153 | } else { |
154 | 154 | |
155 | - if ($hide_th_links === true){ |
|
155 | + if ($hide_th_links === true) { |
|
156 | 156 | print '<thead>'; |
157 | 157 | print '<th class="aircraft_thumbnail"></th>'; |
158 | 158 | if ($_GET['sort'] == "airline_name_asc") |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | } |
334 | 334 | |
335 | 335 | print '<tbody>'."\n"; |
336 | -foreach($spotter_array as $spotter_item) |
|
336 | +foreach ($spotter_array as $spotter_item) |
|
337 | 337 | { |
338 | 338 | if (isset($globalTimezone)) |
339 | 339 | { |
@@ -364,13 +364,13 @@ discard block |
||
364 | 364 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
365 | 365 | } |
366 | 366 | if (isset($spotter_item['airline_name'])) { |
367 | - 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>'; |
|
367 | + 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>'; |
|
368 | 368 | } else { |
369 | - 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>'; |
|
369 | + 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>'; |
|
370 | 370 | } |
371 | 371 | } else { |
372 | 372 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
373 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
373 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
374 | 374 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
375 | 375 | if (isset($spotter_item['airline_name'])) { |
376 | 376 | 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>'; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | print '</td>'."\n"; |
386 | 386 | } |
387 | 387 | } |
388 | - if(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
388 | + if (strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
389 | 389 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
390 | 390 | $spotter_item['squawk'] = '-'; |
391 | 391 | } |
@@ -401,17 +401,17 @@ discard block |
||
401 | 401 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
402 | 402 | } |
403 | 403 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
404 | - 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>'; |
|
404 | + 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>'; |
|
405 | 405 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
406 | - 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>'; |
|
406 | + 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>'; |
|
407 | 407 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
408 | - 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>'; |
|
408 | + 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>'; |
|
409 | 409 | } else { |
410 | - 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>'; |
|
410 | + 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>'; |
|
411 | 411 | } |
412 | 412 | } else { |
413 | 413 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
414 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
414 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
415 | 415 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
416 | 416 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
417 | 417 | 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>'; |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | } |
471 | 471 | print '</td>'."\n"; |
472 | 472 | // Aircraft type |
473 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
473 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
474 | 474 | print '<td class="type">'."\n"; |
475 | 475 | if (!isset($spotter_item['aircraft_name'])) { |
476 | 476 | print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'._("Not available").'</a></span>'."\n"; |
@@ -492,22 +492,22 @@ discard block |
||
492 | 492 | } |
493 | 493 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
494 | 494 | if ($spotter_item['departure_airport_time'] > 2460) { |
495 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
496 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
495 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
496 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
497 | 497 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
498 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
498 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
499 | 499 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
500 | 500 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
501 | 501 | } elseif (isset($spotter_item['real_departure_airport_time'])) { |
502 | 502 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
503 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
503 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
504 | 504 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
505 | 505 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
506 | 506 | } elseif (isset($spotter_item['departure_airport_time'])) { |
507 | 507 | if ($spotter_item['departure_airport_time'] > 2460) { |
508 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
508 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
509 | 509 | } else { |
510 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
510 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
511 | 511 | } |
512 | 512 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
513 | 513 | } |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | $latitude = $spotter_item['latitude']; |
522 | 522 | $longitude = $spotter_item['longitude']; |
523 | 523 | } |
524 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
524 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
525 | 525 | if ($distance != '') { |
526 | 526 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
527 | 527 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -561,20 +561,20 @@ discard block |
||
561 | 561 | } |
562 | 562 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
563 | 563 | if ($spotter_item['arrival_airport_time'] > 2460) { |
564 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
564 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
565 | 565 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
566 | 566 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
567 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
567 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
568 | 568 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
569 | 569 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
570 | 570 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
571 | 571 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
572 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
572 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
573 | 573 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
574 | 574 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
575 | 575 | } elseif (isset($spotter_item['arrival_airport_time'])) { |
576 | 576 | if ($spotter_item['arrival_airport_time'] > 2460) { |
577 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
577 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
578 | 578 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
579 | 579 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
580 | 580 | } |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | $latitude = $spotter_item['latitude']; |
587 | 587 | $longitude = $spotter_item['longitude']; |
588 | 588 | } |
589 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
589 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
590 | 590 | if ($distance != '') { |
591 | 591 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
592 | 592 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | } |
600 | 600 | print '</td>'."\n"; |
601 | 601 | // Route stop |
602 | - if(strtolower($current_page) != "upcoming"){ |
|
602 | + if (strtolower($current_page) != "upcoming") { |
|
603 | 603 | print '<td class="route_stop">'."\n"; |
604 | 604 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '') { |
605 | 605 | print '<span class="nomobile">-</span>'."\n"; |
@@ -620,22 +620,22 @@ discard block |
||
620 | 620 | } else { |
621 | 621 | //if (!isset($globalUnitDistance) || $globalUnitDistance == 'km') { |
622 | 622 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
623 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
624 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
623 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
624 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
625 | 625 | //} elseif ($globalUnitDistance == 'mi') { |
626 | 626 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
627 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
628 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
627 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
628 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
629 | 629 | //} elseif ($globalUnitDistance == 'nm') { |
630 | 630 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
631 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
632 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
631 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
632 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
633 | 633 | } |
634 | 634 | } |
635 | 635 | |
636 | 636 | print '</td>'."\n"; |
637 | 637 | } |
638 | - if(strtolower($current_page) != "upcoming"){ |
|
638 | + if (strtolower($current_page) != "upcoming") { |
|
639 | 639 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
640 | 640 | print '<td class="pilot">'."\n"; |
641 | 641 | if ((!isset($spotter_item['pilot_id']) || $spotter_item['pilot_id'] == '') && (!isset($spotter_item['pilot_name']) || $spotter_item['pilot_name'] == '')) { |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
673 | 673 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
674 | 674 | print '<td class="message"><p>'."\n"; |
675 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
675 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
676 | 676 | print '</p><p class="decode">'; |
677 | 677 | $decode_array = json_decode($spotter_item['decode']); |
678 | 678 | foreach ($decode_array as $key => $value) { |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | print '</td>'."\n"; |
683 | 683 | } else { |
684 | 684 | print '<td class="message">'."\n"; |
685 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
685 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
686 | 686 | print '</td>'."\n"; |
687 | 687 | } |
688 | 688 | } |
@@ -338,7 +338,9 @@ discard block |
||
338 | 338 | if (isset($globalTimezone)) |
339 | 339 | { |
340 | 340 | date_default_timezone_set($globalTimezone); |
341 | - } else date_default_timezone_set('UTC'); |
|
341 | + } else { |
|
342 | + date_default_timezone_set('UTC'); |
|
343 | + } |
|
342 | 344 | if ($showSpecial === true) |
343 | 345 | { |
344 | 346 | print '<tr class="special">'."\n"; |
@@ -357,8 +359,9 @@ discard block |
||
357 | 359 | print '<td class="aircraft_thumbnail">'."\n"; |
358 | 360 | |
359 | 361 | if ($spotter_item['image_source'] == 'planespotters') { |
360 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
361 | - else { |
|
362 | + if ($spotter_item['image_source_website'] != '') { |
|
363 | + $image_src = $spotter_item['image_source_website']; |
|
364 | + } else { |
|
362 | 365 | $planespotter_url_array = explode("_", $spotter_item['image']); |
363 | 366 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
364 | 367 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -371,7 +374,9 @@ discard block |
||
371 | 374 | } else { |
372 | 375 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
373 | 376 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
374 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
377 | + } else { |
|
378 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
379 | + } |
|
375 | 380 | if (isset($spotter_item['airline_name'])) { |
376 | 381 | 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>'; |
377 | 382 | } else { |
@@ -394,8 +399,9 @@ discard block |
||
394 | 399 | print '<td class="aircraft_thumbnail">'."\n"; |
395 | 400 | //print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
396 | 401 | if ($spotter_item['image_source'] == 'planespotters') { |
397 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
398 | - else { |
|
402 | + if ($spotter_item['image_source_website'] != '') { |
|
403 | + $image_src = $spotter_item['image_source_website']; |
|
404 | + } else { |
|
399 | 405 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
400 | 406 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
401 | 407 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -412,7 +418,9 @@ discard block |
||
412 | 418 | } else { |
413 | 419 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
414 | 420 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
415 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
421 | + } else { |
|
422 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
423 | + } |
|
416 | 424 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
417 | 425 | 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>'; |
418 | 426 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -493,15 +501,21 @@ discard block |
||
493 | 501 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
494 | 502 | if ($spotter_item['departure_airport_time'] > 2460) { |
495 | 503 | $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
496 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
504 | + } else { |
|
505 | + $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
506 | + } |
|
497 | 507 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
498 | 508 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
499 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
509 | + } else { |
|
510 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
511 | + } |
|
500 | 512 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
501 | 513 | } elseif (isset($spotter_item['real_departure_airport_time'])) { |
502 | 514 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
503 | 515 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
504 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
516 | + } else { |
|
517 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
518 | + } |
|
505 | 519 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
506 | 520 | } elseif (isset($spotter_item['departure_airport_time'])) { |
507 | 521 | if ($spotter_item['departure_airport_time'] > 2460) { |
@@ -546,7 +560,9 @@ discard block |
||
546 | 560 | } else { |
547 | 561 | if (isset($spotter_item['real_arrival_airport']) && $spotter_item['real_arrival_airport'] != $spotter_item['arrival_airport']) { |
548 | 562 | print '<span class="nomobile">Scheduled : <a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a></span>'."\n"; |
549 | - if (!isset($Spotter)) $Spotter = new Spotter(); |
|
563 | + if (!isset($Spotter)) { |
|
564 | + $Spotter = new Spotter(); |
|
565 | + } |
|
550 | 566 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']); |
551 | 567 | print '<br /><span class="nomobile">'._("Real:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$arrival_airport_info[0]['city'].','.$arrival_airport_info[0]['country'].' ('.$spotter_item['real_arrival_airport'].')</a></span>'."\n"; |
552 | 568 | print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n"; |
@@ -562,20 +578,28 @@ discard block |
||
562 | 578 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
563 | 579 | if ($spotter_item['arrival_airport_time'] > 2460) { |
564 | 580 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
565 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
581 | + } else { |
|
582 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
583 | + } |
|
566 | 584 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
567 | 585 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
568 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
586 | + } else { |
|
587 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
588 | + } |
|
569 | 589 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
570 | 590 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
571 | 591 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
572 | 592 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
573 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
593 | + } else { |
|
594 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
595 | + } |
|
574 | 596 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
575 | 597 | } elseif (isset($spotter_item['arrival_airport_time'])) { |
576 | 598 | if ($spotter_item['arrival_airport_time'] > 2460) { |
577 | 599 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
578 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
600 | + } else { |
|
601 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
602 | + } |
|
579 | 603 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
580 | 604 | } |
581 | 605 | if (!isset($spotter_item['real_arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |