@@ -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) |
@@ -31,7 +31,9 @@ discard block |
||
| 31 | 31 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
| 32 | 32 | |
| 33 | 33 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 34 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 34 | + if (empty($aircraft_types)) { |
|
| 35 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 36 | + } |
|
| 35 | 37 | foreach($aircraft_types as $aircraft_item) |
| 36 | 38 | { |
| 37 | 39 | $output .= '<url>'; |
@@ -81,7 +83,9 @@ discard block |
||
| 81 | 83 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
| 82 | 84 | |
| 83 | 85 | $airport_names = $Stats->getAllAirportNames(); |
| 84 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
| 86 | + if (empty($airport_names)) { |
|
| 87 | + $airport_names = $Spotter->getAllAirportNames(); |
|
| 88 | + } |
|
| 85 | 89 | foreach($airport_names as $airport_item) |
| 86 | 90 | { |
| 87 | 91 | $output .= '<url>'; |
@@ -98,7 +102,9 @@ discard block |
||
| 98 | 102 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
| 99 | 103 | |
| 100 | 104 | $manufacturer_names = $Stats->getAllManufacturers(); |
| 101 | - if (empty($manufacturer_names)) $manufacturer_names = $Spotter->getAllManufacturers(); |
|
| 105 | + if (empty($manufacturer_names)) { |
|
| 106 | + $manufacturer_names = $Spotter->getAllManufacturers(); |
|
| 107 | + } |
|
| 102 | 108 | foreach($manufacturer_names as $manufacturer_item) |
| 103 | 109 | { |
| 104 | 110 | $output .= '<url>'; |
@@ -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 | <!-- |
@@ -257,7 +257,12 @@ discard block |
||
| 257 | 257 | // viewer.dataSources.get(dsn).entities.remove(entity); |
| 258 | 258 | // } |
| 259 | 259 | //console.log(entity.lastupdate); |
| 260 | - if (parseInt(entity.lastupdate) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
| 260 | + if (parseInt(entity.lastupdate) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
| 261 | + print $globalMapRefresh*2000; |
|
| 262 | +} else { |
|
| 263 | + print '60000'; |
|
| 264 | +} |
|
| 265 | +?>)) { |
|
| 261 | 266 | // console.log('Remove an entity date'); |
| 262 | 267 | viewer.dataSources.get(dsn).entities.remove(entity); |
| 263 | 268 | } else { |
@@ -544,7 +549,12 @@ discard block |
||
| 544 | 549 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
| 545 | 550 | ?> |
| 546 | 551 | update_polarLayer(); |
| 547 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 552 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 553 | + print $globalMapRefresh*1000*2; |
|
| 554 | +} else { |
|
| 555 | + print '60000'; |
|
| 556 | +} |
|
| 557 | +?>); |
|
| 548 | 558 | <?php |
| 549 | 559 | } |
| 550 | 560 | ?> |
@@ -642,7 +652,12 @@ discard block |
||
| 642 | 652 | } |
| 643 | 653 | } |
| 644 | 654 | } |
| 645 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 655 | + ,<?php if (isset($globalMapRefresh)) { |
|
| 656 | + print $globalMapRefresh*1000; |
|
| 657 | +} else { |
|
| 658 | + print '30000'; |
|
| 659 | +} |
|
| 660 | +?>); |
|
| 646 | 661 | } else { |
| 647 | 662 | //var widget = new Cesium.CesiumWidget('archivebox'); |
| 648 | 663 | // var timeline = new Cesium.Timeline(viewer); |
@@ -661,7 +676,12 @@ discard block |
||
| 661 | 676 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
| 662 | 677 | ?> |
| 663 | 678 | update_atcLayer(); |
| 664 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 679 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 680 | + print $globalMapRefresh*1000*2; |
|
| 681 | +} else { |
|
| 682 | + print '60000'; |
|
| 683 | +} |
|
| 684 | +?>); |
|
| 665 | 685 | <?php |
| 666 | 686 | } |
| 667 | 687 | ?> |
@@ -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 | } |