@@ -42,7 +42,9 @@ discard block |
||
42 | 42 | } |
43 | 43 | $Stats = new Stats(); |
44 | 44 | $airline_names = $Stats->getAllAirlineNames(); |
45 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
45 | + if (empty($airline_names)) { |
|
46 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
47 | + } |
|
46 | 48 | foreach($airline_names as $airline_name) |
47 | 49 | { |
48 | 50 | if($airline == $airline_name['airline_icao']) |
@@ -65,8 +67,7 @@ discard block |
||
65 | 67 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
66 | 68 | { |
67 | 69 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
68 | - } |
|
69 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
70 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
70 | 71 | { |
71 | 72 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
72 | 73 | } |
@@ -42,7 +42,9 @@ discard block |
||
42 | 42 | } |
43 | 43 | $Stats = new Stats(); |
44 | 44 | $airline_names = $Stats->getAllAirlineNames(); |
45 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
45 | + if (empty($airline_names)) { |
|
46 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
47 | + } |
|
46 | 48 | foreach($airline_names as $airline_name) |
47 | 49 | { |
48 | 50 | if($airline == $airline_name['airline_icao']) |
@@ -65,8 +67,7 @@ discard block |
||
65 | 67 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
66 | 68 | { |
67 | 69 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
68 | - } |
|
69 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
70 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
70 | 71 | { |
71 | 72 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
72 | 73 | } |
@@ -25,7 +25,9 @@ discard block |
||
25 | 25 | echo json_encode($marinecnt); |
26 | 26 | } elseif ($ask == 'manufacturer') { |
27 | 27 | $manufacturers = $Stats->getAllManufacturers(); |
28 | - if (empty($manufacturers)) $manufacturers = $Spotter->getAllManufacturers(); |
|
28 | + if (empty($manufacturers)) { |
|
29 | + $manufacturers = $Spotter->getAllManufacturers(); |
|
30 | + } |
|
29 | 31 | $all_manufacturers = array(); |
30 | 32 | foreach($manufacturers as $manufacturer) |
31 | 33 | { |
@@ -34,7 +36,9 @@ discard block |
||
34 | 36 | echo json_encode($all_manufacturers); |
35 | 37 | } elseif ($ask == 'aircrafttypes') { |
36 | 38 | $aircraft_types = $Stats->getAllAircraftTypes(); |
37 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
39 | + if (empty($aircraft_types)) { |
|
40 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
41 | + } |
|
38 | 42 | $all_aircraft_types = array(); |
39 | 43 | foreach($aircraft_types as $aircraft_type) |
40 | 44 | { |
@@ -59,7 +63,9 @@ discard block |
||
59 | 63 | echo json_encode($all_airline_countries); |
60 | 64 | } elseif ($ask == 'airportnames' || $ask == 'departureairportnames' || $ask == 'arrivalairportnames') { |
61 | 65 | $airport_names = $Stats->getAllAirportNames(); |
62 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
66 | + if (empty($airport_names)) { |
|
67 | + $airport_names = $Spotter->getAllAirportNames(); |
|
68 | + } |
|
63 | 69 | ksort($airport_names); |
64 | 70 | $all_airport_names = array(); |
65 | 71 | foreach($airport_names as $airport_name) |
@@ -36,8 +36,10 @@ discard block |
||
36 | 36 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
37 | 37 | $sql_date = $end_date; |
38 | 38 | } |
39 | - } else $sql_date = ''; |
|
40 | -} |
|
39 | + } else { |
|
40 | + $sql_date = ''; |
|
41 | + } |
|
42 | + } |
|
41 | 43 | |
42 | 44 | if (isset($_GET['highest_altitude'])) { |
43 | 45 | //for altitude manipulation |
@@ -51,8 +53,12 @@ discard block |
||
51 | 53 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
52 | 54 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
53 | 55 | $sql_altitude = $start_altitude; |
54 | - } else $sql_altitude = ''; |
|
55 | -} else $sql_altitude = ''; |
|
56 | + } else { |
|
57 | + $sql_altitude = ''; |
|
58 | + } |
|
59 | + } else { |
|
60 | + $sql_altitude = ''; |
|
61 | +} |
|
56 | 62 | |
57 | 63 | //calculuation for the pagination |
58 | 64 | if(!isset($_GET['limit'])) |
@@ -70,7 +76,7 @@ discard block |
||
70 | 76 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
71 | 77 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
72 | 78 | } |
73 | -} else { |
|
79 | +} else { |
|
74 | 80 | $limit_explode = explode(",", $_GET['limit']); |
75 | 81 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
76 | 82 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -103,10 +109,15 @@ discard block |
||
103 | 109 | $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_NUMBER_FLOAT); |
104 | 110 | $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
105 | 111 | if ($dist != '') { |
106 | - if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
|
107 | - elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
|
112 | + if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') { |
|
113 | + $dist = $dist*1.60934; |
|
114 | + } elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') { |
|
115 | + $dist = $dist*1.852; |
|
116 | + } |
|
117 | + } |
|
118 | + if (!isset($sql_date)) { |
|
119 | + $sql_date = ''; |
|
108 | 120 | } |
109 | - if (!isset($sql_date)) $sql_date = ''; |
|
110 | 121 | if ($archive == 1) { |
111 | 122 | $SpotterArchive = new SpotterArchive(); |
112 | 123 | $spotter_array = $SpotterArchive->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
@@ -174,7 +185,10 @@ discard block |
||
174 | 185 | if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
175 | 186 | if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
176 | 187 | if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$registration.'</span> '; } |
177 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
188 | + if (isset($_GET['highlights'])) { |
|
189 | + if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; |
|
190 | + } |
|
191 | + } |
|
178 | 192 | if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$airline.'</span> '; } |
179 | 193 | if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
180 | 194 | if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
@@ -285,7 +299,10 @@ discard block |
||
285 | 299 | <div class="form-group"> |
286 | 300 | <label class="control-label col-sm-2"><?php echo _("Keywords"); ?></label> |
287 | 301 | <div class="col-sm-10"> |
288 | - <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) print $q; ?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
302 | + <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) { |
|
303 | + print $q; |
|
304 | +} |
|
305 | +?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
289 | 306 | </div> |
290 | 307 | </div> |
291 | 308 | </fieldset> |
@@ -300,7 +317,10 @@ discard block |
||
300 | 317 | </select> |
301 | 318 | </div> |
302 | 319 | </div> |
303 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
320 | + <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) { |
|
321 | + print $manufacturer; |
|
322 | +} |
|
323 | +?>')</script> |
|
304 | 324 | <div class="form-group"> |
305 | 325 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
306 | 326 | <div class="col-sm-10"> |
@@ -309,11 +329,17 @@ discard block |
||
309 | 329 | </select> |
310 | 330 | </div> |
311 | 331 | </div> |
312 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
332 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) { |
|
333 | + print $aircraft_icao; |
|
334 | +} |
|
335 | +?>');</script> |
|
313 | 336 | <div class="form-group"> |
314 | 337 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
315 | 338 | <div class="col-sm-10"> |
316 | - <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) print $registration; ?>" size="8" placeholder="<?php echo _("Registration"); ?>" /> |
|
339 | + <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) { |
|
340 | + print $registration; |
|
341 | +} |
|
342 | +?>" size="8" placeholder="<?php echo _("Registration"); ?>" /> |
|
317 | 343 | </div> |
318 | 344 | </div> |
319 | 345 | <?php |
@@ -322,22 +348,31 @@ discard block |
||
322 | 348 | <div class="form-group"> |
323 | 349 | <label class="control-label col-sm-2"><?php echo _("Pilot id"); ?></label> |
324 | 350 | <div class="col-sm-10"> |
325 | - <input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) print $pilot_id; ?>" size="15" placeholder="<?php echo _("Pilot id"); ?>" /> |
|
351 | + <input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) { |
|
352 | + print $pilot_id; |
|
353 | +} |
|
354 | +?>" size="15" placeholder="<?php echo _("Pilot id"); ?>" /> |
|
326 | 355 | </div> |
327 | 356 | </div> |
328 | 357 | <div class="form-group"> |
329 | 358 | <label class="control-label col-sm-2"><?php echo _("Pilot name"); ?></label> |
330 | 359 | <div class="col-sm-10"> |
331 | - <input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) print $pilot_name; ?>" size="15" placeholder="<?php echo _("Pilot name"); ?>" /> |
|
360 | + <input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) { |
|
361 | + print $pilot_name; |
|
362 | +} |
|
363 | +?>" size="15" placeholder="<?php echo _("Pilot name"); ?>" /> |
|
332 | 364 | </div> |
333 | 365 | </div> |
334 | 366 | <?php |
335 | -}else { |
|
367 | +} else { |
|
336 | 368 | ?> |
337 | 369 | <div class="form-group"> |
338 | 370 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
339 | 371 | <div class="col-sm-10"> |
340 | - <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) print $owner; ?>" size="15" placeholder="<?php echo _("Owner name"); ?>" /> |
|
372 | + <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) { |
|
373 | + print $owner; |
|
374 | +} |
|
375 | +?>" size="15" placeholder="<?php echo _("Owner name"); ?>" /> |
|
341 | 376 | </div> |
342 | 377 | </div> |
343 | 378 | <?php |
@@ -345,8 +380,14 @@ discard block |
||
345 | 380 | ?> |
346 | 381 | <div class="form-group"> |
347 | 382 | <div class="col-sm-offset-2 col-sm-10"> |
348 | - <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
349 | - <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
383 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
384 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
385 | +} |
|
386 | +} ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
387 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
388 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
389 | +} |
|
390 | +} ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
350 | 391 | </div> |
351 | 392 | </div> |
352 | 393 | </fieldset> |
@@ -360,7 +401,10 @@ discard block |
||
360 | 401 | </select> |
361 | 402 | </div> |
362 | 403 | </div> |
363 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $airline; ?>');</script> |
|
404 | + <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) { |
|
405 | + print $airline; |
|
406 | +} |
|
407 | +?>');</script> |
|
364 | 408 | <div class="form-group"> |
365 | 409 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
366 | 410 | <div class="col-sm-10"> |
@@ -369,19 +413,34 @@ discard block |
||
369 | 413 | </select> |
370 | 414 | </div> |
371 | 415 | </div> |
372 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
416 | + <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) { |
|
417 | + print $airline_country; |
|
418 | +} |
|
419 | +?>');</script> |
|
373 | 420 | <div class="form-group"> |
374 | 421 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
375 | 422 | <div class="col-sm-10"> |
376 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
423 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
424 | + print $callsign; |
|
425 | +} |
|
426 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
377 | 427 | </div> |
378 | 428 | </div> |
379 | 429 | <div class="form-group"> |
380 | 430 | <div class="col-sm-offset-2 col-sm-10"> |
381 | 431 | <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
382 | - <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
383 | - <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
384 | - <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
432 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) { |
|
433 | + if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; |
|
434 | +} |
|
435 | +} ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
436 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) { |
|
437 | + if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; |
|
438 | +} |
|
439 | +} ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
440 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) { |
|
441 | + if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; |
|
442 | +} |
|
443 | +} ?>> <?php echo _("Only Military airlines"); ?></label> |
|
385 | 444 | </div> |
386 | 445 | </div> |
387 | 446 | </fieldset> |
@@ -395,7 +454,10 @@ discard block |
||
395 | 454 | </select> |
396 | 455 | </div> |
397 | 456 | </div> |
398 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
457 | + <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) { |
|
458 | + print $airport_icao; |
|
459 | +} |
|
460 | +?>');</script> |
|
399 | 461 | <div class="form-group"> |
400 | 462 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
401 | 463 | <div class="col-sm-10"> |
@@ -404,7 +466,10 @@ discard block |
||
404 | 466 | </select> |
405 | 467 | </div> |
406 | 468 | </div> |
407 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
469 | + <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) { |
|
470 | + print $airport_country; |
|
471 | +} |
|
472 | +?>');</script> |
|
408 | 473 | </fieldset> |
409 | 474 | <fieldset> |
410 | 475 | <legend><?php echo _("Route"); ?></legend> |
@@ -416,7 +481,10 @@ discard block |
||
416 | 481 | </select> |
417 | 482 | </div> |
418 | 483 | </div> |
419 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
484 | + <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) { |
|
485 | + print $departure_airport_route; |
|
486 | +} |
|
487 | +?>');</script> |
|
420 | 488 | <div class="form-group"> |
421 | 489 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
422 | 490 | <div class="col-sm-10"> |
@@ -425,7 +493,10 @@ discard block |
||
425 | 493 | </select> |
426 | 494 | </div> |
427 | 495 | </div> |
428 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
496 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) { |
|
497 | + print $arrival_airport_route; |
|
498 | +} |
|
499 | +?>');</script> |
|
429 | 500 | </fieldset> |
430 | 501 | <fieldset> |
431 | 502 | <legend><?php echo _("Date"); ?></legend> |
@@ -433,7 +504,10 @@ discard block |
||
433 | 504 | <label class="control-label col-sm-2"><?php echo _("Start Date"); ?></label> |
434 | 505 | <div class="col-sm-10"> |
435 | 506 | <div class='input-group date' id='datetimepicker1'> |
436 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) print $start_date; ?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
507 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) { |
|
508 | + print $start_date; |
|
509 | +} |
|
510 | +?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
437 | 511 | <span class="input-group-addon"> |
438 | 512 | <span class="glyphicon glyphicon-calendar"></span> |
439 | 513 | </span> |
@@ -444,7 +518,10 @@ discard block |
||
444 | 518 | <label class="control-label col-sm-2"><?php echo _("End Date"); ?></label> |
445 | 519 | <div class="col-sm-10"> |
446 | 520 | <div class='input-group date' id='datetimepicker2'> |
447 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) print $end_date; ?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
521 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) { |
|
522 | + print $end_date; |
|
523 | +} |
|
524 | +?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
448 | 525 | <span class="input-group-addon"> |
449 | 526 | <span class="glyphicon glyphicon-calendar"></span> |
450 | 527 | </span> |
@@ -517,19 +594,33 @@ discard block |
||
517 | 594 | <div class="form-group"> |
518 | 595 | <label class="control-label col-sm-2"><?php echo _("Latitude"); ?></label> |
519 | 596 | <div class="col-sm-10"> |
520 | - <input type="text" name="origlat" class="form-control" placeholder="<?php echo _("Center point latitude"); ?>" value="<?php if (isset($_GET['origlat'])) print $origlat; ?>" /> |
|
597 | + <input type="text" name="origlat" class="form-control" placeholder="<?php echo _("Center point latitude"); ?>" value="<?php if (isset($_GET['origlat'])) { |
|
598 | + print $origlat; |
|
599 | +} |
|
600 | +?>" /> |
|
521 | 601 | </div> |
522 | 602 | </div> |
523 | 603 | <div class="form-group"> |
524 | 604 | <label class="control-label col-sm-2"><?php echo _("Longitude"); ?></label> |
525 | 605 | <div class="col-sm-10"> |
526 | - <input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" value="<?php if (isset($_GET['origlon'])) print $origlon; ?>" /> |
|
606 | + <input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" value="<?php if (isset($_GET['origlon'])) { |
|
607 | + print $origlon; |
|
608 | +} |
|
609 | +?>" /> |
|
527 | 610 | </div> |
528 | 611 | </div> |
529 | 612 | <div class="form-group"> |
530 | - <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) print $globalDistanceUnit; else print 'km'; print ')'; ?></label> |
|
613 | + <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) { |
|
614 | + print $globalDistanceUnit; |
|
615 | +} else { |
|
616 | + print 'km'; |
|
617 | +} |
|
618 | +print ')'; ?></label> |
|
531 | 619 | <div class="col-sm-10"> |
532 | - <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" value="<?php if (isset($_GET['distance'])) print $distance; ?>" /> |
|
620 | + <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" value="<?php if (isset($_GET['distance'])) { |
|
621 | + print $distance; |
|
622 | +} |
|
623 | +?>" /> |
|
533 | 624 | </div> |
534 | 625 | </div> |
535 | 626 | </fieldset> |
@@ -81,10 +81,15 @@ |
||
81 | 81 | // $launch_date = '15 November 1974'; |
82 | 82 | } else { |
83 | 83 | $ident = $sat; |
84 | - if (strpos($sat,'(')) $satname = $sat; |
|
85 | - else $satname = str_replace(array(' '),'-',$sat); |
|
84 | + if (strpos($sat,'(')) { |
|
85 | + $satname = $sat; |
|
86 | + } else { |
|
87 | + $satname = str_replace(array(' '),'-',$sat); |
|
88 | + } |
|
89 | + } |
|
90 | +if (!isset($satname)) { |
|
91 | + $satname = $sat; |
|
86 | 92 | } |
87 | -if (!isset($satname)) $satname = $sat; |
|
88 | 93 | $info = $Satellite->get_info(strtolower(trim($satname))); |
89 | 94 | $position = $Satellite->position($sat); |
90 | 95 | $ground_speed = $position['speed']; |
@@ -3,10 +3,15 @@ discard block |
||
3 | 3 | //gets the page file and stores it in a variable |
4 | 4 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
5 | 5 | $current_page = $file_path['filename']; |
6 | -if ($globalTimezone == '') $globalTimezone = 'UTC'; |
|
6 | +if ($globalTimezone == '') { |
|
7 | + $globalTimezone = 'UTC'; |
|
8 | +} |
|
7 | 9 | date_default_timezone_set($globalTimezone); |
8 | -if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
|
9 | -else $MapType = $globalMapProvider; |
|
10 | +if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') { |
|
11 | + $MapType = $_COOKIE['MapType']; |
|
12 | +} else { |
|
13 | + $MapType = $globalMapProvider; |
|
14 | +} |
|
10 | 15 | if (isset($_GET['3d'])) { |
11 | 16 | setcookie('MapFormat','3d'); |
12 | 17 | } else if (isset($_GET['2d'])) { |
@@ -231,7 +236,13 @@ discard block |
||
231 | 236 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
232 | 237 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
233 | 238 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
234 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
239 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
240 | + print '&latitude='.$latitude; |
|
241 | +} |
|
242 | +?><?php if(isset($longitude)) { |
|
243 | + print '&longitude='.$longitude; |
|
244 | +} |
|
245 | +?>&<?php print time(); ?>"></script> |
|
235 | 246 | <?php |
236 | 247 | if (!isset($type) || $type == 'aircraft') { |
237 | 248 | ?> |
@@ -300,7 +311,13 @@ discard block |
||
300 | 311 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
301 | 312 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
302 | 313 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
303 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
314 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
315 | + print '&latitude='.$latitude; |
|
316 | +} |
|
317 | +?><?php if(isset($longitude)) { |
|
318 | + print '&longitude='.$longitude; |
|
319 | +} |
|
320 | +?>&<?php print time(); ?>"></script> |
|
304 | 321 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
305 | 322 | <?php |
306 | 323 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -381,7 +398,12 @@ discard block |
||
381 | 398 | <span class="icon-bar"></span> |
382 | 399 | </button> |
383 | 400 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a> |
384 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
401 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
402 | + print '/'; |
|
403 | +} else { |
|
404 | + print $globalURL; |
|
405 | +} |
|
406 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
385 | 407 | </div> |
386 | 408 | <div class="collapse navbar-collapse"> |
387 | 409 | |
@@ -420,7 +442,10 @@ discard block |
||
420 | 442 | <?php |
421 | 443 | } |
422 | 444 | ?> |
423 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
445 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
446 | + echo 'right-'; |
|
447 | +} |
|
448 | +?>caret"></b></a> |
|
424 | 449 | <ul class="dropdown-menu"> |
425 | 450 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li> |
426 | 451 | <?php |
@@ -491,8 +516,14 @@ discard block |
||
491 | 516 | </li> |
492 | 517 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
493 | 518 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
494 | - <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
|
495 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
519 | + <li class="dropdown<?php if ($sub) { |
|
520 | + echo '-submenu'; |
|
521 | +} |
|
522 | +?>"> |
|
523 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) { |
|
524 | + echo 'right-'; |
|
525 | +} |
|
526 | +?>caret"></b></a> |
|
496 | 527 | <ul class="dropdown-menu"> |
497 | 528 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
498 | 529 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
@@ -528,7 +559,10 @@ discard block |
||
528 | 559 | <?php |
529 | 560 | } |
530 | 561 | ?> |
531 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
562 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
563 | + echo 'right-'; |
|
564 | +} |
|
565 | +?>caret"></b></a> |
|
532 | 566 | <ul class="dropdown-menu"> |
533 | 567 | <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li> |
534 | 568 | <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -560,7 +594,10 @@ discard block |
||
560 | 594 | <?php |
561 | 595 | } |
562 | 596 | ?> |
563 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
597 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
598 | + echo 'right-'; |
|
599 | +} |
|
600 | +?>caret"></b></a> |
|
564 | 601 | <ul class="dropdown-menu"> |
565 | 602 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
566 | 603 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -593,7 +630,10 @@ discard block |
||
593 | 630 | } |
594 | 631 | ?> |
595 | 632 | <!-- |
596 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
633 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
634 | + echo 'right-'; |
|
635 | +} |
|
636 | +?>caret"></b></a> |
|
597 | 637 | <ul class="dropdown-menu"> |
598 | 638 | <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li> |
599 | 639 | <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -650,7 +690,9 @@ discard block |
||
650 | 690 | $alllang = $Language->getLanguages(); |
651 | 691 | foreach ($alllang as $key => $lang) { |
652 | 692 | print '<option value="'.$key.'"'; |
653 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
693 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
694 | + print ' selected '; |
|
695 | + } |
|
654 | 696 | print '>'.$lang[0].'</option>'; |
655 | 697 | } |
656 | 698 | ?> |
@@ -790,9 +832,24 @@ discard block |
||
790 | 832 | $customid = $globalMapProvider; |
791 | 833 | ?> |
792 | 834 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
793 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
794 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
795 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
835 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
836 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
837 | +} else { |
|
838 | + print '18'; |
|
839 | +} |
|
840 | +?>, |
|
841 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
842 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
843 | +} else { |
|
844 | + print '0'; |
|
845 | +} |
|
846 | +?>, |
|
847 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
848 | + print 'false'; |
|
849 | +} else { |
|
850 | + print 'true'; |
|
851 | +} |
|
852 | +?>, |
|
796 | 853 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
797 | 854 | }).addTo(map); |
798 | 855 | <?php |
@@ -815,4 +872,7 @@ discard block |
||
815 | 872 | |
816 | 873 | ?> |
817 | 874 | |
818 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
875 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
876 | + print 'index '; |
|
877 | +} |
|
878 | +?>clear"> |
@@ -6,7 +6,13 @@ discard block |
||
6 | 6 | if (!isset($type) || $type != 'satellite') { |
7 | 7 | ?> |
8 | 8 | <form id="changedate" method="post"> |
9 | - <input type="month" name="date" onchange="statsdatechange(this);" value="<?php if (isset($year) && $year != '') echo $year.'-'; ?><?php if (isset($month) && $month != '') echo $month; ?>" /> |
|
9 | + <input type="month" name="date" onchange="statsdatechange(this);" value="<?php if (isset($year) && $year != '') { |
|
10 | + echo $year.'-'; |
|
11 | +} |
|
12 | +?><?php if (isset($month) && $month != '') { |
|
13 | + echo $month; |
|
14 | +} |
|
15 | +?>" /> |
|
10 | 16 | </form> |
11 | 17 | <?php |
12 | 18 | } |
@@ -38,7 +44,9 @@ discard block |
||
38 | 44 | print '<option disabled>──────────</option>'; |
39 | 45 | } |
40 | 46 | $Stats = new Stats(); |
41 | - if (!isset($filter_name)) $filter_name = ''; |
|
47 | + if (!isset($filter_name)) { |
|
48 | + $filter_name = ''; |
|
49 | + } |
|
42 | 50 | $airlines = $Stats->getAllAirlineNames($filter_name); |
43 | 51 | foreach($airlines as $airline) { |
44 | 52 | if (isset($airline_icao) && $airline_icao == $airline['airline_icao']) { |
@@ -67,10 +75,22 @@ discard block |
||
67 | 75 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
68 | 76 | </a> |
69 | 77 | <ul class="dropdown-menu"> |
70 | - <li><a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Aircraft"); ?></a></li> |
|
71 | - <li><a href="<?php print $globalURL; ?>/statistics/registration<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Registration"); ?></a></li> |
|
72 | - <li><a href="<?php print $globalURL; ?>/statistics/manufacturer<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Manufacturer"); ?></a></li> |
|
73 | - <li><a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Country"); ?></a></li> |
|
78 | + <li><a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
79 | + echo '/'.$airline_icao; |
|
80 | +} |
|
81 | +?>"><?php echo _("Aircraft"); ?></a></li> |
|
82 | + <li><a href="<?php print $globalURL; ?>/statistics/registration<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
83 | + echo '/'.$airline_icao; |
|
84 | +} |
|
85 | +?>"><?php echo _("Registration"); ?></a></li> |
|
86 | + <li><a href="<?php print $globalURL; ?>/statistics/manufacturer<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
87 | + echo '/'.$airline_icao; |
|
88 | +} |
|
89 | +?>"><?php echo _("Manufacturer"); ?></a></li> |
|
90 | + <li><a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
91 | + echo '/'.$airline_icao; |
|
92 | +} |
|
93 | +?>"><?php echo _("Country"); ?></a></li> |
|
74 | 94 | </ul> |
75 | 95 | </li> |
76 | 96 | <li class="dropdown"> |
@@ -81,12 +101,21 @@ discard block |
||
81 | 101 | <?php |
82 | 102 | if (!isset($airline_icao) || $airline_icao == 'all') { |
83 | 103 | ?> |
84 | - <li><a href="<?php print $globalURL; ?>/statistics/airline<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Airline"); ?></a></li> |
|
85 | - <li><a href="<?php print $globalURL; ?>/statistics/airline-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Airline by Country"); ?></a></li> |
|
104 | + <li><a href="<?php print $globalURL; ?>/statistics/airline<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
105 | + echo '/'.$airline_icao; |
|
106 | +} |
|
107 | +?>"><?php echo _("Airline"); ?></a></li> |
|
108 | + <li><a href="<?php print $globalURL; ?>/statistics/airline-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
109 | + echo '/'.$airline_icao; |
|
110 | +} |
|
111 | +?>"><?php echo _("Airline by Country"); ?></a></li> |
|
86 | 112 | <?php |
87 | 113 | } |
88 | 114 | ?> |
89 | - <li><a href="<?php print $globalURL; ?>/statistics/callsign<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Callsign"); ?></a></li> |
|
115 | + <li><a href="<?php print $globalURL; ?>/statistics/callsign<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
116 | + echo '/'.$airline_icao; |
|
117 | +} |
|
118 | +?>"><?php echo _("Callsign"); ?></a></li> |
|
90 | 119 | </ul> |
91 | 120 | </li> |
92 | 121 | <li class="dropdown"> |
@@ -94,10 +123,22 @@ discard block |
||
94 | 123 | <?php echo _("Airport"); ?> <span class="caret"></span> |
95 | 124 | </a> |
96 | 125 | <ul class="dropdown-menu" role="menu"> |
97 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-departure<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Departure Airport"); ?></a></li> |
|
98 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-departure-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Departure Airport by Country"); ?></a></li> |
|
99 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Arrival Airport"); ?></a></li> |
|
100 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
|
126 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-departure<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
127 | + echo '/'.$airline_icao; |
|
128 | +} |
|
129 | +?>"><?php echo _("Departure Airport"); ?></a></li> |
|
130 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-departure-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
131 | + echo '/'.$airline_icao; |
|
132 | +} |
|
133 | +?>"><?php echo _("Departure Airport by Country"); ?></a></li> |
|
134 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
135 | + echo '/'.$airline_icao; |
|
136 | +} |
|
137 | +?>"><?php echo _("Arrival Airport"); ?></a></li> |
|
138 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
139 | + echo '/'.$airline_icao; |
|
140 | +} |
|
141 | +?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
|
101 | 142 | </ul> |
102 | 143 | </li> |
103 | 144 | <li class="dropdown"> |
@@ -105,8 +146,14 @@ discard block |
||
105 | 146 | <?php echo _("Route"); ?> <span class="caret"></span> |
106 | 147 | </a> |
107 | 148 | <ul class="dropdown-menu" role="menu"> |
108 | - <li><a href="<?php print $globalURL; ?>/statistics/route-airport<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Route by Airport"); ?></a></li> |
|
109 | - <li><a href="<?php print $globalURL; ?>/statistics/route-waypoint<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Route by Waypoint"); ?></a></li> |
|
149 | + <li><a href="<?php print $globalURL; ?>/statistics/route-airport<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
150 | + echo '/'.$airline_icao; |
|
151 | +} |
|
152 | +?>"><?php echo _("Route by Airport"); ?></a></li> |
|
153 | + <li><a href="<?php print $globalURL; ?>/statistics/route-waypoint<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
154 | + echo '/'.$airline_icao; |
|
155 | +} |
|
156 | +?>"><?php echo _("Route by Waypoint"); ?></a></li> |
|
110 | 157 | </ul> |
111 | 158 | </li> |
112 | 159 | <li class="dropdown"> |
@@ -114,8 +161,14 @@ discard block |
||
114 | 161 | <?php echo _("Date & Time"); ?> <span class="caret"></span> |
115 | 162 | </a> |
116 | 163 | <ul class="dropdown-menu" role="menu"> |
117 | - <li><a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Date"); ?></a></li> |
|
118 | - <li><a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>"><?php echo _("Time"); ?></a></li> |
|
164 | + <li><a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
165 | + echo '/'.$airline_icao; |
|
166 | +} |
|
167 | +?>"><?php echo _("Date"); ?></a></li> |
|
168 | + <li><a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
169 | + echo '/'.$airline_icao; |
|
170 | +} |
|
171 | +?>"><?php echo _("Time"); ?></a></li> |
|
119 | 172 | </ul> |
120 | 173 | </li> |
121 | 174 | <?php |
@@ -163,9 +216,18 @@ discard block |
||
163 | 216 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
164 | 217 | </a> |
165 | 218 | <ul class="dropdown-menu"> |
166 | - <li><a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Aircraft"); ?></a></li> |
|
167 | - <li><a href="<?php print $globalURL; ?>/statistics/registration<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Registration"); ?></a></li> |
|
168 | - <li><a href="<?php print $globalURL; ?>/statistics/manufacturer<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Manufacturer"); ?></a></li> |
|
219 | + <li><a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
220 | + echo '/'.$airline_icao; |
|
221 | +} |
|
222 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Aircraft"); ?></a></li> |
|
223 | + <li><a href="<?php print $globalURL; ?>/statistics/registration<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
224 | + echo '/'.$airline_icao; |
|
225 | +} |
|
226 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Registration"); ?></a></li> |
|
227 | + <li><a href="<?php print $globalURL; ?>/statistics/manufacturer<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
228 | + echo '/'.$airline_icao; |
|
229 | +} |
|
230 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Manufacturer"); ?></a></li> |
|
169 | 231 | <!-- <li><a href="<?php print $globalURL; ?>/statistics/country"><?php echo _("Country"); ?></a></li> --> |
170 | 232 | </ul> |
171 | 233 | </li> |
@@ -177,12 +239,21 @@ discard block |
||
177 | 239 | <?php |
178 | 240 | if (!isset($airline_icao) || $airline_icao == 'all') { |
179 | 241 | ?> |
180 | - <li><a href="<?php print $globalURL; ?>/statistics/airline<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Airline"); ?></a></li> |
|
181 | - <li><a href="<?php print $globalURL; ?>/statistics/airline-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Airline by Country"); ?></a></li> |
|
242 | + <li><a href="<?php print $globalURL; ?>/statistics/airline<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
243 | + echo '/'.$airline_icao; |
|
244 | +} |
|
245 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Airline"); ?></a></li> |
|
246 | + <li><a href="<?php print $globalURL; ?>/statistics/airline-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
247 | + echo '/'.$airline_icao; |
|
248 | +} |
|
249 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Airline by Country"); ?></a></li> |
|
182 | 250 | <?php |
183 | 251 | } |
184 | 252 | ?> |
185 | - <li><a href="<?php print $globalURL; ?>/statistics/callsign<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Callsign"); ?></a></li> |
|
253 | + <li><a href="<?php print $globalURL; ?>/statistics/callsign<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
254 | + echo '/'.$airline_icao; |
|
255 | +} |
|
256 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Callsign"); ?></a></li> |
|
186 | 257 | </ul> |
187 | 258 | </li> |
188 | 259 | <li class="dropdown"> |
@@ -190,10 +261,22 @@ discard block |
||
190 | 261 | <?php echo _("Airport"); ?> <span class="caret"></span> |
191 | 262 | </a> |
192 | 263 | <ul class="dropdown-menu" role="menu"> |
193 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-departure<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Departure Airport"); ?></a></li> |
|
194 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-departure-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Departure Airport by Country"); ?></a></li> |
|
195 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Arrival Airport"); ?></a></li> |
|
196 | - <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
|
264 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-departure<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
265 | + echo '/'.$airline_icao; |
|
266 | +} |
|
267 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Departure Airport"); ?></a></li> |
|
268 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-departure-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
269 | + echo '/'.$airline_icao; |
|
270 | +} |
|
271 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Departure Airport by Country"); ?></a></li> |
|
272 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
273 | + echo '/'.$airline_icao; |
|
274 | +} |
|
275 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Arrival Airport"); ?></a></li> |
|
276 | + <li><a href="<?php print $globalURL; ?>/statistics/airport-arrival-country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
277 | + echo '/'.$airline_icao; |
|
278 | +} |
|
279 | +?>/<?php echo $year.'/'.$month.'/'; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
|
197 | 280 | </ul> |
198 | 281 | </li> |
199 | 282 | <!-- |
@@ -52,7 +52,12 @@ |
||
52 | 52 | } else { |
53 | 53 | for (var i = 0; i < viewer.dataSources.get(dsn).entities.values.length; i++) { |
54 | 54 | var entity = viewer.dataSources.get(dsn).entities.values[i]; |
55 | - if (parseInt(entity.lastupdatesat) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
55 | + if (parseInt(entity.lastupdatesat) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
56 | + print $globalMapRefresh*2000; |
|
57 | +} else { |
|
58 | + print '60000'; |
|
59 | +} |
|
60 | +?>)) { |
|
56 | 61 | viewer.dataSources.get(dsn).entities.remove(entity); |
57 | 62 | } |
58 | 63 | } |
@@ -22,11 +22,15 @@ discard block |
||
22 | 22 | require_once('require/class.Spotter.php'); |
23 | 23 | } |
24 | 24 | |
25 | -if (!isset($filter_name)) $filter_name = ''; |
|
25 | +if (!isset($filter_name)) { |
|
26 | + $filter_name = ''; |
|
27 | +} |
|
26 | 28 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
27 | 29 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
28 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
29 | -} |
|
30 | + if (isset($globalFilter['airline'])) { |
|
31 | + $airline_icao = $globalFilter['airline'][0]; |
|
32 | + } |
|
33 | + } |
|
30 | 34 | if ($type == 'aircraft' && $airline_icao != '' && $airline_icao != 'all') { |
31 | 35 | $Spotter = new Spotter(); |
32 | 36 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
@@ -61,7 +65,12 @@ discard block |
||
61 | 65 | <script type="text/javascript" src="<?php echo $globalURL; ?>/js/datamaps.world.min.js"></script> |
62 | 66 | <div class="column"> |
63 | 67 | <div class="info"> |
64 | - <h1><?php if (isset($airline_name)) echo _("Statistics for ").$airline_name; else echo _("Statistics"); ?></h1> |
|
68 | + <h1><?php if (isset($airline_name)) { |
|
69 | + echo _("Statistics for ").$airline_name; |
|
70 | +} else { |
|
71 | + echo _("Statistics"); |
|
72 | +} |
|
73 | +?></h1> |
|
65 | 74 | <?php |
66 | 75 | if ($type == 'aircraft') { |
67 | 76 | $last_update = $Stats->getLastStatsUpdate(); |
@@ -69,7 +78,9 @@ discard block |
||
69 | 78 | if (isset($last_update[0]['value'])) { |
70 | 79 | date_default_timezone_set('UTC'); |
71 | 80 | $lastupdate = strtotime($last_update[0]['value']); |
72 | - if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
|
81 | + if (isset($globalTimezone) && $globalTimezone != '') { |
|
82 | + date_default_timezone_set($globalTimezone); |
|
83 | + } |
|
73 | 84 | print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
74 | 85 | } |
75 | 86 | } |
@@ -154,8 +165,11 @@ discard block |
||
154 | 165 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
155 | 166 | $aircraft_data = ''; |
156 | 167 | foreach($aircraft_array as $aircraft_item) { |
157 | - if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
158 | - else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
168 | + if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') { |
|
169 | + $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
170 | + } else { |
|
171 | + $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
172 | + } |
|
159 | 173 | } |
160 | 174 | $aircraft_data = substr($aircraft_data, 0, -1); |
161 | 175 | print 'var series = ['.$aircraft_data.'];'; |
@@ -172,11 +186,17 @@ discard block |
||
172 | 186 | <?php |
173 | 187 | if ($year != '' && $month != '') { |
174 | 188 | ?> |
175 | - <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
189 | + <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
190 | + echo '/'.$airline_icao; |
|
191 | +} |
|
192 | +?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
176 | 193 | <?php |
177 | 194 | } else { |
178 | 195 | ?> |
179 | - <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
196 | + <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
197 | + echo '/'.$airline_icao; |
|
198 | +} |
|
199 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
180 | 200 | <?php |
181 | 201 | } |
182 | 202 | ?> |
@@ -205,11 +225,15 @@ discard block |
||
205 | 225 | print '</script>'; |
206 | 226 | if ($year != '' && $month != '') { |
207 | 227 | print '<div class="more"><a href="'.$globalURL.'/statistics/airline'; |
208 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
228 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
229 | + echo '/'.$airline_icao; |
|
230 | + } |
|
209 | 231 | print '/'.$year.'/'.$month.'/" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
210 | 232 | } else { |
211 | 233 | print '<div class="more"><a href="'.$globalURL.'/statistics/airline'; |
212 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
234 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
235 | + echo '/'.$airline_icao; |
|
236 | + } |
|
213 | 237 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
214 | 238 | } |
215 | 239 | print '</div>'; |
@@ -229,8 +253,9 @@ discard block |
||
229 | 253 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
230 | 254 | <?php |
231 | 255 | $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
232 | - if (count($marine_array) == 0) print _("No data available"); |
|
233 | - else { |
|
256 | + if (count($marine_array) == 0) { |
|
257 | + print _("No data available"); |
|
258 | + } else { |
|
234 | 259 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
235 | 260 | $marine_data = ''; |
236 | 261 | foreach($marine_array as $marine_item) { |
@@ -274,8 +299,9 @@ discard block |
||
274 | 299 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
275 | 300 | <?php |
276 | 301 | $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
277 | - if (count($tracker_array) == 0) print _("No data available"); |
|
278 | - else { |
|
302 | + if (count($tracker_array) == 0) { |
|
303 | + print _("No data available"); |
|
304 | + } else { |
|
279 | 305 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
280 | 306 | $tracker_data = ''; |
281 | 307 | foreach($tracker_array as $tracker_item) { |
@@ -319,8 +345,9 @@ discard block |
||
319 | 345 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
320 | 346 | <?php |
321 | 347 | $owner_array = $Satellite->countAllOwners(true); |
322 | - if (count($owner_array) == 0) print _("No data available"); |
|
323 | - else { |
|
348 | + if (count($owner_array) == 0) { |
|
349 | + print _("No data available"); |
|
350 | + } else { |
|
324 | 351 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
325 | 352 | $owner_data = ''; |
326 | 353 | foreach($owner_array as $owner_item) { |
@@ -339,7 +366,10 @@ discard block |
||
339 | 366 | ?> |
340 | 367 | <!-- |
341 | 368 | <div class="more"> |
342 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
369 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
370 | + echo '/'.$airline_icao; |
|
371 | +} |
|
372 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
343 | 373 | </div> |
344 | 374 | --> |
345 | 375 | </div> |
@@ -348,8 +378,9 @@ discard block |
||
348 | 378 | <h2><?php echo _("Top 10 Most Common Countries Owners"); ?></h2> |
349 | 379 | <?php |
350 | 380 | $countries_array = $Satellite->countAllCountriesOwners(true); |
351 | - if (count($countries_array) == 0) print _("No data available"); |
|
352 | - else { |
|
381 | + if (count($countries_array) == 0) { |
|
382 | + print _("No data available"); |
|
383 | + } else { |
|
353 | 384 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
354 | 385 | $owner_data = ''; |
355 | 386 | foreach($countries_array as $owner_item) { |
@@ -368,7 +399,10 @@ discard block |
||
368 | 399 | ?> |
369 | 400 | <!-- |
370 | 401 | <div class="more"> |
371 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
402 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
403 | + echo '/'.$airline_icao; |
|
404 | +} |
|
405 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
372 | 406 | </div> |
373 | 407 | --> |
374 | 408 | </div> |
@@ -380,8 +414,9 @@ discard block |
||
380 | 414 | <h2><?php echo _("Top 10 Most Common Launch Sites"); ?></h2> |
381 | 415 | <?php |
382 | 416 | $launch_site_array = $Satellite->countAllLaunchSite(true); |
383 | - if (count($launch_site_array) == 0) print _("No data available"); |
|
384 | - else { |
|
417 | + if (count($launch_site_array) == 0) { |
|
418 | + print _("No data available"); |
|
419 | + } else { |
|
385 | 420 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
386 | 421 | $launch_site_data = ''; |
387 | 422 | foreach($launch_site_array as $launch_site_item) { |
@@ -400,7 +435,10 @@ discard block |
||
400 | 435 | ?> |
401 | 436 | <!-- |
402 | 437 | <div class="more"> |
403 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
438 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
439 | + echo '/'.$airline_icao; |
|
440 | +} |
|
441 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
404 | 442 | </div> |
405 | 443 | --> |
406 | 444 | </div> |
@@ -423,8 +461,9 @@ discard block |
||
423 | 461 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
424 | 462 | <?php |
425 | 463 | $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
426 | - if (count($pilot_array) == 0) print _("No data available"); |
|
427 | - else { |
|
464 | + if (count($pilot_array) == 0) { |
|
465 | + print _("No data available"); |
|
466 | + } else { |
|
428 | 467 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
429 | 468 | $pilot_data = ''; |
430 | 469 | foreach($pilot_array as $pilot_item) { |
@@ -442,7 +481,9 @@ discard block |
||
442 | 481 | } |
443 | 482 | print '<div class="more">'; |
444 | 483 | print '<a href="'.$globalURL.'/statistics/pilot'; |
445 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
484 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
485 | + echo '/'.$airline_icao; |
|
486 | + } |
|
446 | 487 | print'" class="btn btn-default btn" role="button">'._("See full statistic").'»</a>'; |
447 | 488 | print '</div>'; |
448 | 489 | ?> |
@@ -458,8 +499,9 @@ discard block |
||
458 | 499 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
459 | 500 | <?php |
460 | 501 | $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
461 | - if (count($owner_array) == 0) print _("No data available"); |
|
462 | - else { |
|
502 | + if (count($owner_array) == 0) { |
|
503 | + print _("No data available"); |
|
504 | + } else { |
|
463 | 505 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
464 | 506 | $owner_data = ''; |
465 | 507 | foreach($owner_array as $owner_item) { |
@@ -477,7 +519,10 @@ discard block |
||
477 | 519 | } |
478 | 520 | ?> |
479 | 521 | <div class="more"> |
480 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
522 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
523 | + echo '/'.$airline_icao; |
|
524 | +} |
|
525 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
481 | 526 | </div> |
482 | 527 | </div> |
483 | 528 | |
@@ -490,8 +535,9 @@ discard block |
||
490 | 535 | <h2><?php echo _("Top 20 Most Common Country a Flight was Over"); ?></h2> |
491 | 536 | <?php |
492 | 537 | //$flightover_array = $Stats->countAllFlightOverCountries(); |
493 | - if (count($flightover_array) == 0) print _("No data available"); |
|
494 | - else { |
|
538 | + if (count($flightover_array) == 0) { |
|
539 | + print _("No data available"); |
|
540 | + } else { |
|
495 | 541 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
496 | 542 | print 'var series = ['; |
497 | 543 | $flightover_data = ''; |
@@ -533,7 +579,10 @@ discard block |
||
533 | 579 | } |
534 | 580 | ?> |
535 | 581 | <div class="more"> |
536 | - <a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
582 | + <a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
583 | + echo '/'.$airline_icao; |
|
584 | +} |
|
585 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
537 | 586 | </div> |
538 | 587 | </div> |
539 | 588 | <?php |
@@ -551,8 +600,9 @@ discard block |
||
551 | 600 | <div class="col-md-6"> |
552 | 601 | <h2><?php echo _("Top 20 Most Common Country a Vessel was inside"); ?></h2> |
553 | 602 | <?php |
554 | - if (count($flightover_array) == 0) print _("No data available"); |
|
555 | - else { |
|
603 | + if (count($flightover_array) == 0) { |
|
604 | + print _("No data available"); |
|
605 | + } else { |
|
556 | 606 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
557 | 607 | print 'var series = ['; |
558 | 608 | $flightover_data = ''; |
@@ -608,8 +658,9 @@ discard block |
||
608 | 658 | <div class="col-md-6"> |
609 | 659 | <h2><?php echo _("Top 20 Most Common Country a Tracker was inside"); ?></h2> |
610 | 660 | <?php |
611 | - if (count($flightover_array) == 0) print _("No data available"); |
|
612 | - else { |
|
661 | + if (count($flightover_array) == 0) { |
|
662 | + print _("No data available"); |
|
663 | + } else { |
|
613 | 664 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
614 | 665 | print 'var series = ['; |
615 | 666 | $flightover_data = ''; |
@@ -715,7 +766,9 @@ discard block |
||
715 | 766 | });"; |
716 | 767 | print '</script>'; |
717 | 768 | print '<div class="more"><a href="'.$globalURL.'/statistics/airport-departure'; |
718 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
769 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
770 | + echo '/'.$airline_icao; |
|
771 | + } |
|
719 | 772 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
720 | 773 | } |
721 | 774 | ?> |
@@ -777,7 +830,9 @@ discard block |
||
777 | 830 | });"; |
778 | 831 | print '</script>'; |
779 | 832 | print '<div class="more"><a href="'.$globalURL.'/statistics/airport-arrival'; |
780 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
833 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
834 | + echo '/'.$airline_icao; |
|
835 | + } |
|
781 | 836 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
782 | 837 | } |
783 | 838 | ?> |
@@ -796,8 +851,9 @@ discard block |
||
796 | 851 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
797 | 852 | <?php |
798 | 853 | $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
799 | - if (count($year_array) == 0) print _("No data available"); |
|
800 | - else { |
|
854 | + if (count($year_array) == 0) { |
|
855 | + print _("No data available"); |
|
856 | + } else { |
|
801 | 857 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
802 | 858 | $year_data = ''; |
803 | 859 | $year_cnt = ''; |
@@ -816,7 +872,10 @@ discard block |
||
816 | 872 | } |
817 | 873 | ?> |
818 | 874 | <div class="more"> |
819 | - <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
875 | + <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
876 | + echo '/'.$airline_icao; |
|
877 | +} |
|
878 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
820 | 879 | </div> |
821 | 880 | </div> |
822 | 881 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -824,8 +883,9 @@ discard block |
||
824 | 883 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
825 | 884 | <?php |
826 | 885 | $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
827 | - if (count($month_array) == 0) print _("No data available"); |
|
828 | - else { |
|
886 | + if (count($month_array) == 0) { |
|
887 | + print _("No data available"); |
|
888 | + } else { |
|
829 | 889 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
830 | 890 | $month_data = ''; |
831 | 891 | $month_cnt = ''; |
@@ -844,7 +904,10 @@ discard block |
||
844 | 904 | } |
845 | 905 | ?> |
846 | 906 | <div class="more"> |
847 | - <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
907 | + <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
908 | + echo '/'.$airline_icao; |
|
909 | +} |
|
910 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
848 | 911 | </div> |
849 | 912 | </div> |
850 | 913 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -853,8 +916,9 @@ discard block |
||
853 | 916 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
854 | 917 | <?php |
855 | 918 | $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
856 | - if (empty($date_array)) print _("No data available"); |
|
857 | - else { |
|
919 | + if (empty($date_array)) { |
|
920 | + print _("No data available"); |
|
921 | + } else { |
|
858 | 922 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
859 | 923 | $date_data = ''; |
860 | 924 | $date_cnt = ''; |
@@ -873,7 +937,10 @@ discard block |
||
873 | 937 | } |
874 | 938 | ?> |
875 | 939 | <div class="more"> |
876 | - <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
940 | + <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
941 | + echo '/'.$airline_icao; |
|
942 | +} |
|
943 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
877 | 944 | </div> |
878 | 945 | </div> |
879 | 946 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -881,8 +948,9 @@ discard block |
||
881 | 948 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
882 | 949 | <?php |
883 | 950 | $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
884 | - if (empty($hour_array)) print _("No data available"); |
|
885 | - else { |
|
951 | + if (empty($hour_array)) { |
|
952 | + print _("No data available"); |
|
953 | + } else { |
|
886 | 954 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
887 | 955 | $hour_data = ''; |
888 | 956 | $hour_cnt = ''; |
@@ -901,7 +969,10 @@ discard block |
||
901 | 969 | } |
902 | 970 | ?> |
903 | 971 | <div class="more"> |
904 | - <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
972 | + <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
973 | + echo '/'.$airline_icao; |
|
974 | +} |
|
975 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
905 | 976 | </div> |
906 | 977 | </div> |
907 | 978 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -921,8 +992,9 @@ discard block |
||
921 | 992 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
922 | 993 | <?php |
923 | 994 | $year_array = $Marine->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
924 | - if (count($year_array) == 0) print _("No data available"); |
|
925 | - else { |
|
995 | + if (count($year_array) == 0) { |
|
996 | + print _("No data available"); |
|
997 | + } else { |
|
926 | 998 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
927 | 999 | $year_data = ''; |
928 | 1000 | $year_cnt = ''; |
@@ -950,8 +1022,9 @@ discard block |
||
950 | 1022 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
951 | 1023 | <?php |
952 | 1024 | $month_array = $Marine->countAllDatesLastMonth($airline_icao,$filter_name); |
953 | - if (count($month_array) == 0) print _("No data available"); |
|
954 | - else { |
|
1025 | + if (count($month_array) == 0) { |
|
1026 | + print _("No data available"); |
|
1027 | + } else { |
|
955 | 1028 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
956 | 1029 | $month_data = ''; |
957 | 1030 | $month_cnt = ''; |
@@ -979,8 +1052,9 @@ discard block |
||
979 | 1052 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
980 | 1053 | <?php |
981 | 1054 | $date_array = $Marine->countAllDatesLast7Days($airline_icao,$filter_name); |
982 | - if (empty($date_array)) print _("No data available"); |
|
983 | - else { |
|
1055 | + if (empty($date_array)) { |
|
1056 | + print _("No data available"); |
|
1057 | + } else { |
|
984 | 1058 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
985 | 1059 | $date_data = ''; |
986 | 1060 | $date_cnt = ''; |
@@ -1007,8 +1081,9 @@ discard block |
||
1007 | 1081 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1008 | 1082 | <?php |
1009 | 1083 | $hour_array = $Marine->countAllHours('hour',true,$airline_icao,$filter_name); |
1010 | - if (empty($hour_array)) print _("No data available"); |
|
1011 | - else { |
|
1084 | + if (empty($hour_array)) { |
|
1085 | + print _("No data available"); |
|
1086 | + } else { |
|
1012 | 1087 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1013 | 1088 | $hour_data = ''; |
1014 | 1089 | $hour_cnt = ''; |
@@ -1047,8 +1122,9 @@ discard block |
||
1047 | 1122 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
1048 | 1123 | <?php |
1049 | 1124 | $year_array = $Tracker->countAllMonthsLastYear(true); |
1050 | - if (count($year_array) == 0) print _("No data available"); |
|
1051 | - else { |
|
1125 | + if (count($year_array) == 0) { |
|
1126 | + print _("No data available"); |
|
1127 | + } else { |
|
1052 | 1128 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
1053 | 1129 | $year_data = ''; |
1054 | 1130 | $year_cnt = ''; |
@@ -1076,8 +1152,9 @@ discard block |
||
1076 | 1152 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
1077 | 1153 | <?php |
1078 | 1154 | $month_array = $Tracker->countAllDatesLastMonth(); |
1079 | - if (count($month_array) == 0) print _("No data available"); |
|
1080 | - else { |
|
1155 | + if (count($month_array) == 0) { |
|
1156 | + print _("No data available"); |
|
1157 | + } else { |
|
1081 | 1158 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
1082 | 1159 | $month_data = ''; |
1083 | 1160 | $month_cnt = ''; |
@@ -1105,8 +1182,9 @@ discard block |
||
1105 | 1182 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
1106 | 1183 | <?php |
1107 | 1184 | $date_array = $Tracker->countAllDatesLast7Days(); |
1108 | - if (empty($date_array)) print _("No data available"); |
|
1109 | - else { |
|
1185 | + if (empty($date_array)) { |
|
1186 | + print _("No data available"); |
|
1187 | + } else { |
|
1110 | 1188 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
1111 | 1189 | $date_data = ''; |
1112 | 1190 | $date_cnt = ''; |
@@ -1133,8 +1211,9 @@ discard block |
||
1133 | 1211 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1134 | 1212 | <?php |
1135 | 1213 | $hour_array = $Tracker->countAllHours('hour',true); |
1136 | - if (empty($hour_array)) print _("No data available"); |
|
1137 | - else { |
|
1214 | + if (empty($hour_array)) { |
|
1215 | + print _("No data available"); |
|
1216 | + } else { |
|
1138 | 1217 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1139 | 1218 | $hour_data = ''; |
1140 | 1219 | $hour_cnt = ''; |
@@ -1173,8 +1252,9 @@ discard block |
||
1173 | 1252 | <h2><?php echo _("Busiest Launch Months of the last 12 Months"); ?></h2> |
1174 | 1253 | <?php |
1175 | 1254 | $year_array = $Satellite->countAllMonthsLastYear(); |
1176 | - if (count($year_array) == 0) print _("No data available"); |
|
1177 | - else { |
|
1255 | + if (count($year_array) == 0) { |
|
1256 | + print _("No data available"); |
|
1257 | + } else { |
|
1178 | 1258 | print '<div id="chart21" class="chart" width="100%"></div><script>'; |
1179 | 1259 | $year_data = ''; |
1180 | 1260 | $year_cnt = ''; |
@@ -1204,8 +1284,9 @@ discard block |
||
1204 | 1284 | <h2><?php echo _("Busiest Launch Years of the last 10 Years"); ?></h2> |
1205 | 1285 | <?php |
1206 | 1286 | $year_array = $Satellite->countAllYears(); |
1207 | - if (count($year_array) == 0) print _("No data available"); |
|
1208 | - else { |
|
1287 | + if (count($year_array) == 0) { |
|
1288 | + print _("No data available"); |
|
1289 | + } else { |
|
1209 | 1290 | print '<div id="chart22" class="chart" width="100%"></div><script>'; |
1210 | 1291 | $year_data = ''; |
1211 | 1292 | $year_cnt = ''; |
@@ -1247,8 +1328,9 @@ discard block |
||
1247 | 1328 | <h2><?php echo _("Fatalities by Years"); ?></h2> |
1248 | 1329 | <?php |
1249 | 1330 | $year_array = $Stats->countFatalitiesByYear(); |
1250 | - if (count($year_array) == 0) print _("No data available"); |
|
1251 | - else { |
|
1331 | + if (count($year_array) == 0) { |
|
1332 | + print _("No data available"); |
|
1333 | + } else { |
|
1252 | 1334 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
1253 | 1335 | $year_data = ''; |
1254 | 1336 | $year_cnt = ''; |
@@ -1277,8 +1359,9 @@ discard block |
||
1277 | 1359 | <h2><?php echo _("Fatalities last 12 Months"); ?></h2> |
1278 | 1360 | <?php |
1279 | 1361 | $year_array = $Stats->countFatalitiesLast12Months(); |
1280 | - if (count($year_array) == 0) print _("No data available"); |
|
1281 | - else { |
|
1362 | + if (count($year_array) == 0) { |
|
1363 | + print _("No data available"); |
|
1364 | + } else { |
|
1282 | 1365 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
1283 | 1366 | $year_data = ''; |
1284 | 1367 | $year_cnt = ''; |
@@ -1349,8 +1432,11 @@ discard block |
||
1349 | 1432 | $distance = $distance; |
1350 | 1433 | $unit = 'km'; |
1351 | 1434 | } |
1352 | - if (!isset($polar_data)) $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1353 | - else $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1435 | + if (!isset($polar_data)) { |
|
1436 | + $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1437 | + } else { |
|
1438 | + $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1439 | + } |
|
1354 | 1440 | } |
1355 | 1441 | ?> |
1356 | 1442 | <div class="col-md-6"> |
@@ -1414,9 +1500,12 @@ discard block |
||
1414 | 1500 | foreach ($msg as $eachmsg) { |
1415 | 1501 | //$eachmsg = $msg[0]; |
1416 | 1502 | $data = $eachmsg['source_data']; |
1417 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
1418 | - else $max = 500; |
|
1419 | -?> |
|
1503 | + if ($data > 500) { |
|
1504 | + $max = (round(($data+100)/100))*100; |
|
1505 | + } else { |
|
1506 | + $max = 500; |
|
1507 | + } |
|
1508 | + ?> |
|
1420 | 1509 | <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
1421 | 1510 | <script> |
1422 | 1511 | var g = new JustGage({ |