@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -109,7 +109,9 @@ discard block |
||
109 | 109 | print '<div class="column">'; |
110 | 110 | print '<h1>'._("Airports").'</h1>'; |
111 | 111 | $airport_names = $Stats->getAllAirportNames(); |
112 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
112 | + if (empty($airport_names)) { |
|
113 | + $airport_names = $Spotter->getAllAirportNames(); |
|
114 | + } |
|
113 | 115 | ksort($airport_names); |
114 | 116 | $previous = null; |
115 | 117 | print '<div class="alphabet-legend">'; |
@@ -65,7 +65,10 @@ discard block |
||
65 | 65 | <div class="form-group"> |
66 | 66 | <label>From (UTC):</label> |
67 | 67 | <div class='input-group date' id='datetimepicker1'> |
68 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
68 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) { |
|
69 | + print date("d/m/Y h:i a",$_COOKIE['archive_begin']); |
|
70 | +} |
|
71 | +?>" required /> |
|
69 | 72 | <span class="input-group-addon"> |
70 | 73 | <span class="glyphicon glyphicon-calendar"></span> |
71 | 74 | </span> |
@@ -74,7 +77,10 @@ discard block |
||
74 | 77 | <div class="form-group"> |
75 | 78 | <label>To (UTC):</label> |
76 | 79 | <div class='input-group date' id='datetimepicker2'> |
77 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
80 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) { |
|
81 | + print date("d/m/Y h:i a",$_COOKIE['archive_end']); |
|
82 | +} |
|
83 | +?>" /> |
|
78 | 84 | <span class="input-group-addon"> |
79 | 85 | <span class="glyphicon glyphicon-calendar"></span> |
80 | 86 | </span> |
@@ -97,8 +103,18 @@ discard block |
||
97 | 103 | |
98 | 104 | <li><?php echo _("Playback speed:"); ?> |
99 | 105 | <div class="range"> |
100 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
101 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
106 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_COOKIE['archive_speed'])) { |
|
107 | + print $_COOKIE['archive_speed']; |
|
108 | +} else { |
|
109 | + print '1'; |
|
110 | +} |
|
111 | +?>"> |
|
112 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
113 | + print $_COOKIE['archive_speed']; |
|
114 | +} else { |
|
115 | + print '1'; |
|
116 | +} |
|
117 | +?></output> |
|
102 | 118 | </div> |
103 | 119 | </li> |
104 | 120 | |
@@ -119,78 +135,180 @@ discard block |
||
119 | 135 | <li><?php echo _("Type of Map:"); ?> |
120 | 136 | <select class="selectpicker" onchange="mapType(this);"> |
121 | 137 | <?php |
122 | - if (!isset($_COOKIE['MapType'])) $MapType = $globalMapProvider; |
|
123 | - else $MapType = $_COOKIE['MapType']; |
|
138 | + if (!isset($_COOKIE['MapType'])) { |
|
139 | + $MapType = $globalMapProvider; |
|
140 | + } else { |
|
141 | + $MapType = $_COOKIE['MapType']; |
|
142 | + } |
|
124 | 143 | ?> |
125 | 144 | <?php |
126 | 145 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
127 | 146 | ?> |
128 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
129 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
130 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
147 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
148 | + print ' selected'; |
|
149 | +} |
|
150 | +?>>Bing-Aerial</option> |
|
151 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
152 | + print ' selected'; |
|
153 | +} |
|
154 | +?>>Bing-Hybrid</option> |
|
155 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
156 | + print ' selected'; |
|
157 | +} |
|
158 | +?>>Bing-Road</option> |
|
131 | 159 | <?php |
132 | 160 | } |
133 | 161 | ?> |
134 | 162 | <?php |
135 | 163 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
136 | 164 | ?> |
137 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
138 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
139 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
165 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
166 | + print ' selected'; |
|
167 | +} |
|
168 | +?>>Here-Aerial</option> |
|
169 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
170 | + print ' selected'; |
|
171 | +} |
|
172 | +?>>Here-Hybrid</option> |
|
173 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
174 | + print ' selected'; |
|
175 | +} |
|
176 | +?>>Here-Road</option> |
|
140 | 177 | <?php |
141 | 178 | } |
142 | 179 | ?> |
143 | 180 | <?php |
144 | 181 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
145 | 182 | ?> |
146 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
147 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
148 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
149 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
183 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
184 | + print ' selected'; |
|
185 | +} |
|
186 | +?>>Google Roadmap</option> |
|
187 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
188 | + print ' selected'; |
|
189 | +} |
|
190 | +?>>Google Satellite</option> |
|
191 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
192 | + print ' selected'; |
|
193 | +} |
|
194 | +?>>Google Hybrid</option> |
|
195 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
196 | + print ' selected'; |
|
197 | +} |
|
198 | +?>>Google Terrain</option> |
|
150 | 199 | <?php |
151 | 200 | } |
152 | 201 | ?> |
153 | 202 | <?php |
154 | 203 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
155 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
156 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
204 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
205 | + $MapBoxId = 'default'; |
|
206 | + } else { |
|
207 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
208 | + } |
|
157 | 209 | ?> |
158 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
159 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
160 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
161 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
162 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
163 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
164 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
165 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
166 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
167 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
168 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
169 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
210 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
211 | + print ' selected'; |
|
212 | +} |
|
213 | +?>>Mapbox default</option> |
|
214 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
215 | + print ' selected'; |
|
216 | +} |
|
217 | +?>>Mapbox streets</option> |
|
218 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
219 | + print ' selected'; |
|
220 | +} |
|
221 | +?>>Mapbox light</option> |
|
222 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
223 | + print ' selected'; |
|
224 | +} |
|
225 | +?>>Mapbox dark</option> |
|
226 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
227 | + print ' selected'; |
|
228 | +} |
|
229 | +?>>Mapbox satellite</option> |
|
230 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
231 | + print ' selected'; |
|
232 | +} |
|
233 | +?>>Mapbox streets-satellite</option> |
|
234 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
235 | + print ' selected'; |
|
236 | +} |
|
237 | +?>>Mapbox streets-basic</option> |
|
238 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
239 | + print ' selected'; |
|
240 | +} |
|
241 | +?>>Mapbox comic</option> |
|
242 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
243 | + print ' selected'; |
|
244 | +} |
|
245 | +?>>Mapbox outdoors</option> |
|
246 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
247 | + print ' selected'; |
|
248 | +} |
|
249 | +?>>Mapbox pencil</option> |
|
250 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
251 | + print ' selected'; |
|
252 | +} |
|
253 | +?>>Mapbox pirates</option> |
|
254 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
255 | + print ' selected'; |
|
256 | +} |
|
257 | +?>>Mapbox emerald</option> |
|
170 | 258 | <?php |
171 | 259 | } |
172 | 260 | ?> |
173 | 261 | <?php |
174 | 262 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
175 | 263 | ?> |
176 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
177 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
178 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
264 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
265 | + print ' selected'; |
|
266 | +} |
|
267 | +?>>MapQuest-OSM</option> |
|
268 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
269 | + print ' selected'; |
|
270 | +} |
|
271 | +?>>MapQuest-Aerial</option> |
|
272 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
273 | + print ' selected'; |
|
274 | +} |
|
275 | +?>>MapQuest-Hybrid</option> |
|
179 | 276 | <?php |
180 | 277 | } |
181 | 278 | ?> |
182 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
183 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
279 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
280 | + print ' selected'; |
|
281 | +} |
|
282 | +?>>OpenStreetMap</option> |
|
283 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
284 | + print ' selected'; |
|
285 | +} |
|
286 | +?>>Yandex</option> |
|
184 | 287 | </select> |
185 | 288 | </li> |
186 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') || !isset($_COOKIE['flightpopup'])) print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
187 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
188 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
189 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
289 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') || !isset($_COOKIE['flightpopup'])) { |
|
290 | + print 'checked'; |
|
291 | +} |
|
292 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
293 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) { |
|
294 | + print 'checked'; |
|
295 | +} |
|
296 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
297 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) { |
|
298 | + print 'checked'; |
|
299 | +} |
|
300 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
301 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
302 | + print 'checked'; |
|
303 | +} |
|
304 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
190 | 305 | <?php |
191 | 306 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
192 | 307 | ?> |
193 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
308 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
309 | + print 'checked'; |
|
310 | +} |
|
311 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
194 | 312 | <?php |
195 | 313 | } |
196 | 314 | ?> |
@@ -198,12 +316,22 @@ discard block |
||
198 | 316 | <?php |
199 | 317 | if (extension_loaded('gd') && function_exists('gd_info')) { |
200 | 318 | ?> |
201 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
319 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
320 | + print 'checked'; |
|
321 | +} |
|
322 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
202 | 323 | <?php |
203 | 324 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
204 | 325 | ?> |
205 | 326 | <li><?php echo _("Aircraft icon color:"); ?> |
206 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
|
327 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
328 | + print $_COOKIE['IconColor']; |
|
329 | +} elseif (isset($globalAircraftIconColor)) { |
|
330 | + print $globalAircraftIconColor; |
|
331 | +} else { |
|
332 | + print '1a3151'; |
|
333 | +} |
|
334 | +?>"> |
|
207 | 335 | </li> |
208 | 336 | <?php |
209 | 337 | } |
@@ -211,16 +339,39 @@ discard block |
||
211 | 339 | ?> |
212 | 340 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
213 | 341 | <div class="range"> |
214 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
215 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
342 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
343 | + print $_COOKIE['AirportZoom']; |
|
344 | +} elseif (isset($globalAirportZoom)) { |
|
345 | + print $globalAirportZoom; |
|
346 | +} else { |
|
347 | + print '7'; |
|
348 | +} |
|
349 | +?>"> |
|
350 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
351 | + print $_COOKIE['AirportZoom']; |
|
352 | +} elseif (isset($globalAirportZoom)) { |
|
353 | + print $globalAirportZoom; |
|
354 | +} else { |
|
355 | + print '7'; |
|
356 | +} |
|
357 | +?></output> |
|
216 | 358 | </div> |
217 | 359 | </li> |
218 | 360 | <?php |
219 | 361 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
220 | 362 | ?> |
221 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
222 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
223 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
363 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
364 | + print 'checked'; |
|
365 | +} |
|
366 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
367 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
368 | + print 'checked'; |
|
369 | +} |
|
370 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
371 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
372 | + print 'checked'; |
|
373 | +} |
|
374 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
224 | 375 | <?php |
225 | 376 | } |
226 | 377 | ?> |
@@ -228,10 +379,16 @@ discard block |
||
228 | 379 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
229 | 380 | ?> |
230 | 381 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
231 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
382 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
383 | + print 'checked'; |
|
384 | +} |
|
385 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
232 | 386 | <?php } ?> |
233 | 387 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
234 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
388 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
389 | + print 'checked'; |
|
390 | +} |
|
391 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
235 | 392 | <?php } ?> |
236 | 393 | <?php |
237 | 394 | } |
@@ -242,7 +399,9 @@ discard block |
||
242 | 399 | $Spotter = new Spotter(); |
243 | 400 | foreach($Spotter->getAllAirlineNames() as $airline) { |
244 | 401 | $airline_name = $airline['airline_name']; |
245 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
402 | + if (strlen($airline_name) > 30) { |
|
403 | + $airline_name = substr($airline_name,0,30).'...'; |
|
404 | + } |
|
246 | 405 | if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
247 | 406 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
248 | 407 | } else { |
@@ -277,10 +436,22 @@ discard block |
||
277 | 436 | ?> |
278 | 437 | <li><?php echo _("Display airlines of type:"); ?> |
279 | 438 | <select class="selectpicker" onchange="airlinestype(this);"> |
280 | - <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
281 | - <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
282 | - <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
283 | - <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
439 | + <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') { |
|
440 | + echo ' selected'; |
|
441 | +} |
|
442 | +?>><?php echo _("All"); ?></option> |
|
443 | + <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') { |
|
444 | + echo ' selected'; |
|
445 | +} |
|
446 | +?>><?php echo _("Passenger"); ?></option> |
|
447 | + <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') { |
|
448 | + echo ' selected'; |
|
449 | +} |
|
450 | +?>><?php echo _("Cargo"); ?></option> |
|
451 | + <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') { |
|
452 | + echo ' selected'; |
|
453 | +} |
|
454 | +?>><?php echo _("Military"); ?></option> |
|
284 | 455 | </select> |
285 | 456 | </li> |
286 | 457 | <?php |
@@ -288,22 +459,46 @@ discard block |
||
288 | 459 | ?> |
289 | 460 | <li><?php echo _("Distance unit:"); ?> |
290 | 461 | <select class="selectpicker" onchange="unitdistance(this);"> |
291 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
292 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
293 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
462 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
463 | + echo ' selected'; |
|
464 | +} |
|
465 | +?>>km</option> |
|
466 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
467 | + echo ' selected'; |
|
468 | +} |
|
469 | +?>>nm</option> |
|
470 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
471 | + echo ' selected'; |
|
472 | +} |
|
473 | +?>>mi</option> |
|
294 | 474 | </select> |
295 | 475 | </li> |
296 | 476 | <li><?php echo _("Altitude unit:"); ?> |
297 | 477 | <select class="selectpicker" onchange="unitaltitude(this);"> |
298 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
299 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
478 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
479 | + echo ' selected'; |
|
480 | +} |
|
481 | +?>>m</option> |
|
482 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
483 | + echo ' selected'; |
|
484 | +} |
|
485 | +?>>feet</option> |
|
300 | 486 | </select> |
301 | 487 | </li> |
302 | 488 | <li><?php echo _("Speed unit:"); ?> |
303 | 489 | <select class="selectpicker" onchange="unitspeed(this);"> |
304 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
305 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
306 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
490 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
491 | + echo ' selected'; |
|
492 | +} |
|
493 | +?>>km/h</option> |
|
494 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
495 | + echo ' selected'; |
|
496 | +} |
|
497 | +?>>mph</option> |
|
498 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
499 | + echo ' selected'; |
|
500 | +} |
|
501 | +?>>knots</option> |
|
307 | 502 | </select> |
308 | 503 | </li> |
309 | 504 | </ul> |
@@ -8,8 +8,11 @@ |
||
8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
12 | -else $spotter_array = array(); |
|
11 | +if (isset($_GET['date'])) { |
|
12 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
13 | +} else { |
|
14 | + $spotter_array = array(); |
|
15 | +} |
|
13 | 16 | |
14 | 17 | if (!empty($spotter_array)) |
15 | 18 | { |
@@ -5,8 +5,11 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
7 | 7 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
8 | -if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
|
9 | -else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
|
8 | +if (isset($_GET['sort'])) { |
|
9 | + $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
|
10 | +} else { |
|
11 | + $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1"); |
|
12 | +} |
|
10 | 13 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | 14 | |
12 | 15 |
@@ -23,7 +23,9 @@ discard block |
||
23 | 23 | print '<fieldset class="form-group">'; |
24 | 24 | print '<label for="metar_message">'._("METAR Message").'</label>'; |
25 | 25 | print '<textarea class="form-control" name="metar_message" id="metar_message" rows="5">'; |
26 | -if ($message != '') print $message; |
|
26 | +if ($message != '') { |
|
27 | + print $message; |
|
28 | +} |
|
27 | 29 | print '</textarea>'; |
28 | 30 | print '</fieldset>'; |
29 | 31 | print '<button type="submit" class="btn btn-primary">Submit</button>'; |
@@ -59,7 +61,9 @@ discard block |
||
59 | 61 | if (isset($metar_parse['cloud'])) { |
60 | 62 | print '<b>'._("Cloud:").'</b> '; |
61 | 63 | foreach ($metar_parse['cloud'] as $key => $cloud) { |
62 | - if ($key > 0) print ' / '; |
|
64 | + if ($key > 0) { |
|
65 | + print ' / '; |
|
66 | + } |
|
63 | 67 | print $cloud['type'].' at '.$cloud['level'].' m'; |
64 | 68 | } |
65 | 69 | print " "; |
@@ -3,8 +3,11 @@ discard block |
||
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | 5 | // Compressed GeoJson is used if true |
6 | -if (!isset($globalJsonCompress)) $compress = true; |
|
7 | -else $compress = $globalJsonCompress; |
|
6 | +if (!isset($globalJsonCompress)) { |
|
7 | + $compress = true; |
|
8 | +} else { |
|
9 | + $compress = $globalJsonCompress; |
|
10 | +} |
|
8 | 11 | ?> |
9 | 12 | <?php |
10 | 13 | if (isset($_GET['archive'])) { |
@@ -16,8 +19,11 @@ discard block |
||
16 | 19 | //$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10)); |
17 | 20 | //$lastupd = 20; |
18 | 21 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
19 | - if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
|
20 | - else $enddate = time(); |
|
22 | + if (isset($_GET['enddate']) && $_GET['enddate'] != '') { |
|
23 | + $enddate = $_GET['enddate']; |
|
24 | + } else { |
|
25 | + $enddate = time(); |
|
26 | + } |
|
21 | 27 | setcookie("archive_begin",$begindate); |
22 | 28 | setcookie("archive_end",$enddate); |
23 | 29 | setcookie("archive_update",$lastupd); |
@@ -107,7 +113,17 @@ discard block |
||
107 | 113 | } |
108 | 114 | |
109 | 115 | //create the map |
110 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
116 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
117 | + print $latitude; |
|
118 | +} else { |
|
119 | + print $globalCenterLatitude; |
|
120 | +} |
|
121 | +?>,<?php if (isset($longitude)) { |
|
122 | + print $longitude; |
|
123 | +} else { |
|
124 | + print $globalCenterLongitude; |
|
125 | +} |
|
126 | +?>], zoom); |
|
111 | 127 | <?php |
112 | 128 | } else { |
113 | 129 | ?> |
@@ -120,9 +136,19 @@ discard block |
||
120 | 136 | || navigator.userAgent.match(/BlackBerry/i) |
121 | 137 | || navigator.userAgent.match(/Windows Phone/i)) |
122 | 138 | { |
123 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
139 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
140 | + print $globalLiveZoom-1; |
|
141 | +} else { |
|
142 | + print '8'; |
|
143 | +} |
|
144 | +?>; |
|
124 | 145 | } else { |
125 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
|
146 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
147 | + print $globalLiveZoom; |
|
148 | +} else { |
|
149 | + print '9'; |
|
150 | +} |
|
151 | +?>; |
|
126 | 152 | } |
127 | 153 | |
128 | 154 | //create the map |
@@ -146,16 +172,27 @@ discard block |
||
146 | 172 | bounds = L.latLngBounds(southWest,northEast); |
147 | 173 | //a few title layers |
148 | 174 | <?php |
149 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
150 | - else $MapType = $globalMapProvider; |
|
175 | + if (isset($_COOKIE['MapType'])) { |
|
176 | + $MapType = $_COOKIE['MapType']; |
|
177 | + } else { |
|
178 | + $MapType = $globalMapProvider; |
|
179 | + } |
|
151 | 180 | |
152 | 181 | if ($MapType == 'Mapbox') { |
153 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
154 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
155 | -?> |
|
182 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
183 | + $MapBoxId = $globalMapboxId; |
|
184 | + } else { |
|
185 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
186 | + } |
|
187 | + ?> |
|
156 | 188 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
157 | 189 | maxZoom: 18, |
158 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
190 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
191 | + print 'false'; |
|
192 | +} else { |
|
193 | + print 'true'; |
|
194 | +} |
|
195 | +?>, |
|
159 | 196 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
160 | 197 | '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + |
161 | 198 | 'Imagery © <a href="http://mapbox.com">Mapbox</a>', |
@@ -167,7 +204,12 @@ discard block |
||
167 | 204 | ?> |
168 | 205 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
169 | 206 | maxZoom: 18, |
170 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
207 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
208 | + print 'false'; |
|
209 | +} else { |
|
210 | + print 'true'; |
|
211 | +} |
|
212 | +?>, |
|
171 | 213 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
172 | 214 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
173 | 215 | }).addTo(map); |
@@ -271,7 +313,12 @@ discard block |
||
271 | 313 | } |
272 | 314 | } elseif ($globalBounding == 'circle') { |
273 | 315 | ?> |
274 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
316 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
317 | + print $globalBoundingCircleSize; |
|
318 | +} else { |
|
319 | + print '70000'; |
|
320 | +} |
|
321 | +?>,{ |
|
275 | 322 | color: '#92C7D1', |
276 | 323 | fillColor: '#92C7D1', |
277 | 324 | fillOpacity: 0.3, |
@@ -330,8 +377,11 @@ discard block |
||
330 | 377 | |
331 | 378 | function update_airportsLayer() { |
332 | 379 | <?php |
333 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
334 | - else $getZoom = '7'; |
|
380 | + if (isset($_COOKIE['AirportZoom'])) { |
|
381 | + $getZoom = $_COOKIE['AirportZoom']; |
|
382 | + } else { |
|
383 | + $getZoom = '7'; |
|
384 | + } |
|
335 | 385 | ?> |
336 | 386 | //if (map.getZoom() <= <?php print $getZoom; ?>) { |
337 | 387 | if (typeof airportsLayer != 'undefined') { |
@@ -674,9 +724,13 @@ discard block |
||
674 | 724 | if (callsign != ""){ markerLabel += callsign; } |
675 | 725 | if (departure_airport_code != "" && arrival_airport_code != "" && departure_airport_code != "NA" && arrival_airport_code != "NA"){ markerLabel += ' ( '+departure_airport_code+' - '+arrival_airport_code+' )'; } |
676 | 726 | <?php |
677 | - if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
678 | - elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
679 | - else $IconColor = '1a3151'; |
|
727 | + if (isset($_COOKIE['IconColor'])) { |
|
728 | + $IconColor = $_COOKIE['IconColor']; |
|
729 | + } elseif (isset($globalAircraftIconColor)) { |
|
730 | + $IconColor = $globalAircraftIconColor; |
|
731 | + } else { |
|
732 | + $IconColor = '1a3151'; |
|
733 | + } |
|
680 | 734 | if (!isset($ident) && !isset($flightaware_id)) { |
681 | 735 | ?> |
682 | 736 | info.update(feature.properties.fc); |
@@ -724,7 +778,12 @@ discard block |
||
724 | 778 | <?php |
725 | 779 | } else { |
726 | 780 | ?> |
727 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
781 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
782 | + print $archiveupdatetime*1000; |
|
783 | +} else { |
|
784 | + print $globalMapRefresh*1000+20000; |
|
785 | +} |
|
786 | +?>+feature.properties.sqt*1000); |
|
728 | 787 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
729 | 788 | <?php |
730 | 789 | } |
@@ -769,7 +828,12 @@ discard block |
||
769 | 828 | <?php |
770 | 829 | } else { |
771 | 830 | ?> |
772 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
831 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
832 | + print $archiveupdatetime*1000; |
|
833 | +} else { |
|
834 | + print $globalMapRefresh*1000+20000; |
|
835 | +} |
|
836 | +?>+feature.properties.sqt*1000); |
|
773 | 837 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
774 | 838 | <?php |
775 | 839 | } |
@@ -813,7 +877,12 @@ discard block |
||
813 | 877 | <?php |
814 | 878 | } else { |
815 | 879 | ?> |
816 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
880 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
881 | + print $archiveupdatetime*1000; |
|
882 | +} else { |
|
883 | + print $globalMapRefresh*1000+20000; |
|
884 | +} |
|
885 | +?>+feature.properties.sqt*1000); |
|
817 | 886 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
818 | 887 | <?php |
819 | 888 | } |
@@ -1155,19 +1224,34 @@ discard block |
||
1155 | 1224 | if (isset($_GET['archive'])) { |
1156 | 1225 | ?> |
1157 | 1226 | //then load it again every 30 seconds |
1158 | -// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
1227 | +// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
1228 | + print ($globalMapRefresh*1000)/2; |
|
1229 | +} else { |
|
1230 | + print '15000'; |
|
1231 | +} |
|
1232 | +?>); |
|
1159 | 1233 | reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php print $archiveupdatetime*1000; ?>); |
1160 | 1234 | <?php |
1161 | 1235 | } else { |
1162 | 1236 | ?> |
1163 | 1237 | //then load it again every 30 seconds |
1164 | -reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
1238 | +reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
1239 | + print $globalMapRefresh*1000; |
|
1240 | +} else { |
|
1241 | + print '30000'; |
|
1242 | +} |
|
1243 | +?>); |
|
1165 | 1244 | |
1166 | 1245 | <?php |
1167 | 1246 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
1168 | 1247 | ?> |
1169 | 1248 | update_polarLayer(); |
1170 | -setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
1249 | +setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
1250 | + print $globalMapRefresh*1000*2; |
|
1251 | +} else { |
|
1252 | + print '60000'; |
|
1253 | +} |
|
1254 | +?>); |
|
1171 | 1255 | <?php |
1172 | 1256 | } |
1173 | 1257 | ?> |
@@ -1182,7 +1266,12 @@ discard block |
||
1182 | 1266 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) ) { |
1183 | 1267 | ?> |
1184 | 1268 | update_atcLayer(); |
1185 | -setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
1269 | +setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
1270 | + print $globalMapRefresh*1000*2; |
|
1271 | +} else { |
|
1272 | + print '60000'; |
|
1273 | +} |
|
1274 | +?>); |
|
1186 | 1275 | <?php |
1187 | 1276 | } |
1188 | 1277 | ?> |
@@ -12,7 +12,9 @@ |
||
12 | 12 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | -} else $spotter_array = array(); |
|
15 | +} else { |
|
16 | + $spotter_array = array(); |
|
17 | +} |
|
16 | 18 | |
17 | 19 | if (!empty($spotter_array)) |
18 | 20 | { |
@@ -12,7 +12,9 @@ |
||
12 | 12 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | -} else $spotter_array = array(); |
|
15 | +} else { |
|
16 | + $spotter_array = array(); |
|
17 | +} |
|
16 | 18 | |
17 | 19 | if (!empty($spotter_array)) |
18 | 20 | { |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -49,7 +57,7 @@ discard block |
||
49 | 57 | $limit_end = $_GET['number_results']; |
50 | 58 | $absolute_difference = $_GET['number_results']; |
51 | 59 | } |
52 | -} else { |
|
60 | +} else { |
|
53 | 61 | $limit_explode = explode(",", $_GET['limit']); |
54 | 62 | $limit_start = $limit_explode[0]; |
55 | 63 | $limit_end = $limit_explode[1]; |
@@ -67,8 +75,11 @@ discard block |
||
67 | 75 | |
68 | 76 | header("Content-type: text/yaml"); |
69 | 77 | |
70 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
71 | -else $sort = ''; |
|
78 | +if (isset($_GET['sort'])) { |
|
79 | + $sort = $_GET['sort']; |
|
80 | +} else { |
|
81 | + $sort = ''; |
|
82 | +} |
|
72 | 83 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
73 | 84 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
74 | 85 | $aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |