@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | require_once('../require/settings.php'); |
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | -setcookie("MapFormat",'2d'); |
|
5 | +setcookie("MapFormat", '2d'); |
|
6 | 6 | |
7 | 7 | // Compressed GeoJson is used if true |
8 | 8 | if (!isset($globalJsonCompress)) $compress = true; |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php |
19 | 19 | if (isset($_GET['famtrackid'])) { |
20 | - $famtrackid = filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING); |
|
20 | + $famtrackid = filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING); |
|
21 | 21 | } |
22 | 22 | if (isset($_GET['ident'])) { |
23 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
23 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
24 | 24 | } |
25 | 25 | if (!isset($ident) && !isset($famtrackid)) { |
26 | 26 | ?> |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | <?php |
183 | 183 | } else { |
184 | 184 | ?> |
185 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
185 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
186 | 186 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
187 | 187 | <?php |
188 | 188 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | /* |
199 | 199 | shadowUrl: iconURLShadowpath, |
200 | 200 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
201 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
201 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
202 | 202 | */ |
203 | 203 | }) |
204 | 204 | }) |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | <?php |
232 | 232 | } else { |
233 | 233 | ?> |
234 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
234 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
235 | 235 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
236 | 236 | <?php |
237 | 237 | } |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | <?php |
280 | 280 | } else { |
281 | 281 | ?> |
282 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
282 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
283 | 283 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
284 | 284 | <?php |
285 | 285 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $Tracker = new Tracker(); |
17 | 17 | } |
18 | 18 | if (!isset($filter_name)) $filter_name = ''; |
19 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
19 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
20 | 20 | if ($airline_icao == '' && isset($globalFilter)) { |
21 | 21 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
22 | 22 | } |
@@ -32,20 +32,20 @@ discard block |
||
32 | 32 | </div> |
33 | 33 | <p>'._("Below is a chart that plots the busiest day during the <strong>last month</strong>.").'</p>'; |
34 | 34 | |
35 | -if ($type == 'aircraft') $date_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
35 | +if ($type == 'aircraft') $date_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
36 | 36 | elseif ($type == 'marine') $date_array = $Marine->countAllDatesLastMonth(); |
37 | 37 | elseif ($type == 'tracker') $date_array = $Tracker->countAllDatesLastMonth(); |
38 | 38 | |
39 | 39 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
40 | 40 | $month_data = ''; |
41 | 41 | $month_cnt = ''; |
42 | -foreach($date_array as $month_item) |
|
42 | +foreach ($date_array as $month_item) |
|
43 | 43 | { |
44 | 44 | $month_data .= '"'.$month_item['date_name'].'",'; |
45 | 45 | $month_cnt .= $month_item['date_count'].','; |
46 | 46 | } |
47 | 47 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
48 | -$month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
48 | +$month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
49 | 49 | print 'c3.generate({ |
50 | 50 | bindto: "#chart", |
51 | 51 | data: { x: "x", |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | //$date_array = $Stats->countAllDates(); |
57 | 57 | if (!empty($date_array)) |
58 | 58 | { |
59 | - foreach($date_array as $key => $row) { |
|
59 | + foreach ($date_array as $key => $row) { |
|
60 | 60 | $years[$key] = $row['date_name']; |
61 | 61 | $counts[$key] = $row['date_count']; |
62 | 62 | } |
63 | - array_multisort($counts,SORT_DESC,$date_array); |
|
63 | + array_multisort($counts, SORT_DESC, $date_array); |
|
64 | 64 | print '<div class="table-responsive">'; |
65 | 65 | print '<table class="common-date table-striped">'; |
66 | 66 | print '<thead>'; |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | print '</thead>'; |
71 | 71 | print '<tbody>'; |
72 | 72 | $i = 1; |
73 | - foreach($date_array as $date_item) |
|
73 | + foreach ($date_array as $date_item) |
|
74 | 74 | { |
75 | 75 | print '<tr>'; |
76 | 76 | print '<td><strong>'.$i.'</strong></td>'; |
77 | 77 | print '<td>'; |
78 | - if ($type == 'aircraft') print '<a href="'.$globalURL.'/date/'.date('Y-m-d',strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
79 | - else print '<a href="'.$globalURL.'/'.$type.'/date/'.date('Y-m-d',strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
78 | + if ($type == 'aircraft') print '<a href="'.$globalURL.'/date/'.date('Y-m-d', strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
79 | + else print '<a href="'.$globalURL.'/'.$type.'/date/'.date('Y-m-d', strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
80 | 80 | print '</td>'; |
81 | 81 | print '<td>'; |
82 | 82 | print $date_item['date_count']; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | |
20 | 20 | if (!isset($filter_name)) $filter_name = ''; |
21 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
21 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
22 | 22 | if ($airline_icao == '' && isset($globalFilter)) { |
23 | 23 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
24 | 24 | } |
@@ -33,19 +33,19 @@ discard block |
||
33 | 33 | </div> |
34 | 34 | <p>'._("Below is a chart that plots the busiest month during the <strong>last year</strong>.").'</p>'; |
35 | 35 | |
36 | -if ($type == 'aircraft') $date_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
36 | +if ($type == 'aircraft') $date_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
37 | 37 | elseif ($type == 'marine') $date_array = $Marine->countAllMonthsLastYear(true); |
38 | 38 | elseif ($type == 'tracker') $date_array = $Tracker->countAllMonthsLastYear(true); |
39 | 39 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
40 | 40 | $year_data = ''; |
41 | 41 | $year_cnt = ''; |
42 | -foreach($date_array as $year_item) |
|
42 | +foreach ($date_array as $year_item) |
|
43 | 43 | { |
44 | 44 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
45 | 45 | $year_cnt .= $year_item['date_count'].','; |
46 | 46 | } |
47 | 47 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
48 | -$year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
48 | +$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
49 | 49 | print 'c3.generate({ |
50 | 50 | bindto: "#chart", |
51 | 51 | data: { x: "x", |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | print '</thead>'; |
69 | 69 | print '<tbody>'; |
70 | 70 | $i = 1; |
71 | - foreach($date_array as $date_item) |
|
71 | + foreach ($date_array as $date_item) |
|
72 | 72 | { |
73 | 73 | print '<tr>'; |
74 | 74 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | if (!isset($filter_name)) $filter_name = ''; |
20 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
20 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
21 | 21 | if ($airline_icao == '' && isset($globalFilter)) { |
22 | 22 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
23 | 23 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | </div> |
34 | 34 | <p>'._("Below is a chart that plots the busiest day during the <strong>last 7 days</strong>.").'</p>'; |
35 | 35 | |
36 | -if ($type == 'aircraft') $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
36 | +if ($type == 'aircraft') $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
37 | 37 | elseif ($type == 'marine') $date_array = $Marine->countAllDatesLast7Days(); |
38 | 38 | elseif ($type == 'tracker') $date_array = $Tracker->countAllDatesLast7Days(); |
39 | 39 | if (count($date_array) == 0) { |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
43 | 43 | $date_data = ''; |
44 | 44 | $date_cnt = ''; |
45 | -foreach($date_array as $date_item) |
|
45 | +foreach ($date_array as $date_item) |
|
46 | 46 | { |
47 | 47 | $date_data .= '"'.$date_item['date_name'].'",'; |
48 | 48 | $date_cnt .= $date_item['date_count'].','; |
49 | 49 | } |
50 | 50 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
51 | -$date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
51 | +$date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
52 | 52 | print 'c3.generate({ |
53 | 53 | bindto: "#chart", |
54 | 54 | data: { x: "x", |
@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | print '</script>'; |
58 | 58 | } |
59 | 59 | if (isset($globalDBArchiveMonths) && $globalDBArchiveMonths > 0) { |
60 | - print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."),$globalDBArchiveMonths).'</p>'; |
|
60 | + print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."), $globalDBArchiveMonths).'</p>'; |
|
61 | 61 | } else { |
62 | 62 | print '<p>'._("Below are the <strong>Top 10</strong> most busiest dates.").'</p>'; |
63 | 63 | } |
64 | -if ($type == 'aircraft') $date_array = $Stats->countAllDates($airline_icao,$filter_name); |
|
64 | +if ($type == 'aircraft') $date_array = $Stats->countAllDates($airline_icao, $filter_name); |
|
65 | 65 | elseif ($type == 'marine') $date_array = $Marine->countAllDates(); |
66 | 66 | elseif ($type == 'tracker') $date_array = $Tracker->countAllDates(); |
67 | 67 | if (!empty($date_array)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | print '</thead>'; |
76 | 76 | print '<tbody>'; |
77 | 77 | $i = 1; |
78 | - foreach($date_array as $date_item) |
|
78 | + foreach ($date_array as $date_item) |
|
79 | 79 | { |
80 | 80 | print '<tr>'; |
81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | $title = _("Statistics").' - '._("Most common Aircraft"); |
7 | 7 | |
8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | if ($airline_icao == '' && isset($globalFilter)) { |
11 | 11 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
12 | 12 | } |
13 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
14 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
13 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
14 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
15 | 15 | |
16 | 16 | require_once('header.php'); |
17 | 17 | |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | </div> |
24 | 24 | <p>'._("Below are the <strong>Top 10</strong> most common aircraft types.").'</p>'; |
25 | 25 | |
26 | -$aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
26 | +$aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
27 | 27 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
28 | 28 | $aircraft_data = ''; |
29 | -foreach($aircraft_array as $aircraft_item) |
|
29 | +foreach ($aircraft_array as $aircraft_item) |
|
30 | 30 | { |
31 | 31 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
32 | 32 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | print '</thead>'; |
53 | 53 | print '<tbody>'; |
54 | 54 | $i = 1; |
55 | - foreach($aircraft_array as $aircraft_item) |
|
55 | + foreach ($aircraft_array as $aircraft_item) |
|
56 | 56 | { |
57 | 57 | print '<tr>'; |
58 | 58 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | $ATC = new ATC(); |
6 | 6 | |
7 | 7 | if (isset($_GET['atcid'])) { |
8 | - $atcid = filter_input(INPUT_GET,'atcid',FILTER_SANITIZE_NUMBER_INT); |
|
9 | - $atcident = filter_input(INPUT_GET,'atcident',FILTER_SANITIZE_STRING); |
|
8 | + $atcid = filter_input(INPUT_GET, 'atcid', FILTER_SANITIZE_NUMBER_INT); |
|
9 | + $atcident = filter_input(INPUT_GET, 'atcident', FILTER_SANITIZE_STRING); |
|
10 | 10 | $atc_data = $ATC->getById($atcid); |
11 | 11 | if (!isset($atc_data[0])) $atc_data = $ATC->getByIdent($atcident); |
12 | 12 | ?> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | print '</div>'; |
39 | 39 | |
40 | 40 | //print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
41 | -print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],3).', '.round($spotter_item['longitude'],3).'</div>'; |
|
41 | +print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'], 3).', '.round($spotter_item['longitude'], 3).'</div>'; |
|
42 | 42 | if ($spotter_item['atc_range'] > 0) { |
43 | 43 | print '<div><span>'._("Range").'</span>'; |
44 | 44 | print $spotter_item['atc_range']; |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | |
5 | 5 | require_once(dirname(__FILE__).'/require/class.Common.php'); |
6 | 6 | $Common = new Common(); |
7 | -$showRouteStop = $Common->multiKeyExists($spotter_array,'route_stop'); |
|
8 | -$showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
|
7 | +$showRouteStop = $Common->multiKeyExists($spotter_array, 'route_stop'); |
|
8 | +$showDuration = $Common->multiKeyExists($spotter_array, 'duration'); |
|
9 | 9 | |
10 | 10 | if (!isset($type)) $type = 'aircraft'; |
11 | 11 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | print '<th class="more"></th>'; |
108 | 108 | print '</thead>'; |
109 | -} else if (strtolower($current_page) == "upcoming"){ |
|
109 | +} else if (strtolower($current_page) == "upcoming") { |
|
110 | 110 | print '<thead>'; |
111 | 111 | if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
112 | 112 | if ($_GET['sort'] == "airline_name_asc") |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | */ |
162 | 162 | print '</thead>'; |
163 | -} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){ |
|
163 | +} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
|
164 | 164 | print '<thead>'; |
165 | 165 | print '<th class="aircraft_thumbnail"></th>'; |
166 | 166 | print '<th class="logo">'._("Airline").'</th>'; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | print '</thead>'; |
198 | 198 | } else { |
199 | 199 | |
200 | - if ($hide_th_links === true){ |
|
200 | + if ($hide_th_links === true) { |
|
201 | 201 | print '<thead>'; |
202 | 202 | print '<th class="aircraft_thumbnail"></th>'; |
203 | 203 | if ($type == 'aircraft') { |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | } |
455 | 455 | |
456 | 456 | print '<tbody>'."\n"; |
457 | -foreach($spotter_array as $spotter_item) |
|
457 | +foreach ($spotter_array as $spotter_item) |
|
458 | 458 | { |
459 | 459 | if (isset($globalTimezone)) |
460 | 460 | { |
@@ -489,13 +489,13 @@ discard block |
||
489 | 489 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
490 | 490 | } |
491 | 491 | if (isset($spotter_item['airline_name'])) { |
492 | - 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>'; |
|
492 | + 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>'; |
|
493 | 493 | } else { |
494 | - 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>'; |
|
494 | + 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>'; |
|
495 | 495 | } |
496 | 496 | } else { |
497 | 497 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
498 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
498 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
499 | 499 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
500 | 500 | if (isset($spotter_item['airline_name'])) { |
501 | 501 | 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>'; |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | { |
515 | 515 | print '<td class="aircraft_thumbnail">'."\n"; |
516 | 516 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
517 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
517 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
518 | 518 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
519 | 519 | if (isset($spotter_item['airline_name'])) { |
520 | 520 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | { |
533 | 533 | print '<td class="aircraft_thumbnail">'."\n"; |
534 | 534 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
535 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
535 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
536 | 536 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
537 | 537 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['type'].'" data-content="'._("Type:").' '.$spotter_item['type'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
538 | 538 | print '</td>'."\n"; |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | print '</td>'."\n"; |
577 | 577 | } |
578 | 578 | } |
579 | - } 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"){ |
|
579 | + } 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") { |
|
580 | 580 | if ($type == 'aircraft') { |
581 | 581 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
582 | 582 | $spotter_item['squawk'] = '-'; |
@@ -593,17 +593,17 @@ discard block |
||
593 | 593 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
594 | 594 | } |
595 | 595 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
596 | - 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>'; |
|
596 | + 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>'; |
|
597 | 597 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
598 | - 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>'; |
|
598 | + 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>'; |
|
599 | 599 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
600 | - 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>'; |
|
600 | + 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>'; |
|
601 | 601 | } else { |
602 | - 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>'; |
|
602 | + 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>'; |
|
603 | 603 | } |
604 | 604 | } else { |
605 | 605 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
606 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
606 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
607 | 607 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
608 | 608 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
609 | 609 | 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>'; |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | { |
637 | 637 | print '<td class="aircraft_thumbnail">'."\n"; |
638 | 638 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
639 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
639 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
640 | 640 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
641 | 641 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
642 | 642 | print '</td>'."\n"; |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | { |
651 | 651 | print '<td class="aircraft_thumbnail">'."\n"; |
652 | 652 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
653 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
653 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
654 | 654 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
655 | 655 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['type'].'" data-content="'._("Type:").' '.$spotter_item['type'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
656 | 656 | print '</td>'."\n"; |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | print '</td>'."\n"; |
760 | 760 | } |
761 | 761 | // Aircraft type |
762 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
762 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
763 | 763 | print '<td class="type">'."\n"; |
764 | 764 | if ($type == 'aircraft') { |
765 | 765 | if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) { |
@@ -810,22 +810,22 @@ discard block |
||
810 | 810 | } |
811 | 811 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
812 | 812 | if ($spotter_item['departure_airport_time'] > 2460) { |
813 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
814 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
813 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
814 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
815 | 815 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
816 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
816 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
817 | 817 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
818 | 818 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
819 | 819 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
820 | 820 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
821 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
821 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
822 | 822 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
823 | 823 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
824 | 824 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
825 | 825 | if ($spotter_item['departure_airport_time'] > 2460) { |
826 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
826 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
827 | 827 | } else { |
828 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
828 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
829 | 829 | } |
830 | 830 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
831 | 831 | } |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | $latitude = $spotter_item['latitude']; |
841 | 841 | $longitude = $spotter_item['longitude']; |
842 | 842 | } |
843 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
843 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
844 | 844 | } else $distance = ''; |
845 | 845 | if ($distance != '') { |
846 | 846 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -883,20 +883,20 @@ discard block |
||
883 | 883 | } |
884 | 884 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
885 | 885 | if ($spotter_item['arrival_airport_time'] > 2460) { |
886 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
886 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
887 | 887 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
888 | 888 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
889 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
889 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
890 | 890 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
891 | 891 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
892 | 892 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
893 | 893 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
894 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
894 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
895 | 895 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
896 | 896 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
897 | 897 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
898 | 898 | if ($spotter_item['arrival_airport_time'] > 2460) { |
899 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
899 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
900 | 900 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
901 | 901 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
902 | 902 | } |
@@ -909,7 +909,7 @@ discard block |
||
909 | 909 | $latitude = $spotter_item['latitude']; |
910 | 910 | $longitude = $spotter_item['longitude']; |
911 | 911 | } |
912 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
912 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
913 | 913 | } else $distance = ''; |
914 | 914 | if ($distance != '') { |
915 | 915 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -952,19 +952,19 @@ discard block |
||
952 | 952 | print '<span class="mobile">-</span>'."\n"; |
953 | 953 | } else { |
954 | 954 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
955 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
956 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
955 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
956 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
957 | 957 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
958 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
959 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
958 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
959 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
960 | 960 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
961 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
962 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
961 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
962 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
963 | 963 | } |
964 | 964 | } |
965 | 965 | print '</td>'."\n"; |
966 | 966 | } |
967 | - if(strtolower($current_page) != "upcoming"){ |
|
967 | + if (strtolower($current_page) != "upcoming") { |
|
968 | 968 | if ($type == 'aircraft') { |
969 | 969 | //if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
970 | 970 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
@@ -1007,7 +1007,7 @@ discard block |
||
1007 | 1007 | |
1008 | 1008 | if ($showRouteStop) { |
1009 | 1009 | // Route stop |
1010 | - if(strtolower($current_page) != "upcoming"){ |
|
1010 | + if (strtolower($current_page) != "upcoming") { |
|
1011 | 1011 | print '<td class="route_stop">'."\n"; |
1012 | 1012 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') { |
1013 | 1013 | print '<span class="nomobile">-</span>'."\n"; |
@@ -1026,11 +1026,11 @@ discard block |
||
1026 | 1026 | } |
1027 | 1027 | if ($showDuration) { |
1028 | 1028 | // Duration |
1029 | - if(strtolower($current_page) != "upcoming"){ |
|
1029 | + if (strtolower($current_page) != "upcoming") { |
|
1030 | 1030 | print '<td class="duration">'."\n"; |
1031 | 1031 | if (isset($spotter_item['duration'])) { |
1032 | - print '<span class="nomobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1033 | - print '<span class="mobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1032 | + print '<span class="nomobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1033 | + print '<span class="mobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1034 | 1034 | } else { |
1035 | 1035 | print '<span class="nomobile">-</span>'."\n"; |
1036 | 1036 | print '<span class="mobile">-</span>'."\n"; |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
1044 | 1044 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
1045 | 1045 | print '<td class="message"><p>'."\n"; |
1046 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1046 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1047 | 1047 | print '</p><p class="decode">'; |
1048 | 1048 | $decode_array = json_decode($spotter_item['decode']); |
1049 | 1049 | foreach ($decode_array as $key => $value) { |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | print '</td>'."\n"; |
1054 | 1054 | } else { |
1055 | 1055 | print '<td class="message">'."\n"; |
1056 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1056 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1057 | 1057 | print '</td>'."\n"; |
1058 | 1058 | } |
1059 | 1059 | } |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | } |
1079 | 1079 | print '</td>'."\n"; |
1080 | 1080 | print '<td class="message">'."\n"; |
1081 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1081 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1082 | 1082 | print '</td>'."\n"; |
1083 | 1083 | } |
1084 | 1084 | if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") { |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | print '</td>'."\n"; |
1105 | 1105 | */ |
1106 | 1106 | print '<td class="message">'."\n"; |
1107 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1107 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1108 | 1108 | print '</td>'."\n"; |
1109 | 1109 | } |
1110 | 1110 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * Translated to PHP of GeographicLib/src/Geoid.cpp |
12 | 12 | * by Ycarus <[email protected]> in 2017 |
13 | 13 | */ |
14 | -class GeoidHeight { |
|
14 | +class GeoidHeight { |
|
15 | 15 | private $c0 = 240; |
16 | 16 | private $c3 = [[9, -18, -88, 0, 96, 90, 0, 0, -60, -20], [-9, 18, 8, 0, -96, 30, 0, 0, 60, -20], [9, -88, -18, 90, 96, 0, -20, -60, 0, 0], [186, -42, -42, -150, -96, -150, 60, 60, 60, 60], [54, 162, -78, 30, -24, -90, -60, 60, -60, 60], [-9, -32, 18, 30, 24, 0, 20, -60, 0, 0], [-9, 8, 18, 30, -96, 0, -20, 60, 0, 0], [54, -78, 162, -90, -24, 30, 60, -60, 60, -60], [-54, 78, 78, 90, 144, 90, -60, -60, -60, -60], [9, -8, -18, -30, -24, 0, 20, 60, 0, 0], [-9, 18, -32, 0, 24, 30, 0, 0, -60, 20], [9, -18, -8, 0, -24, -30, 0, 0, 60, 20]]; |
17 | 17 | private $c0n = 372; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | private $v10 = null; |
35 | 35 | private $v11 = null; |
36 | 36 | |
37 | - public function __construct($name='') { |
|
37 | + public function __construct($name = '') { |
|
38 | 38 | global $globalGeoidSource; |
39 | 39 | //if ($name == '') $name = dirname(__FILE__).'/../install/tmp/egm2008-1.pgm'; |
40 | 40 | if ($name == '') { |
@@ -42,35 +42,35 @@ discard block |
||
42 | 42 | else $name = dirname(__FILE__).'/../data/egm96-15.pgm'; |
43 | 43 | } |
44 | 44 | |
45 | - $f = @fopen($name,"r"); |
|
45 | + $f = @fopen($name, "r"); |
|
46 | 46 | if ($f === FALSE) { |
47 | 47 | throw new Exception("Can't open ".$name); |
48 | 48 | } |
49 | - $line = fgets($f,4096); |
|
49 | + $line = fgets($f, 4096); |
|
50 | 50 | if (trim($line) != 'P5') { |
51 | 51 | throw new Exception('No PGM header'); |
52 | 52 | } |
53 | 53 | $headerlen = strlen($line); |
54 | 54 | while (true) { |
55 | - $line = fgets($f,4096); |
|
55 | + $line = fgets($f, 4096); |
|
56 | 56 | if ((strlen($line) == 0)) { |
57 | 57 | throw new Exception('EOF before end of file header'); |
58 | 58 | } |
59 | 59 | $headerlen += strlen($line); |
60 | - if (strpos($line,'# Offset ') !== FALSE) { |
|
60 | + if (strpos($line, '# Offset ') !== FALSE) { |
|
61 | 61 | $this->offset = substr($line, 9); |
62 | - } else if (strpos($line,'# Scale ') !== FALSE) { |
|
62 | + } else if (strpos($line, '# Scale ') !== FALSE) { |
|
63 | 63 | $this->scale = substr($line, 8); |
64 | - } else if ((strpos($line,'#') === FALSE)) { |
|
65 | - list($this->width, $this->height) = preg_split('/\s+/',$line); |
|
64 | + } else if ((strpos($line, '#') === FALSE)) { |
|
65 | + list($this->width, $this->height) = preg_split('/\s+/', $line); |
|
66 | 66 | break; |
67 | 67 | } |
68 | 68 | } |
69 | - $line = fgets($f,4096); |
|
69 | + $line = fgets($f, 4096); |
|
70 | 70 | $headerlen += strlen($line); |
71 | - $levels = (int)$line; |
|
72 | - $this->width = (int)$this->width; |
|
73 | - $this->height = (int)$this->height; |
|
71 | + $levels = (int) $line; |
|
72 | + $this->width = (int) $this->width; |
|
73 | + $this->height = (int) $this->height; |
|
74 | 74 | if (($levels != 65535)) { |
75 | 75 | throw new Exception('PGM file must have 65535 gray levels ('.$levels.')'); |
76 | 76 | } |
@@ -85,42 +85,42 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | $fullsize = filesize($name); |
88 | - if ((($fullsize - $headerlen) != (($this->width * $this->height) * 2))) { |
|
88 | + if ((($fullsize - $headerlen) != (($this->width*$this->height)*2))) { |
|
89 | 89 | throw new Exception('File has the wrong length'); |
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->headerlen = $headerlen; |
93 | - $this->raw= $f; |
|
94 | - $this->rlonres = ($this->width / 360.0); |
|
95 | - $this->rlatres = (($this->height - 1) / 180.0); |
|
93 | + $this->raw = $f; |
|
94 | + $this->rlonres = ($this->width/360.0); |
|
95 | + $this->rlatres = (($this->height - 1)/180.0); |
|
96 | 96 | } |
97 | 97 | |
98 | - private function _rawval($ix,$iy) { |
|
98 | + private function _rawval($ix, $iy) { |
|
99 | 99 | if (($iy < 0)) { |
100 | 100 | $iy = -$iy; |
101 | - $ix += ($this->width / 2); |
|
101 | + $ix += ($this->width/2); |
|
102 | 102 | } else if (($iy >= $this->height)) { |
103 | - $iy = ((2 * ($this->height - 1)) - $iy); |
|
104 | - $ix += ($this->width / 2); |
|
103 | + $iy = ((2*($this->height - 1)) - $iy); |
|
104 | + $ix += ($this->width/2); |
|
105 | 105 | } |
106 | 106 | if (($ix < 0)) { |
107 | 107 | $ix += $this->width; |
108 | 108 | } else if (($ix >= $this->width)) { |
109 | 109 | $ix -= $this->width; |
110 | 110 | } |
111 | - $k = ((($iy * $this->width) + $ix) * 2) + $this->headerlen; |
|
112 | - fseek($this->raw,$k); |
|
113 | - return unpack('n',fread($this->raw,2))[1]; |
|
111 | + $k = ((($iy*$this->width) + $ix)*2) + $this->headerlen; |
|
112 | + fseek($this->raw, $k); |
|
113 | + return unpack('n', fread($this->raw, 2))[1]; |
|
114 | 114 | } |
115 | 115 | |
116 | - public function get($lat,$lon,$cubic=true) { |
|
116 | + public function get($lat, $lon, $cubic = true) { |
|
117 | 117 | if (($lon < 0)) { |
118 | 118 | $lon += 360; |
119 | 119 | } |
120 | - $fy = ((90 - $lat) * $this->rlatres); |
|
121 | - $fx = ($lon * $this->rlonres); |
|
122 | - $iy = (int)$fy; |
|
123 | - $ix = (int)$fx; |
|
120 | + $fy = ((90 - $lat)*$this->rlatres); |
|
121 | + $fx = ($lon*$this->rlonres); |
|
122 | + $iy = (int) $fy; |
|
123 | + $ix = (int) $fx; |
|
124 | 124 | $fx -= $ix; |
125 | 125 | $fy -= $iy; |
126 | 126 | $t = array(); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $c3x = $this->c3; |
148 | 148 | $c0x = $this->c0; |
149 | 149 | } |
150 | - for ($i = 0; $i < 10;++$i) { |
|
150 | + for ($i = 0; $i < 10; ++$i) { |
|
151 | 151 | $t[$i] = 0; |
152 | 152 | for ($j = 0; $j < 12; ++$j) { |
153 | 153 | $t[$i] += $v[$j]*$c3x[$j][$i]; |
@@ -158,13 +158,13 @@ discard block |
||
158 | 158 | $this->t = $t; |
159 | 159 | } else $t = $this->t; |
160 | 160 | if (!($cubic)) { |
161 | - $a = (((1 - $fx) * $this->v00) + ($fx * $this->v01)); |
|
162 | - $b = (((1 - $fx) * $this->v10) + ($fx * $this->v11)); |
|
163 | - $h = (((1 - $fy) * $a) + ($fy * $b)); |
|
161 | + $a = (((1 - $fx)*$this->v00) + ($fx*$this->v01)); |
|
162 | + $b = (((1 - $fx)*$this->v10) + ($fx*$this->v11)); |
|
163 | + $h = (((1 - $fy)*$a) + ($fy*$b)); |
|
164 | 164 | } else { |
165 | - $h = (($t[0] + ($fx * ($t[1] + ($fx * ($t[3] + ($fx * $t[6])))))) + ($fy * (($t[2] + ($fx * ($t[4] + ($fx * $t[7])))) + ($fy * (($t[5] + ($fx * $t[8])) + ($fy * $t[9])))))); |
|
165 | + $h = (($t[0] + ($fx*($t[1] + ($fx*($t[3] + ($fx*$t[6])))))) + ($fy*(($t[2] + ($fx*($t[4] + ($fx*$t[7])))) + ($fy*(($t[5] + ($fx*$t[8])) + ($fy*$t[9])))))); |
|
166 | 166 | } |
167 | - return ((float)$this->offset + ((float)$this->scale * (float)$h)); |
|
167 | + return ((float) $this->offset + ((float) $this->scale*(float) $h)); |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | /* |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $globalLongitudeMin = '1.0'; //the minimum longitude (east) |
43 | 43 | |
44 | 44 | $globalCenterLatitude = '46.38'; //the latitude center of your coverage area |
45 | -$globalCenterLongitude = '5.29';//the longitude center of your coverage area |
|
45 | +$globalCenterLongitude = '5.29'; //the longitude center of your coverage area |
|
46 | 46 | |
47 | 47 | $globalLiveZoom = '9'; //default zoom on Live Map |
48 | 48 | $globalAirportZoom = '7'; //default zoom to begin to display airports icons |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $globalACARS = FALSE; |
152 | 152 | $globalACARSHost = '0.0.0.0'; // Local IP to listen |
153 | 153 | $globalACARSPort = '9999'; |
154 | -$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive |
|
154 | +$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive |
|
155 | 155 | $globalACARSArchiveKeepMonths = '0'; |
156 | 156 | |
157 | 157 | //APRS configuration (for glidernet) |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | //Check by aircraft ICAO if image is not found by registration |
249 | 249 | $globalAircraftImageCheckICAO = TRUE; |
250 | 250 | //Sources for Aircraft image |
251 | -$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources'); |
|
251 | +$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources'); |
|
252 | 252 | // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) |
253 | 253 | // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true); |
254 | 254 | // ************************ |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | //Retrieve Image from externals sources |
258 | 258 | $globalMarineImageFetch = TRUE; |
259 | 259 | //Sources for Marine image |
260 | -$globalMarineImageSources = array('wikimedia','flickr','deviantart','bing','customsources'); |
|
260 | +$globalMarineImageSources = array('wikimedia', 'flickr', 'deviantart', 'bing', 'customsources'); |
|
261 | 261 | // Custom source configuration {mmsi} will be replaced by vessel mmsi, {name} by it's name (exif get copyright from exif data for each pic) |
262 | 262 | // example of config : $globalMarineImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{name}.jpg','original' => 'http://myurl/original/{name}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true); |
263 | 263 | // ************************ |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE) |
266 | 266 | $globalSchedulesFetch = TRUE; |
267 | 267 | //Sources for airline schedule if not official airline site |
268 | -$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
268 | +$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
269 | 269 | |
270 | 270 | //Retrieve translation from external sources (set to FALSE for IVAO) |
271 | 271 | $globalTranslationFetch = TRUE; |