@@ -46,8 +46,10 @@ discard block |
||
46 | 46 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
47 | 47 | $sql_date = $end_date; |
48 | 48 | } |
49 | - } else $sql_date = ''; |
|
50 | -} |
|
49 | + } else { |
|
50 | + $sql_date = ''; |
|
51 | + } |
|
52 | + } |
|
51 | 53 | |
52 | 54 | if (isset($_GET['highest_altitude'])) { |
53 | 55 | //for altitude manipulation |
@@ -61,8 +63,12 @@ discard block |
||
61 | 63 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
62 | 64 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
63 | 65 | $sql_altitude = $start_altitude; |
64 | - } else $sql_altitude = ''; |
|
65 | -} else $sql_altitude = ''; |
|
66 | + } else { |
|
67 | + $sql_altitude = ''; |
|
68 | + } |
|
69 | + } else { |
|
70 | + $sql_altitude = ''; |
|
71 | +} |
|
66 | 72 | |
67 | 73 | //calculuation for the pagination |
68 | 74 | if(!isset($_GET['limit'])) |
@@ -80,7 +86,7 @@ discard block |
||
80 | 86 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
81 | 87 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
82 | 88 | } |
83 | -} else { |
|
89 | +} else { |
|
84 | 90 | $limit_explode = explode(",", $_GET['limit']); |
85 | 91 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
86 | 92 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -138,10 +144,15 @@ discard block |
||
138 | 144 | $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
139 | 145 | $number_results = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
140 | 146 | if ($dist != '') { |
141 | - if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
|
142 | - elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
|
147 | + if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') { |
|
148 | + $dist = $dist*1.60934; |
|
149 | + } elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') { |
|
150 | + $dist = $dist*1.852; |
|
151 | + } |
|
152 | + } |
|
153 | + if (!isset($sql_date)) { |
|
154 | + $sql_date = ''; |
|
143 | 155 | } |
144 | - if (!isset($sql_date)) $sql_date = ''; |
|
145 | 156 | if ($archive == 1) { |
146 | 157 | if ($type == 'aircraft') { |
147 | 158 | $SpotterArchive = new SpotterArchive(); |
@@ -219,7 +230,10 @@ discard block |
||
219 | 230 | if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
220 | 231 | if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
221 | 232 | if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$registration.'</span> '; } |
222 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
233 | + if (isset($_GET['highlights'])) { |
|
234 | + if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; |
|
235 | + } |
|
236 | + } |
|
223 | 237 | if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$airline.'</span> '; } |
224 | 238 | if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
225 | 239 | if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
@@ -355,7 +369,10 @@ discard block |
||
355 | 369 | <div class="form-group"> |
356 | 370 | <label class="control-label col-sm-2"><?php echo _("Keywords"); ?></label> |
357 | 371 | <div class="col-sm-10"> |
358 | - <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) print $q; ?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
372 | + <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) { |
|
373 | + print $q; |
|
374 | +} |
|
375 | +?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
359 | 376 | </div> |
360 | 377 | </div> |
361 | 378 | </fieldset> |
@@ -374,7 +391,10 @@ discard block |
||
374 | 391 | </select> |
375 | 392 | </div> |
376 | 393 | </div> |
377 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
394 | + <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) { |
|
395 | + print $manufacturer; |
|
396 | +} |
|
397 | +?>')</script> |
|
378 | 398 | <div class="form-group"> |
379 | 399 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
380 | 400 | <div class="col-sm-10"> |
@@ -383,11 +403,17 @@ discard block |
||
383 | 403 | </select> |
384 | 404 | </div> |
385 | 405 | </div> |
386 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
406 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) { |
|
407 | + print $aircraft_icao; |
|
408 | +} |
|
409 | +?>');</script> |
|
387 | 410 | <div class="form-group"> |
388 | 411 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
389 | 412 | <div class="col-sm-10"> |
390 | - <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) print $registration; ?>" size="8" placeholder="<?php echo _("Registration"); ?>" /> |
|
413 | + <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) { |
|
414 | + print $registration; |
|
415 | +} |
|
416 | +?>" size="8" placeholder="<?php echo _("Registration"); ?>" /> |
|
391 | 417 | </div> |
392 | 418 | </div> |
393 | 419 | <?php |
@@ -396,22 +422,31 @@ discard block |
||
396 | 422 | <div class="form-group"> |
397 | 423 | <label class="control-label col-sm-2"><?php echo _("Pilot id"); ?></label> |
398 | 424 | <div class="col-sm-10"> |
399 | - <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"); ?>" /> |
|
425 | + <input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) { |
|
426 | + print $pilot_id; |
|
427 | +} |
|
428 | +?>" size="15" placeholder="<?php echo _("Pilot id"); ?>" /> |
|
400 | 429 | </div> |
401 | 430 | </div> |
402 | 431 | <div class="form-group"> |
403 | 432 | <label class="control-label col-sm-2"><?php echo _("Pilot name"); ?></label> |
404 | 433 | <div class="col-sm-10"> |
405 | - <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"); ?>" /> |
|
434 | + <input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) { |
|
435 | + print $pilot_name; |
|
436 | +} |
|
437 | +?>" size="15" placeholder="<?php echo _("Pilot name"); ?>" /> |
|
406 | 438 | </div> |
407 | 439 | </div> |
408 | 440 | <?php |
409 | - }else { |
|
441 | + } else { |
|
410 | 442 | ?> |
411 | 443 | <div class="form-group"> |
412 | 444 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
413 | 445 | <div class="col-sm-10"> |
414 | - <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) print $owner; ?>" size="15" placeholder="<?php echo _("Owner name"); ?>" /> |
|
446 | + <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) { |
|
447 | + print $owner; |
|
448 | +} |
|
449 | +?>" size="15" placeholder="<?php echo _("Owner name"); ?>" /> |
|
415 | 450 | </div> |
416 | 451 | </div> |
417 | 452 | <?php |
@@ -419,8 +454,14 @@ discard block |
||
419 | 454 | ?> |
420 | 455 | <div class="form-group"> |
421 | 456 | <div class="col-sm-offset-2 col-sm-10"> |
422 | - <!--<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 aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
423 | - <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 aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
457 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
458 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
459 | +} |
|
460 | +} ?>> <label for="highlights"><?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
461 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
462 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
463 | +} |
|
464 | +} ?>> <?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
424 | 465 | </div> |
425 | 466 | </div> |
426 | 467 | </fieldset> |
@@ -434,7 +475,10 @@ discard block |
||
434 | 475 | </select> |
435 | 476 | </div> |
436 | 477 | </div> |
437 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $airline; ?>');</script> |
|
478 | + <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) { |
|
479 | + print $airline; |
|
480 | +} |
|
481 | +?>');</script> |
|
438 | 482 | <div class="form-group"> |
439 | 483 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
440 | 484 | <div class="col-sm-10"> |
@@ -443,19 +487,34 @@ discard block |
||
443 | 487 | </select> |
444 | 488 | </div> |
445 | 489 | </div> |
446 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
490 | + <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) { |
|
491 | + print $airline_country; |
|
492 | +} |
|
493 | +?>');</script> |
|
447 | 494 | <div class="form-group"> |
448 | 495 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
449 | 496 | <div class="col-sm-10"> |
450 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
497 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
498 | + print $callsign; |
|
499 | +} |
|
500 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
451 | 501 | </div> |
452 | 502 | </div> |
453 | 503 | <div class="form-group"> |
454 | 504 | <div class="col-sm-offset-2 col-sm-10"> |
455 | 505 | <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> |
456 | - <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> |
|
457 | - <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> |
|
458 | - <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> |
|
506 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) { |
|
507 | + if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; |
|
508 | +} |
|
509 | +} ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
510 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) { |
|
511 | + if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; |
|
512 | +} |
|
513 | +} ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
514 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) { |
|
515 | + if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; |
|
516 | +} |
|
517 | +} ?>> <?php echo _("Only Military airlines"); ?></label> |
|
459 | 518 | </div> |
460 | 519 | </div> |
461 | 520 | </fieldset> |
@@ -469,7 +528,10 @@ discard block |
||
469 | 528 | </select> |
470 | 529 | </div> |
471 | 530 | </div> |
472 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
531 | + <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) { |
|
532 | + print $airport_icao; |
|
533 | +} |
|
534 | +?>');</script> |
|
473 | 535 | <div class="form-group"> |
474 | 536 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
475 | 537 | <div class="col-sm-10"> |
@@ -478,7 +540,10 @@ discard block |
||
478 | 540 | </select> |
479 | 541 | </div> |
480 | 542 | </div> |
481 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
543 | + <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) { |
|
544 | + print $airport_country; |
|
545 | +} |
|
546 | +?>');</script> |
|
482 | 547 | </fieldset> |
483 | 548 | <fieldset> |
484 | 549 | <legend><?php echo _("Route"); ?></legend> |
@@ -490,7 +555,10 @@ discard block |
||
490 | 555 | </select> |
491 | 556 | </div> |
492 | 557 | </div> |
493 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
558 | + <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) { |
|
559 | + print $departure_airport_route; |
|
560 | +} |
|
561 | +?>');</script> |
|
494 | 562 | <div class="form-group"> |
495 | 563 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
496 | 564 | <div class="col-sm-10"> |
@@ -499,7 +567,10 @@ discard block |
||
499 | 567 | </select> |
500 | 568 | </div> |
501 | 569 | </div> |
502 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
570 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) { |
|
571 | + print $arrival_airport_route; |
|
572 | +} |
|
573 | +?>');</script> |
|
503 | 574 | </fieldset> |
504 | 575 | <fieldset> |
505 | 576 | <legend>Altitude</legend> |
@@ -549,19 +620,33 @@ discard block |
||
549 | 620 | <div class="form-group"> |
550 | 621 | <label class="control-label col-sm-2"><?php echo _("Latitude"); ?></label> |
551 | 622 | <div class="col-sm-10"> |
552 | - <input type="text" name="origlat" class="form-control" placeholder="<?php echo _("Center point latitude"); ?>" value="<?php if (isset($_GET['origlat'])) print $origlat; ?>" /> |
|
623 | + <input type="text" name="origlat" class="form-control" placeholder="<?php echo _("Center point latitude"); ?>" value="<?php if (isset($_GET['origlat'])) { |
|
624 | + print $origlat; |
|
625 | +} |
|
626 | +?>" /> |
|
553 | 627 | </div> |
554 | 628 | </div> |
555 | 629 | <div class="form-group"> |
556 | 630 | <label class="control-label col-sm-2"><?php echo _("Longitude"); ?></label> |
557 | 631 | <div class="col-sm-10"> |
558 | - <input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" value="<?php if (isset($_GET['origlon'])) print $origlon; ?>" /> |
|
632 | + <input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" value="<?php if (isset($_GET['origlon'])) { |
|
633 | + print $origlon; |
|
634 | +} |
|
635 | +?>" /> |
|
559 | 636 | </div> |
560 | 637 | </div> |
561 | 638 | <div class="form-group"> |
562 | - <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) print $globalDistanceUnit; else print 'km'; print ')'; ?></label> |
|
639 | + <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) { |
|
640 | + print $globalDistanceUnit; |
|
641 | +} else { |
|
642 | + print 'km'; |
|
643 | +} |
|
644 | +print ')'; ?></label> |
|
563 | 645 | <div class="col-sm-10"> |
564 | - <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" value="<?php if (isset($_GET['distance'])) print $distance; ?>" /> |
|
646 | + <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" value="<?php if (isset($_GET['distance'])) { |
|
647 | + print $distance; |
|
648 | +} |
|
649 | +?>" /> |
|
565 | 650 | </div> |
566 | 651 | </div> |
567 | 652 | </fieldset> |
@@ -572,7 +657,10 @@ discard block |
||
572 | 657 | <div class="form-group"> |
573 | 658 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
574 | 659 | <div class="col-sm-10"> |
575 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
660 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
661 | + print $callsign; |
|
662 | +} |
|
663 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
576 | 664 | </div> |
577 | 665 | </div> |
578 | 666 | </fieldset> |
@@ -583,7 +671,10 @@ discard block |
||
583 | 671 | <div class="form-group"> |
584 | 672 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
585 | 673 | <div class="col-sm-10"> |
586 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
674 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
675 | + print $callsign; |
|
676 | +} |
|
677 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
587 | 678 | </div> |
588 | 679 | </div> |
589 | 680 | </fieldset> |
@@ -591,7 +682,10 @@ discard block |
||
591 | 682 | <div class="form-group"> |
592 | 683 | <label class="control-label col-sm-2"><?php echo _("MMSI"); ?></label> |
593 | 684 | <div class="col-sm-10"> |
594 | - <input type="text" name="mmsi" class="form-control" value="<?php if (isset($_GET['mmsi'])) print $mmsi; ?>" size="8" placeholder="<?php echo _("MMSI"); ?>" /> |
|
685 | + <input type="text" name="mmsi" class="form-control" value="<?php if (isset($_GET['mmsi'])) { |
|
686 | + print $mmsi; |
|
687 | +} |
|
688 | +?>" size="8" placeholder="<?php echo _("MMSI"); ?>" /> |
|
595 | 689 | </div> |
596 | 690 | </div> |
597 | 691 | </fieldset> |
@@ -599,7 +693,10 @@ discard block |
||
599 | 693 | <div class="form-group"> |
600 | 694 | <label class="control-label col-sm-2"><?php echo _("IMO"); ?></label> |
601 | 695 | <div class="col-sm-10"> |
602 | - <input type="text" name="imo" class="form-control" value="<?php if (isset($_GET['imo'])) print $imo; ?>" size="8" placeholder="<?php echo _("IMO"); ?>" /> |
|
696 | + <input type="text" name="imo" class="form-control" value="<?php if (isset($_GET['imo'])) { |
|
697 | + print $imo; |
|
698 | +} |
|
699 | +?>" size="8" placeholder="<?php echo _("IMO"); ?>" /> |
|
603 | 700 | </div> |
604 | 701 | </div> |
605 | 702 | </fieldset> |
@@ -612,7 +709,10 @@ discard block |
||
612 | 709 | <label class="control-label col-sm-2"><?php echo _("Start Date"); ?></label> |
613 | 710 | <div class="col-sm-10"> |
614 | 711 | <div class='input-group date' id='datetimepicker1'> |
615 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date']) && $_GET['start_date'] != '') print $start_date; ?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
712 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date']) && $_GET['start_date'] != '') { |
|
713 | + print $start_date; |
|
714 | +} |
|
715 | +?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
616 | 716 | <span class="input-group-addon"> |
617 | 717 | <span class="glyphicon glyphicon-calendar"></span> |
618 | 718 | </span> |
@@ -623,7 +723,10 @@ discard block |
||
623 | 723 | <label class="control-label col-sm-2"><?php echo _("End Date"); ?></label> |
624 | 724 | <div class="col-sm-10"> |
625 | 725 | <div class='input-group date' id='datetimepicker2'> |
626 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date']) && $_GET['end_date'] != '') print $end_date; ?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
726 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date']) && $_GET['end_date'] != '') { |
|
727 | + print $end_date; |
|
728 | +} |
|
729 | +?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
627 | 730 | <span class="input-group-addon"> |
628 | 731 | <span class="glyphicon glyphicon-calendar"></span> |
629 | 732 | </span> |
@@ -37,8 +37,12 @@ discard block |
||
37 | 37 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
38 | 38 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
39 | 39 | $filter = array(); |
40 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
41 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
40 | + if ($year != '') { |
|
41 | + $filter = array_merge($filter,array('year' => $year)); |
|
42 | + } |
|
43 | + if ($month != '') { |
|
44 | + $filter = array_merge($filter,array('month' => $month)); |
|
45 | + } |
|
42 | 46 | if ($sort != '') |
43 | 47 | { |
44 | 48 | $spotter_array = $Spotter->getSpotterDataByPilot($pilot,$limit_start.",".$absolute_difference, $sort,$filter); |
@@ -56,8 +60,12 @@ discard block |
||
56 | 60 | { |
57 | 61 | $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['pilot_name']); |
58 | 62 | $ident = $spotter_array[0]['ident']; |
59 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
|
60 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
|
63 | + if (isset($spotter_array[0]['latitude'])) { |
|
64 | + $latitude = $spotter_array[0]['latitude']; |
|
65 | + } |
|
66 | + if (isset($spotter_array[0]['longitude'])) { |
|
67 | + $longitude = $spotter_array[0]['longitude']; |
|
68 | + } |
|
61 | 69 | require_once('header.php'); |
62 | 70 | /* |
63 | 71 | if (isset($globalArchive) && $globalArchive) { |
@@ -110,12 +118,18 @@ discard block |
||
110 | 118 | */ |
111 | 119 | print '<div class="info column">'; |
112 | 120 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
113 | - if (isset($spotter_array[0]['pilot_id']) && $spotter_array[0]['pilot_id'] != '') print '<div><span class="label">'._("Pilot ID").'</span>'.$spotter_array[0]['pilot_id'].'</div>'; |
|
121 | + if (isset($spotter_array[0]['pilot_id']) && $spotter_array[0]['pilot_id'] != '') { |
|
122 | + print '<div><span class="label">'._("Pilot ID").'</span>'.$spotter_array[0]['pilot_id'].'</div>'; |
|
123 | + } |
|
114 | 124 | if ($year == '' && $month == '') { |
115 | 125 | $Stats = new Stats(); |
116 | 126 | $flights = $Stats->getStatsPilot($pilot); |
117 | - } else $flights = 0; |
|
118 | - if ($flights == 0) $flights = $Spotter->countFlightsByPilot($pilot,$filter); |
|
127 | + } else { |
|
128 | + $flights = 0; |
|
129 | + } |
|
130 | + if ($flights == 0) { |
|
131 | + $flights = $Spotter->countFlightsByPilot($pilot,$filter); |
|
132 | + } |
|
119 | 133 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
120 | 134 | $aircraft_type = count($Spotter->countAllAircraftTypesByPilot($pilot,$filter)); |
121 | 135 | print '<div><span class="label">'._("Aircraft type").'</span>'.$aircraft_type.'</div>'; |
@@ -126,7 +140,9 @@ discard block |
||
126 | 140 | $airlines = count($Spotter->countAllAirlinesByPilot($pilot,$filter)); |
127 | 141 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
128 | 142 | $duration = $Spotter->getFlightDurationByPilot($pilot,$filter); |
129 | - if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
143 | + if ($duration != '0') { |
|
144 | + print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
145 | + } |
|
130 | 146 | print '</div>'; |
131 | 147 | |
132 | 148 | include('pilot-sub-menu.php'); |
@@ -6,12 +6,19 @@ discard block |
||
6 | 6 | //gets the page file and stores it in a variable |
7 | 7 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
8 | 8 | $current_page = $file_path['filename']; |
9 | -if ($globalTimezone == '') $globalTimezone = 'UTC'; |
|
9 | +if ($globalTimezone == '') { |
|
10 | + $globalTimezone = 'UTC'; |
|
11 | +} |
|
10 | 12 | date_default_timezone_set($globalTimezone); |
11 | -if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
|
12 | -else $MapType = $globalMapProvider; |
|
13 | +if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') { |
|
14 | + $MapType = $_COOKIE['MapType']; |
|
15 | +} else { |
|
16 | + $MapType = $globalMapProvider; |
|
17 | +} |
|
13 | 18 | |
14 | -if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline'; |
|
19 | +if (isset($globalMapOffline) && $globalMapOffline) { |
|
20 | + $MapType = 'offline'; |
|
21 | +} |
|
15 | 22 | |
16 | 23 | if (isset($_GET['3d'])) { |
17 | 24 | setcookie('MapFormat','3d'); |
@@ -219,7 +226,10 @@ discard block |
||
219 | 226 | <?php |
220 | 227 | // } |
221 | 228 | ?> |
222 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) print '&tsk='.$tsk; ?>"></script> |
|
229 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) { |
|
230 | + print '&tsk='.$tsk; |
|
231 | +} |
|
232 | +?>"></script> |
|
223 | 233 | <?php |
224 | 234 | if (!isset($globalAircraft) || $globalAircraft) { |
225 | 235 | ?> |
@@ -264,7 +274,13 @@ discard block |
||
264 | 274 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
265 | 275 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
266 | 276 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
267 | -<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> |
|
277 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
278 | + print '&latitude='.$latitude; |
|
279 | +} |
|
280 | +?><?php if(isset($longitude)) { |
|
281 | + print '&longitude='.$longitude; |
|
282 | +} |
|
283 | +?>&<?php print time(); ?>"></script> |
|
268 | 284 | <?php |
269 | 285 | if (!isset($type) || $type == 'aircraft') { |
270 | 286 | ?> |
@@ -337,7 +353,13 @@ discard block |
||
337 | 353 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
338 | 354 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
339 | 355 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
340 | -<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> |
|
356 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
357 | + print '&latitude='.$latitude; |
|
358 | +} |
|
359 | +?><?php if(isset($longitude)) { |
|
360 | + print '&longitude='.$longitude; |
|
361 | +} |
|
362 | +?>&<?php print time(); ?>"></script> |
|
341 | 363 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
342 | 364 | <?php |
343 | 365 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -418,7 +440,12 @@ discard block |
||
418 | 440 | <span class="icon-bar"></span> |
419 | 441 | </button> |
420 | 442 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle search"><i class="fa fa-search"></i></a> |
421 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
443 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
444 | + print '/'; |
|
445 | +} else { |
|
446 | + print $globalURL; |
|
447 | +} |
|
448 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
422 | 449 | </div> |
423 | 450 | <div class="collapse navbar-collapse"> |
424 | 451 | |
@@ -473,7 +500,10 @@ discard block |
||
473 | 500 | } |
474 | 501 | ?> |
475 | 502 | |
476 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
503 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
504 | + echo 'right-'; |
|
505 | +} |
|
506 | +?>caret"></b></a> |
|
477 | 507 | <ul class="dropdown-menu"> |
478 | 508 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li> |
479 | 509 | <?php |
@@ -544,8 +574,14 @@ discard block |
||
544 | 574 | </li> |
545 | 575 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
546 | 576 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
547 | - <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
|
548 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
577 | + <li class="dropdown<?php if ($sub) { |
|
578 | + echo '-submenu'; |
|
579 | +} |
|
580 | +?>"> |
|
581 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) { |
|
582 | + echo 'right-'; |
|
583 | +} |
|
584 | +?>caret"></b></a> |
|
549 | 585 | <ul class="dropdown-menu"> |
550 | 586 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
551 | 587 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
@@ -589,7 +625,10 @@ discard block |
||
589 | 625 | <?php |
590 | 626 | } |
591 | 627 | ?> |
592 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
628 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
629 | + echo 'right-'; |
|
630 | +} |
|
631 | +?>caret"></b></a> |
|
593 | 632 | <ul class="dropdown-menu"> |
594 | 633 | <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li> |
595 | 634 | <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -630,7 +669,10 @@ discard block |
||
630 | 669 | <?php |
631 | 670 | } |
632 | 671 | ?> |
633 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
672 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
673 | + echo 'right-'; |
|
674 | +} |
|
675 | +?>caret"></b></a> |
|
634 | 676 | <ul class="dropdown-menu"> |
635 | 677 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
636 | 678 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -673,7 +715,10 @@ discard block |
||
673 | 715 | ?> |
674 | 716 | |
675 | 717 | <!-- |
676 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
718 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
719 | + echo 'right-'; |
|
720 | +} |
|
721 | +?>caret"></b></a> |
|
677 | 722 | <ul class="dropdown-menu"> |
678 | 723 | <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li> |
679 | 724 | <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -730,7 +775,9 @@ discard block |
||
730 | 775 | $alllang = $Language->getLanguages(); |
731 | 776 | foreach ($alllang as $key => $lang) { |
732 | 777 | print '<option value="'.$key.'"'; |
733 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
778 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
779 | + print ' selected '; |
|
780 | + } |
|
734 | 781 | print '>'.$lang[0].'</option>'; |
735 | 782 | } |
736 | 783 | ?> |
@@ -878,9 +925,24 @@ discard block |
||
878 | 925 | $customid = $globalMapProvider; |
879 | 926 | ?> |
880 | 927 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
881 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
882 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
883 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
928 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
929 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
930 | +} else { |
|
931 | + print '18'; |
|
932 | +} |
|
933 | +?>, |
|
934 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
935 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
936 | +} else { |
|
937 | + print '0'; |
|
938 | +} |
|
939 | +?>, |
|
940 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
941 | + print 'false'; |
|
942 | +} else { |
|
943 | + print 'true'; |
|
944 | +} |
|
945 | +?>, |
|
884 | 946 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
885 | 947 | }).addTo(map); |
886 | 948 | <?php |
@@ -895,7 +957,12 @@ discard block |
||
895 | 957 | maxZoom: 5, |
896 | 958 | tms : true, |
897 | 959 | zindex : 3, |
898 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
960 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
961 | + print 'false'; |
|
962 | +} else { |
|
963 | + print 'true'; |
|
964 | +} |
|
965 | +?>, |
|
899 | 966 | attribution: 'Natural Earth' |
900 | 967 | }).addTo(map); |
901 | 968 | <?php |
@@ -918,4 +985,7 @@ discard block |
||
918 | 985 | |
919 | 986 | ?> |
920 | 987 | |
921 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
988 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
989 | + print 'index '; |
|
990 | +} |
|
991 | +?>clear"> |
@@ -16,7 +16,9 @@ discard block |
||
16 | 16 | print '<h1>'._("Aircraft Types").'</h1>'; |
17 | 17 | |
18 | 18 | $aircraft_types = $Stats->getAllAircraftTypes(); |
19 | - if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
19 | + if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') { |
|
20 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
21 | + } |
|
20 | 22 | $previous = null; |
21 | 23 | print '<div class="alphabet-legend">'; |
22 | 24 | foreach($aircraft_types as $value) { |
@@ -24,10 +26,14 @@ discard block |
||
24 | 26 | $firstLetter = substr($value['aircraft_manufacturer'], 0, 1); |
25 | 27 | if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
26 | 28 | { |
27 | - if ($previous !== null) print ' | '; |
|
29 | + if ($previous !== null) { |
|
30 | + print ' | '; |
|
31 | + } |
|
28 | 32 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
29 | 33 | } |
30 | - if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter; |
|
34 | + if ($firstLetter != '(' && $firstLetter != ')') { |
|
35 | + $previous = $firstLetter; |
|
36 | + } |
|
31 | 37 | } |
32 | 38 | print '</div>'; |
33 | 39 | $previous = null; |
@@ -38,10 +44,14 @@ discard block |
||
38 | 44 | { |
39 | 45 | if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')') |
40 | 46 | { |
41 | - if ($previous !== null) print '</div>'; |
|
47 | + if ($previous !== null) { |
|
48 | + print '</div>'; |
|
49 | + } |
|
42 | 50 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
43 | 51 | } |
44 | - if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter; |
|
52 | + if ($firstLetter != '(' && $firstLetter != ')') { |
|
53 | + $previous = $firstLetter; |
|
54 | + } |
|
45 | 55 | print '<div class="alphabet-item">'; |
46 | 56 | print '<a href="'.$globalURL.'/aircraft/'.$value['aircraft_icao'].'">'; |
47 | 57 | if ($value['aircraft_name'] == '') { |
@@ -45,8 +45,12 @@ discard block |
||
45 | 45 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
46 | 46 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
47 | 47 | $filter = array(); |
48 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
49 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
48 | + if ($year != '') { |
|
49 | + $filter = array_merge($filter,array('year' => $year)); |
|
50 | + } |
|
51 | + if ($month != '') { |
|
52 | + $filter = array_merge($filter,array('month' => $month)); |
|
53 | + } |
|
50 | 54 | if ($sort != '') |
51 | 55 | { |
52 | 56 | $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
@@ -64,8 +68,12 @@ discard block |
||
64 | 68 | { |
65 | 69 | $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']); |
66 | 70 | //$ident = $spotter_array[0]['ident']; |
67 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
|
68 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
|
71 | + if (isset($spotter_array[0]['latitude'])) { |
|
72 | + $latitude = $spotter_array[0]['latitude']; |
|
73 | + } |
|
74 | + if (isset($spotter_array[0]['longitude'])) { |
|
75 | + $longitude = $spotter_array[0]['longitude']; |
|
76 | + } |
|
69 | 77 | require_once('header.php'); |
70 | 78 | /* |
71 | 79 | if (isset($globalArchive) && $globalArchive) { |
@@ -120,9 +128,14 @@ discard block |
||
120 | 128 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
121 | 129 | //print '<div><span class="label">'._("Owner").'</span>'.$spotter_array[0]['aircraft_owner'].'</div>'; |
122 | 130 | $Stats = new Stats(); |
123 | - if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner); |
|
124 | - else $flights = 0; |
|
125 | - if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
131 | + if ($year == '' && $month == '') { |
|
132 | + $flights = $Stats->getStatsOwner($owner); |
|
133 | + } else { |
|
134 | + $flights = 0; |
|
135 | + } |
|
136 | + if ($flights == 0) { |
|
137 | + $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
138 | + } |
|
126 | 139 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
127 | 140 | $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter)); |
128 | 141 | print '<div><span class="label">'._("Aircraft type").'</span>'.$aircraft_type.'</div>'; |
@@ -133,7 +146,9 @@ discard block |
||
133 | 146 | $airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter)); |
134 | 147 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
135 | 148 | $duration = $Spotter->getFlightDurationByOwner($owner,$filter); |
136 | - if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
149 | + if ($duration != '0') { |
|
150 | + print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
|
151 | + } |
|
137 | 152 | print '</div>'; |
138 | 153 | |
139 | 154 | include('owner-sub-menu.php'); |