@@ -47,7 +47,12 @@ discard block |
||
47 | 47 | <?php |
48 | 48 | } else { |
49 | 49 | ?> |
50 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
50 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
51 | + print $globalMapRefresh*2000; |
|
52 | +} else { |
|
53 | + print '60000'; |
|
54 | +} |
|
55 | +?>)) { |
|
51 | 56 | viewer.dataSources.get(dsn).entities.remove(entity); |
52 | 57 | } |
53 | 58 | <?php |
@@ -129,7 +134,12 @@ discard block |
||
129 | 134 | function(){ |
130 | 135 | updateMarineData(); |
131 | 136 | } |
132 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
137 | + ,<?php if (isset($globalMapRefresh)) { |
|
138 | + print $globalMapRefresh*1000; |
|
139 | +} else { |
|
140 | + print '30000'; |
|
141 | +} |
|
142 | +?>); |
|
133 | 143 | } else { |
134 | 144 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
135 | 145 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -90,7 +90,12 @@ discard block |
||
90 | 90 | <?php |
91 | 91 | } else { |
92 | 92 | ?> |
93 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
93 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
94 | + print $globalMapRefresh*2000; |
|
95 | +} else { |
|
96 | + print '60000'; |
|
97 | +} |
|
98 | +?>)) { |
|
94 | 99 | viewer.dataSources.get(dsn).entities.remove(entity); |
95 | 100 | czmldstracker.entities.removeById(entityid); |
96 | 101 | } |
@@ -173,7 +178,12 @@ discard block |
||
173 | 178 | function(){ |
174 | 179 | updateTrackerData(); |
175 | 180 | } |
176 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
181 | + ,<?php if (isset($globalMapRefresh)) { |
|
182 | + print $globalMapRefresh*1000; |
|
183 | +} else { |
|
184 | + print '30000'; |
|
185 | +} |
|
186 | +?>); |
|
177 | 187 | } else { |
178 | 188 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
179 | 189 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -79,7 +79,9 @@ |
||
79 | 79 | $output .= '"type": "'.$spotter_item['type'].'",'; |
80 | 80 | if ($spotter_item['type'] == 'wx') { |
81 | 81 | $weather = json_decode($spotter_item['description'],true); |
82 | - if (isset($weather['temp'])) $output.= '"temp": "'.$weather['temp'].'",'; |
|
82 | + if (isset($weather['temp'])) { |
|
83 | + $output.= '"temp": "'.$weather['temp'].'",'; |
|
84 | + } |
|
83 | 85 | } |
84 | 86 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
85 | 87 | $output .= '},'; |
@@ -17,12 +17,19 @@ discard block |
||
17 | 17 | date_default_timezone_set('UTC'); |
18 | 18 | |
19 | 19 | print '<div class="top">'; |
20 | -if ($spotter_item['name'] != '') print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['name'].'</div>'; |
|
21 | -elseif ($spotter_item['location_id'] != 0) print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['location_id'].'</div>'; |
|
22 | -elseif ($spotter_item['type'] == 'lightning') print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Lightning").'</div>'; |
|
23 | -elseif ($spotter_item['type'] == 'wx') print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Weather Station").'</div>'; |
|
24 | -elseif ($spotter_item['type'] == 'fires') print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Fire").'</div>'; |
|
25 | -else print '<div class="right"><div class="callsign-details"><div class="callsign"></div>'; |
|
20 | +if ($spotter_item['name'] != '') { |
|
21 | + print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['name'].'</div>'; |
|
22 | +} elseif ($spotter_item['location_id'] != 0) { |
|
23 | + print '<div class="right"><div class="callsign-details"><div class="callsign">'.$spotter_item['location_id'].'</div>'; |
|
24 | +} elseif ($spotter_item['type'] == 'lightning') { |
|
25 | + print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Lightning").'</div>'; |
|
26 | +} elseif ($spotter_item['type'] == 'wx') { |
|
27 | + print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Weather Station").'</div>'; |
|
28 | +} elseif ($spotter_item['type'] == 'fires') { |
|
29 | + print '<div class="right"><div class="callsign-details"><div class="callsign">'._("Fire").'</div>'; |
|
30 | +} else { |
|
31 | + print '<div class="right"><div class="callsign-details"><div class="callsign"></div>'; |
|
32 | +} |
|
26 | 33 | print '</div>'; |
27 | 34 | |
28 | 35 | print '</div></div>'; |
@@ -40,8 +47,12 @@ discard block |
||
40 | 47 | print $spotter_item['last_seen'].' UTC'; |
41 | 48 | print '</div>'; |
42 | 49 | |
43 | -if ($spotter_item['city'] != '') print '<div><span>'._("City").'</span>'.$spotter_item['city'].'</div>'; |
|
44 | -if ($spotter_item['country'] !='') print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
|
50 | +if ($spotter_item['city'] != '') { |
|
51 | + print '<div><span>'._("City").'</span>'.$spotter_item['city'].'</div>'; |
|
52 | +} |
|
53 | +if ($spotter_item['country'] !='') { |
|
54 | + print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>'; |
|
55 | +} |
|
45 | 56 | print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],4).', '.round($spotter_item['longitude'],4).'</div>'; |
46 | 57 | /* |
47 | 58 | if ($spotter_item['atc_range'] > 0) { |
@@ -53,13 +64,27 @@ discard block |
||
53 | 64 | if ($spotter_item['type'] == 'wx') { |
54 | 65 | $weather = json_decode($spotter_item['description'],true); |
55 | 66 | //print_r($weather); |
56 | - if (isset($weather['temp'])) print '<div><span>'._("Temperature").'</span>'.$weather['temp'].'°C</div>'; |
|
57 | - if (isset($weather['pressure'])) print '<div><span>'._("Pressure").'</span>'.$weather['pressure'].'hPa</div>'; |
|
58 | - if (isset($weather['wind_gust'])) print '<div><span>'._("Wind Gust").'</span>'.$weather['wind_gust'].' km/h</div>'; |
|
59 | - if (isset($weather['humidity'])) print '<div><span>'._("Humidity").'</span>'.$weather['humidity'].'%</div>'; |
|
60 | - if (isset($weather['rain'])) print '<div><span>'._("Rain").'</span>'.$weather['rain'].' mm</div>'; |
|
61 | - if (isset($weather['precipitation'])) print '<div><span>'._("Precipitation 24H").'</span>'.$weather['precipitation'].' mm</div>'; |
|
62 | - if (isset($weather['precipitation24h'])) print '<div><span>'._("Precipitation Today").'</span>'.$weather['precipitation24h'].' mm</div>'; |
|
67 | + if (isset($weather['temp'])) { |
|
68 | + print '<div><span>'._("Temperature").'</span>'.$weather['temp'].'°C</div>'; |
|
69 | + } |
|
70 | + if (isset($weather['pressure'])) { |
|
71 | + print '<div><span>'._("Pressure").'</span>'.$weather['pressure'].'hPa</div>'; |
|
72 | + } |
|
73 | + if (isset($weather['wind_gust'])) { |
|
74 | + print '<div><span>'._("Wind Gust").'</span>'.$weather['wind_gust'].' km/h</div>'; |
|
75 | + } |
|
76 | + if (isset($weather['humidity'])) { |
|
77 | + print '<div><span>'._("Humidity").'</span>'.$weather['humidity'].'%</div>'; |
|
78 | + } |
|
79 | + if (isset($weather['rain'])) { |
|
80 | + print '<div><span>'._("Rain").'</span>'.$weather['rain'].' mm</div>'; |
|
81 | + } |
|
82 | + if (isset($weather['precipitation'])) { |
|
83 | + print '<div><span>'._("Precipitation 24H").'</span>'.$weather['precipitation'].' mm</div>'; |
|
84 | + } |
|
85 | + if (isset($weather['precipitation24h'])) { |
|
86 | + print '<div><span>'._("Precipitation Today").'</span>'.$weather['precipitation24h'].' mm</div>'; |
|
87 | + } |
|
63 | 88 | $spotter_item['description'] = $weather['comment']; |
64 | 89 | } elseif ($spotter_item['type'] == 'fires') { |
65 | 90 | //print_r(json_decode($spotter_item['description'],true)); |
@@ -34,7 +34,9 @@ discard block |
||
34 | 34 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
35 | 35 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
36 | 36 | $aircraft_types = $Stats->getAllAircraftTypes(); |
37 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
37 | + if (empty($aircraft_types)) { |
|
38 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
39 | + } |
|
38 | 40 | foreach($aircraft_types as $aircraft_item) |
39 | 41 | { |
40 | 42 | $output .= '<url>'; |
@@ -84,7 +86,9 @@ discard block |
||
84 | 86 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
85 | 87 | |
86 | 88 | $airport_names = $Stats->getAllAirportNames(); |
87 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
89 | + if (empty($airport_names)) { |
|
90 | + $airport_names = $Spotter->getAllAirportNames(); |
|
91 | + } |
|
88 | 92 | foreach($airport_names as $airport_item) |
89 | 93 | { |
90 | 94 | $output .= '<url>'; |
@@ -99,7 +103,9 @@ discard block |
||
99 | 103 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
100 | 104 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
101 | 105 | $manufacturer_names = $Stats->getAllManufacturers(); |
102 | - if (empty($manufacturer_names)) $manufacturer_names = $Spotter->getAllManufacturers(); |
|
106 | + if (empty($manufacturer_names)) { |
|
107 | + $manufacturer_names = $Spotter->getAllManufacturers(); |
|
108 | + } |
|
103 | 109 | foreach($manufacturer_names as $manufacturer_item) |
104 | 110 | { |
105 | 111 | $output .= '<url>'; |
@@ -4,7 +4,9 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Stats = new Stats(); |
6 | 6 | |
7 | -if (!isset($filter_name)) $filter_name = ''; |
|
7 | +if (!isset($filter_name)) { |
|
8 | + $filter_name = ''; |
|
9 | +} |
|
8 | 10 | $type = 'aircraft'; |
9 | 11 | if (isset($_GET['marine'])) { |
10 | 12 | $type = 'marine'; |
@@ -21,8 +23,10 @@ discard block |
||
21 | 23 | } |
22 | 24 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
23 | 25 | if ($airline_icao == '' && isset($globalFilter)) { |
24 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
25 | -} |
|
26 | + if (isset($globalFilter['airline'])) { |
|
27 | + $airline_icao = $globalFilter['airline'][0]; |
|
28 | + } |
|
29 | + } |
|
26 | 30 | |
27 | 31 | require_once('header.php'); |
28 | 32 | include('statistics-sub-menu.php'); |
@@ -64,10 +68,14 @@ discard block |
||
64 | 68 | $flightover_data = ''; |
65 | 69 | foreach($flightover_array as $flightover_item) |
66 | 70 | { |
67 | - if ($type == 'aircraft') $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
|
68 | - elseif ($type == 'marine') $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
|
69 | - elseif ($type == 'tracker') $flightover_data .= '[ "'.$flightover_item['tracker_country_iso3'].'",'.$flightover_item['tracker_count'].'],'; |
|
70 | -} |
|
71 | + if ($type == 'aircraft') { |
|
72 | + $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
|
73 | + } elseif ($type == 'marine') { |
|
74 | + $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
|
75 | + } elseif ($type == 'tracker') { |
|
76 | + $flightover_data .= '[ "'.$flightover_item['tracker_country_iso3'].'",'.$flightover_item['tracker_count'].'],'; |
|
77 | + } |
|
78 | + } |
|
71 | 79 | $flightover_data = substr($flightover_data, 0, -1); |
72 | 80 | print $flightover_data; |
73 | 81 | print '];'; |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
@@ -1,13 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | 3 | $ident = ''; |
4 | -if (isset($_POST['ident'])) $ident = filter_input(INPUT_POST,'ident',FILTER_SANITIZE_STRING); |
|
5 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
4 | +if (isset($_POST['ident'])) { |
|
5 | + $ident = filter_input(INPUT_POST,'ident',FILTER_SANITIZE_STRING); |
|
6 | +} |
|
7 | +if (isset($_GET['ident'])) { |
|
8 | + $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
9 | +} |
|
6 | 10 | if ($ident != '') |
7 | 11 | { |
8 | - if (isset($_GET['marine'])) header('Location: '.$globalURL.'/marine/ident/'.$ident); |
|
9 | - else header('Location: '.$globalURL.'/ident/'.$ident); |
|
10 | -} else { |
|
12 | + if (isset($_GET['marine'])) { |
|
13 | + header('Location: '.$globalURL.'/marine/ident/'.$ident); |
|
14 | + } else { |
|
15 | + header('Location: '.$globalURL.'/ident/'.$ident); |
|
16 | + } |
|
17 | + } else { |
|
11 | 18 | if ($globalURL == '') { |
12 | 19 | header('Location: /'); |
13 | 20 | } else { |