@@ -22,11 +22,15 @@ discard block |
||
| 22 | 22 | require_once('require/class.Spotter.php'); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -if (!isset($filter_name)) $filter_name = ''; |
|
| 25 | +if (!isset($filter_name)) { |
|
| 26 | + $filter_name = ''; |
|
| 27 | +} |
|
| 26 | 28 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 27 | 29 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
| 28 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
| 29 | -} |
|
| 30 | + if (isset($globalFilter['airline'])) { |
|
| 31 | + $airline_icao = $globalFilter['airline'][0]; |
|
| 32 | + } |
|
| 33 | + } |
|
| 30 | 34 | if ($type == 'aircraft' && $airline_icao != '' && $airline_icao != 'all') { |
| 31 | 35 | $Spotter = new Spotter(); |
| 32 | 36 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
@@ -61,7 +65,12 @@ discard block |
||
| 61 | 65 | <script type="text/javascript" src="<?php echo $globalURL; ?>/js/datamaps.world.min.js"></script> |
| 62 | 66 | <div class="column"> |
| 63 | 67 | <div class="info"> |
| 64 | - <h1><?php if (isset($airline_name)) echo _("Statistics for ").$airline_name; else echo _("Statistics"); ?></h1> |
|
| 68 | + <h1><?php if (isset($airline_name)) { |
|
| 69 | + echo _("Statistics for ").$airline_name; |
|
| 70 | +} else { |
|
| 71 | + echo _("Statistics"); |
|
| 72 | +} |
|
| 73 | +?></h1> |
|
| 65 | 74 | <?php |
| 66 | 75 | if ($type == 'aircraft') { |
| 67 | 76 | $last_update = $Stats->getLastStatsUpdate(); |
@@ -73,7 +82,9 @@ discard block |
||
| 73 | 82 | if (isset($last_update[0]['value'])) { |
| 74 | 83 | date_default_timezone_set('UTC'); |
| 75 | 84 | $lastupdate = strtotime($last_update[0]['value']); |
| 76 | - if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
|
| 85 | + if (isset($globalTimezone) && $globalTimezone != '') { |
|
| 86 | + date_default_timezone_set($globalTimezone); |
|
| 87 | + } |
|
| 77 | 88 | print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
| 78 | 89 | } |
| 79 | 90 | |
@@ -166,8 +177,11 @@ discard block |
||
| 166 | 177 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 167 | 178 | $aircraft_data = ''; |
| 168 | 179 | foreach($aircraft_array as $aircraft_item) { |
| 169 | - if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 170 | - else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 180 | + if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') { |
|
| 181 | + $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 182 | + } else { |
|
| 183 | + $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 184 | + } |
|
| 171 | 185 | } |
| 172 | 186 | $aircraft_data = substr($aircraft_data, 0, -1); |
| 173 | 187 | print 'var series = ['.$aircraft_data.'];'; |
@@ -184,11 +198,17 @@ discard block |
||
| 184 | 198 | <?php |
| 185 | 199 | if ($year != '' && $month != '') { |
| 186 | 200 | ?> |
| 187 | - <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 201 | + <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 202 | + echo '/'.$airline_icao; |
|
| 203 | +} |
|
| 204 | +?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 188 | 205 | <?php |
| 189 | 206 | } else { |
| 190 | 207 | ?> |
| 191 | - <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 208 | + <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 209 | + echo '/'.$airline_icao; |
|
| 210 | +} |
|
| 211 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 192 | 212 | <?php |
| 193 | 213 | } |
| 194 | 214 | ?> |
@@ -217,11 +237,15 @@ discard block |
||
| 217 | 237 | print '</script>'; |
| 218 | 238 | if ($year != '' && $month != '') { |
| 219 | 239 | print '<div class="more"><a href="'.$globalURL.'/statistics/airline'; |
| 220 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
| 240 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 241 | + echo '/'.$airline_icao; |
|
| 242 | + } |
|
| 221 | 243 | print '/'.$year.'/'.$month.'/" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
| 222 | 244 | } else { |
| 223 | 245 | print '<div class="more"><a href="'.$globalURL.'/statistics/airline'; |
| 224 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
| 246 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 247 | + echo '/'.$airline_icao; |
|
| 248 | + } |
|
| 225 | 249 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
| 226 | 250 | } |
| 227 | 251 | print '</div>'; |
@@ -241,8 +265,9 @@ discard block |
||
| 241 | 265 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
| 242 | 266 | <?php |
| 243 | 267 | $marine_array = $Stats->countAllMarineTypes(true,$filter_name,$year,$month); |
| 244 | - if (count($marine_array) == 0) print _("No data available"); |
|
| 245 | - else { |
|
| 268 | + if (count($marine_array) == 0) { |
|
| 269 | + print _("No data available"); |
|
| 270 | + } else { |
|
| 246 | 271 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 247 | 272 | $marine_data = ''; |
| 248 | 273 | foreach($marine_array as $marine_item) { |
@@ -283,8 +308,9 @@ discard block |
||
| 283 | 308 | <h2><?php echo _("Top 10 Races Number of Participants"); ?></h2> |
| 284 | 309 | <?php |
| 285 | 310 | $marine_array = $Marine->countAllCaptainsByRaces(true,$filter_name,$year,$month); |
| 286 | - if (count($marine_array) == 0) print _("No data available"); |
|
| 287 | - else { |
|
| 311 | + if (count($marine_array) == 0) { |
|
| 312 | + print _("No data available"); |
|
| 313 | + } else { |
|
| 288 | 314 | print '<div id="chart991" class="chart" width="100%"></div><script>'; |
| 289 | 315 | $marine_data = ''; |
| 290 | 316 | foreach($marine_array as $marine_item) { |
@@ -331,8 +357,9 @@ discard block |
||
| 331 | 357 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
| 332 | 358 | <?php |
| 333 | 359 | $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
| 334 | - if (count($tracker_array) == 0) print _("No data available"); |
|
| 335 | - else { |
|
| 360 | + if (count($tracker_array) == 0) { |
|
| 361 | + print _("No data available"); |
|
| 362 | + } else { |
|
| 336 | 363 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 337 | 364 | $tracker_data = ''; |
| 338 | 365 | foreach($tracker_array as $tracker_item) { |
@@ -376,8 +403,9 @@ discard block |
||
| 376 | 403 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
| 377 | 404 | <?php |
| 378 | 405 | $owner_array = $Satellite->countAllOwners(true); |
| 379 | - if (count($owner_array) == 0) print _("No data available"); |
|
| 380 | - else { |
|
| 406 | + if (count($owner_array) == 0) { |
|
| 407 | + print _("No data available"); |
|
| 408 | + } else { |
|
| 381 | 409 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 382 | 410 | $owner_data = ''; |
| 383 | 411 | foreach($owner_array as $owner_item) { |
@@ -396,7 +424,10 @@ discard block |
||
| 396 | 424 | ?> |
| 397 | 425 | <!-- |
| 398 | 426 | <div class="more"> |
| 399 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 427 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 428 | + echo '/'.$airline_icao; |
|
| 429 | +} |
|
| 430 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 400 | 431 | </div> |
| 401 | 432 | --> |
| 402 | 433 | </div> |
@@ -405,8 +436,9 @@ discard block |
||
| 405 | 436 | <h2><?php echo _("Top 10 Most Common Countries Owners"); ?></h2> |
| 406 | 437 | <?php |
| 407 | 438 | $countries_array = $Satellite->countAllCountriesOwners(true); |
| 408 | - if (count($countries_array) == 0) print _("No data available"); |
|
| 409 | - else { |
|
| 439 | + if (count($countries_array) == 0) { |
|
| 440 | + print _("No data available"); |
|
| 441 | + } else { |
|
| 410 | 442 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 411 | 443 | $owner_data = ''; |
| 412 | 444 | foreach($countries_array as $owner_item) { |
@@ -425,7 +457,10 @@ discard block |
||
| 425 | 457 | ?> |
| 426 | 458 | <!-- |
| 427 | 459 | <div class="more"> |
| 428 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 460 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 461 | + echo '/'.$airline_icao; |
|
| 462 | +} |
|
| 463 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 429 | 464 | </div> |
| 430 | 465 | --> |
| 431 | 466 | </div> |
@@ -437,8 +472,9 @@ discard block |
||
| 437 | 472 | <h2><?php echo _("Top 10 Most Common Launch Sites"); ?></h2> |
| 438 | 473 | <?php |
| 439 | 474 | $launch_site_array = $Satellite->countAllLaunchSite(true); |
| 440 | - if (count($launch_site_array) == 0) print _("No data available"); |
|
| 441 | - else { |
|
| 475 | + if (count($launch_site_array) == 0) { |
|
| 476 | + print _("No data available"); |
|
| 477 | + } else { |
|
| 442 | 478 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 443 | 479 | $launch_site_data = ''; |
| 444 | 480 | foreach($launch_site_array as $launch_site_item) { |
@@ -457,7 +493,10 @@ discard block |
||
| 457 | 493 | ?> |
| 458 | 494 | <!-- |
| 459 | 495 | <div class="more"> |
| 460 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 496 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 497 | + echo '/'.$airline_icao; |
|
| 498 | +} |
|
| 499 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 461 | 500 | </div> |
| 462 | 501 | --> |
| 463 | 502 | </div> |
@@ -480,8 +519,9 @@ discard block |
||
| 480 | 519 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
| 481 | 520 | <?php |
| 482 | 521 | $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
| 483 | - if (count($pilot_array) == 0) print _("No data available"); |
|
| 484 | - else { |
|
| 522 | + if (count($pilot_array) == 0) { |
|
| 523 | + print _("No data available"); |
|
| 524 | + } else { |
|
| 485 | 525 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 486 | 526 | $pilot_data = ''; |
| 487 | 527 | foreach($pilot_array as $pilot_item) { |
@@ -499,7 +539,9 @@ discard block |
||
| 499 | 539 | } |
| 500 | 540 | print '<div class="more">'; |
| 501 | 541 | print '<a href="'.$globalURL.'/statistics/pilot'; |
| 502 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
| 542 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 543 | + echo '/'.$airline_icao; |
|
| 544 | + } |
|
| 503 | 545 | print'" class="btn btn-default btn" role="button">'._("See full statistic").'»</a>'; |
| 504 | 546 | print '</div>'; |
| 505 | 547 | ?> |
@@ -515,8 +557,9 @@ discard block |
||
| 515 | 557 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
| 516 | 558 | <?php |
| 517 | 559 | $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
| 518 | - if (count($owner_array) == 0) print _("No data available"); |
|
| 519 | - else { |
|
| 560 | + if (count($owner_array) == 0) { |
|
| 561 | + print _("No data available"); |
|
| 562 | + } else { |
|
| 520 | 563 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 521 | 564 | $owner_data = ''; |
| 522 | 565 | foreach($owner_array as $owner_item) { |
@@ -534,7 +577,10 @@ discard block |
||
| 534 | 577 | } |
| 535 | 578 | ?> |
| 536 | 579 | <div class="more"> |
| 537 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 580 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 581 | + echo '/'.$airline_icao; |
|
| 582 | +} |
|
| 583 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 538 | 584 | </div> |
| 539 | 585 | </div> |
| 540 | 586 | |
@@ -547,8 +593,9 @@ discard block |
||
| 547 | 593 | <h2><?php echo _("Top 20 Most Common Country a Flight was Over"); ?></h2> |
| 548 | 594 | <?php |
| 549 | 595 | //$flightover_array = $Stats->countAllFlightOverCountries(); |
| 550 | - if (count($flightover_array) == 0) print _("No data available"); |
|
| 551 | - else { |
|
| 596 | + if (count($flightover_array) == 0) { |
|
| 597 | + print _("No data available"); |
|
| 598 | + } else { |
|
| 552 | 599 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 553 | 600 | print 'var series = ['; |
| 554 | 601 | $flightover_data = ''; |
@@ -590,7 +637,10 @@ discard block |
||
| 590 | 637 | } |
| 591 | 638 | ?> |
| 592 | 639 | <div class="more"> |
| 593 | - <a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 640 | + <a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 641 | + echo '/'.$airline_icao; |
|
| 642 | +} |
|
| 643 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 594 | 644 | </div> |
| 595 | 645 | </div> |
| 596 | 646 | <?php |
@@ -608,8 +658,9 @@ discard block |
||
| 608 | 658 | <div class="col-md-6"> |
| 609 | 659 | <h2><?php echo _("Top 20 Most Common Country a Vessel was inside"); ?></h2> |
| 610 | 660 | <?php |
| 611 | - if (count($flightover_array) == 0) print _("No data available"); |
|
| 612 | - else { |
|
| 661 | + if (count($flightover_array) == 0) { |
|
| 662 | + print _("No data available"); |
|
| 663 | + } else { |
|
| 613 | 664 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 614 | 665 | print 'var series = ['; |
| 615 | 666 | $flightover_data = ''; |
@@ -666,8 +717,9 @@ discard block |
||
| 666 | 717 | <div class="col-md-6"> |
| 667 | 718 | <h2><?php echo _("Top 20 Most Common Country a Tracker was inside"); ?></h2> |
| 668 | 719 | <?php |
| 669 | - if (count($flightover_array) == 0) print _("No data available"); |
|
| 670 | - else { |
|
| 720 | + if (count($flightover_array) == 0) { |
|
| 721 | + print _("No data available"); |
|
| 722 | + } else { |
|
| 671 | 723 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 672 | 724 | print 'var series = ['; |
| 673 | 725 | $flightover_data = ''; |
@@ -773,7 +825,9 @@ discard block |
||
| 773 | 825 | });"; |
| 774 | 826 | print '</script>'; |
| 775 | 827 | print '<div class="more"><a href="'.$globalURL.'/statistics/airport-departure'; |
| 776 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
| 828 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 829 | + echo '/'.$airline_icao; |
|
| 830 | + } |
|
| 777 | 831 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
| 778 | 832 | } |
| 779 | 833 | ?> |
@@ -837,7 +891,9 @@ discard block |
||
| 837 | 891 | });"; |
| 838 | 892 | print '</script>'; |
| 839 | 893 | print '<div class="more"><a href="'.$globalURL.'/statistics/airport-arrival'; |
| 840 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
| 894 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 895 | + echo '/'.$airline_icao; |
|
| 896 | + } |
|
| 841 | 897 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
| 842 | 898 | } |
| 843 | 899 | ?> |
@@ -856,8 +912,9 @@ discard block |
||
| 856 | 912 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 857 | 913 | <?php |
| 858 | 914 | $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
| 859 | - if (count($year_array) == 0) print _("No data available"); |
|
| 860 | - else { |
|
| 915 | + if (count($year_array) == 0) { |
|
| 916 | + print _("No data available"); |
|
| 917 | + } else { |
|
| 861 | 918 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 862 | 919 | $year_data = ''; |
| 863 | 920 | $year_cnt = ''; |
@@ -876,7 +933,10 @@ discard block |
||
| 876 | 933 | } |
| 877 | 934 | ?> |
| 878 | 935 | <div class="more"> |
| 879 | - <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 936 | + <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 937 | + echo '/'.$airline_icao; |
|
| 938 | +} |
|
| 939 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 880 | 940 | </div> |
| 881 | 941 | </div> |
| 882 | 942 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -884,8 +944,9 @@ discard block |
||
| 884 | 944 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 885 | 945 | <?php |
| 886 | 946 | $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
| 887 | - if (count($month_array) == 0) print _("No data available"); |
|
| 888 | - else { |
|
| 947 | + if (count($month_array) == 0) { |
|
| 948 | + print _("No data available"); |
|
| 949 | + } else { |
|
| 889 | 950 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 890 | 951 | $month_data = ''; |
| 891 | 952 | $month_cnt = ''; |
@@ -904,7 +965,10 @@ discard block |
||
| 904 | 965 | } |
| 905 | 966 | ?> |
| 906 | 967 | <div class="more"> |
| 907 | - <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 968 | + <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 969 | + echo '/'.$airline_icao; |
|
| 970 | +} |
|
| 971 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 908 | 972 | </div> |
| 909 | 973 | </div> |
| 910 | 974 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -913,8 +977,9 @@ discard block |
||
| 913 | 977 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 914 | 978 | <?php |
| 915 | 979 | $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
| 916 | - if (empty($date_array)) print _("No data available"); |
|
| 917 | - else { |
|
| 980 | + if (empty($date_array)) { |
|
| 981 | + print _("No data available"); |
|
| 982 | + } else { |
|
| 918 | 983 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 919 | 984 | $date_data = ''; |
| 920 | 985 | $date_cnt = ''; |
@@ -933,7 +998,10 @@ discard block |
||
| 933 | 998 | } |
| 934 | 999 | ?> |
| 935 | 1000 | <div class="more"> |
| 936 | - <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 1001 | + <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 1002 | + echo '/'.$airline_icao; |
|
| 1003 | +} |
|
| 1004 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 937 | 1005 | </div> |
| 938 | 1006 | </div> |
| 939 | 1007 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -941,8 +1009,9 @@ discard block |
||
| 941 | 1009 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 942 | 1010 | <?php |
| 943 | 1011 | $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
| 944 | - if (empty($hour_array)) print _("No data available"); |
|
| 945 | - else { |
|
| 1012 | + if (empty($hour_array)) { |
|
| 1013 | + print _("No data available"); |
|
| 1014 | + } else { |
|
| 946 | 1015 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 947 | 1016 | $hour_data = ''; |
| 948 | 1017 | $hour_cnt = ''; |
@@ -961,7 +1030,10 @@ discard block |
||
| 961 | 1030 | } |
| 962 | 1031 | ?> |
| 963 | 1032 | <div class="more"> |
| 964 | - <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 1033 | + <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
| 1034 | + echo '/'.$airline_icao; |
|
| 1035 | +} |
|
| 1036 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
| 965 | 1037 | </div> |
| 966 | 1038 | </div> |
| 967 | 1039 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -981,8 +1053,9 @@ discard block |
||
| 981 | 1053 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 982 | 1054 | <?php |
| 983 | 1055 | $year_array = $Stats->countAllMarineMonthsLastYear(true,$filter_name); |
| 984 | - if (count($year_array) == 0) print _("No data available"); |
|
| 985 | - else { |
|
| 1056 | + if (count($year_array) == 0) { |
|
| 1057 | + print _("No data available"); |
|
| 1058 | + } else { |
|
| 986 | 1059 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 987 | 1060 | $year_data = ''; |
| 988 | 1061 | $year_cnt = ''; |
@@ -1010,8 +1083,9 @@ discard block |
||
| 1010 | 1083 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 1011 | 1084 | <?php |
| 1012 | 1085 | $month_array = $Stats->countAllMarineDatesLastMonth($filter_name); |
| 1013 | - if (count($month_array) == 0) print _("No data available"); |
|
| 1014 | - else { |
|
| 1086 | + if (count($month_array) == 0) { |
|
| 1087 | + print _("No data available"); |
|
| 1088 | + } else { |
|
| 1015 | 1089 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 1016 | 1090 | $month_data = ''; |
| 1017 | 1091 | $month_cnt = ''; |
@@ -1039,8 +1113,9 @@ discard block |
||
| 1039 | 1113 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 1040 | 1114 | <?php |
| 1041 | 1115 | $date_array = $Stats->countAllMarineDatesLast7Days($filter_name); |
| 1042 | - if (empty($date_array)) print _("No data available"); |
|
| 1043 | - else { |
|
| 1116 | + if (empty($date_array)) { |
|
| 1117 | + print _("No data available"); |
|
| 1118 | + } else { |
|
| 1044 | 1119 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 1045 | 1120 | $date_data = ''; |
| 1046 | 1121 | $date_cnt = ''; |
@@ -1067,8 +1142,9 @@ discard block |
||
| 1067 | 1142 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 1068 | 1143 | <?php |
| 1069 | 1144 | $hour_array = $Stats->countAllMarineHours('hour',true,$filter_name); |
| 1070 | - if (empty($hour_array)) print _("No data available"); |
|
| 1071 | - else { |
|
| 1145 | + if (empty($hour_array)) { |
|
| 1146 | + print _("No data available"); |
|
| 1147 | + } else { |
|
| 1072 | 1148 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 1073 | 1149 | $hour_data = ''; |
| 1074 | 1150 | $hour_cnt = ''; |
@@ -1107,8 +1183,9 @@ discard block |
||
| 1107 | 1183 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 1108 | 1184 | <?php |
| 1109 | 1185 | $year_array = $Stats->countAllTrackerMonthsLastYear(true); |
| 1110 | - if (count($year_array) == 0) print _("No data available"); |
|
| 1111 | - else { |
|
| 1186 | + if (count($year_array) == 0) { |
|
| 1187 | + print _("No data available"); |
|
| 1188 | + } else { |
|
| 1112 | 1189 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 1113 | 1190 | $year_data = ''; |
| 1114 | 1191 | $year_cnt = ''; |
@@ -1136,8 +1213,9 @@ discard block |
||
| 1136 | 1213 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 1137 | 1214 | <?php |
| 1138 | 1215 | $month_array = $Stats->countAllTrackerDatesLastMonth(); |
| 1139 | - if (count($month_array) == 0) print _("No data available"); |
|
| 1140 | - else { |
|
| 1216 | + if (count($month_array) == 0) { |
|
| 1217 | + print _("No data available"); |
|
| 1218 | + } else { |
|
| 1141 | 1219 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 1142 | 1220 | $month_data = ''; |
| 1143 | 1221 | $month_cnt = ''; |
@@ -1165,8 +1243,9 @@ discard block |
||
| 1165 | 1243 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 1166 | 1244 | <?php |
| 1167 | 1245 | $date_array = $Stats->countAllTrackerDatesLast7Days(); |
| 1168 | - if (empty($date_array)) print _("No data available"); |
|
| 1169 | - else { |
|
| 1246 | + if (empty($date_array)) { |
|
| 1247 | + print _("No data available"); |
|
| 1248 | + } else { |
|
| 1170 | 1249 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 1171 | 1250 | $date_data = ''; |
| 1172 | 1251 | $date_cnt = ''; |
@@ -1193,8 +1272,9 @@ discard block |
||
| 1193 | 1272 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 1194 | 1273 | <?php |
| 1195 | 1274 | $hour_array = $Stats->countAllTrackerHours('hour',true); |
| 1196 | - if (empty($hour_array)) print _("No data available"); |
|
| 1197 | - else { |
|
| 1275 | + if (empty($hour_array)) { |
|
| 1276 | + print _("No data available"); |
|
| 1277 | + } else { |
|
| 1198 | 1278 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 1199 | 1279 | $hour_data = ''; |
| 1200 | 1280 | $hour_cnt = ''; |
@@ -1233,8 +1313,9 @@ discard block |
||
| 1233 | 1313 | <h2><?php echo _("Busiest Launch Months of the last 12 Months"); ?></h2> |
| 1234 | 1314 | <?php |
| 1235 | 1315 | $year_array = $Satellite->countAllMonthsLastYear(); |
| 1236 | - if (count($year_array) == 0) print _("No data available"); |
|
| 1237 | - else { |
|
| 1316 | + if (count($year_array) == 0) { |
|
| 1317 | + print _("No data available"); |
|
| 1318 | + } else { |
|
| 1238 | 1319 | print '<div id="chart21" class="chart" width="100%"></div><script>'; |
| 1239 | 1320 | $year_data = ''; |
| 1240 | 1321 | $year_cnt = ''; |
@@ -1264,8 +1345,9 @@ discard block |
||
| 1264 | 1345 | <h2><?php echo _("Busiest Launch Years of the last 10 Years"); ?></h2> |
| 1265 | 1346 | <?php |
| 1266 | 1347 | $year_array = $Satellite->countAllYears(); |
| 1267 | - if (count($year_array) == 0) print _("No data available"); |
|
| 1268 | - else { |
|
| 1348 | + if (count($year_array) == 0) { |
|
| 1349 | + print _("No data available"); |
|
| 1350 | + } else { |
|
| 1269 | 1351 | print '<div id="chart22" class="chart" width="100%"></div><script>'; |
| 1270 | 1352 | $year_data = ''; |
| 1271 | 1353 | $year_cnt = ''; |
@@ -1307,8 +1389,9 @@ discard block |
||
| 1307 | 1389 | <h2><?php echo _("Fatalities by Years"); ?></h2> |
| 1308 | 1390 | <?php |
| 1309 | 1391 | $year_array = $Stats->countFatalitiesByYear(); |
| 1310 | - if (count($year_array) == 0) print _("No data available"); |
|
| 1311 | - else { |
|
| 1392 | + if (count($year_array) == 0) { |
|
| 1393 | + print _("No data available"); |
|
| 1394 | + } else { |
|
| 1312 | 1395 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
| 1313 | 1396 | $year_data = ''; |
| 1314 | 1397 | $year_cnt = ''; |
@@ -1337,8 +1420,9 @@ discard block |
||
| 1337 | 1420 | <h2><?php echo _("Fatalities last 12 Months"); ?></h2> |
| 1338 | 1421 | <?php |
| 1339 | 1422 | $year_array = $Stats->countFatalitiesLast12Months(); |
| 1340 | - if (count($year_array) == 0) print _("No data available"); |
|
| 1341 | - else { |
|
| 1423 | + if (count($year_array) == 0) { |
|
| 1424 | + print _("No data available"); |
|
| 1425 | + } else { |
|
| 1342 | 1426 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
| 1343 | 1427 | $year_data = ''; |
| 1344 | 1428 | $year_cnt = ''; |
@@ -1409,8 +1493,11 @@ discard block |
||
| 1409 | 1493 | $distance = $distance; |
| 1410 | 1494 | $unit = 'km'; |
| 1411 | 1495 | } |
| 1412 | - if (!isset($polar_data)) $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
| 1413 | - else $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
| 1496 | + if (!isset($polar_data)) { |
|
| 1497 | + $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
| 1498 | + } else { |
|
| 1499 | + $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
| 1500 | + } |
|
| 1414 | 1501 | } |
| 1415 | 1502 | ?> |
| 1416 | 1503 | <div class="col-md-6"> |
@@ -1474,9 +1561,12 @@ discard block |
||
| 1474 | 1561 | foreach ($msg as $eachmsg) { |
| 1475 | 1562 | //$eachmsg = $msg[0]; |
| 1476 | 1563 | $data = $eachmsg['source_data']; |
| 1477 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
| 1478 | - else $max = 500; |
|
| 1479 | -?> |
|
| 1564 | + if ($data > 500) { |
|
| 1565 | + $max = (round(($data+100)/100))*100; |
|
| 1566 | + } else { |
|
| 1567 | + $max = 500; |
|
| 1568 | + } |
|
| 1569 | + ?> |
|
| 1480 | 1570 | <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
| 1481 | 1571 | <script> |
| 1482 | 1572 | var g = new JustGage({ |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | if (!isset($filter_name)) $filter_name = ''; |
| 26 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 26 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 27 | 27 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
| 28 | 28 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
| 29 | 29 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
| 33 | 33 | if (isset($airline_info[0]['name'])) { |
| 34 | 34 | $airline_name = $airline_info[0]['name']; |
| 35 | - } elseif (strpos($airline_icao,'alliance_') !== FALSE) { |
|
| 35 | + } elseif (strpos($airline_icao, 'alliance_') !== FALSE) { |
|
| 36 | 36 | $alliance_name = $airline_icao; |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | $title = _("Statistics"); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 46 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 45 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 46 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 47 | 47 | |
| 48 | 48 | require_once('header.php'); |
| 49 | 49 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | date_default_timezone_set('UTC'); |
| 75 | 75 | $lastupdate = strtotime($last_update[0]['value']); |
| 76 | 76 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
| 77 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
| 77 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | ?> |
@@ -86,31 +86,31 @@ discard block |
||
| 86 | 86 | <?php |
| 87 | 87 | if ($type == 'aircraft') { |
| 88 | 88 | ?> |
| 89 | - <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Flights"); ?></span> |
|
| 90 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 91 | - <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
| 92 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 89 | + <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Flights"); ?></span> |
|
| 90 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 91 | + <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
| 92 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 93 | 93 | <?php |
| 94 | 94 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
| 95 | 95 | ?> |
| 96 | - <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
| 97 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 96 | + <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
| 97 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 98 | 98 | <?php |
| 99 | 99 | } |
| 100 | 100 | if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
| 101 | 101 | ?> |
| 102 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
| 103 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 102 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
| 103 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 104 | 104 | <?php |
| 105 | 105 | } |
| 106 | 106 | ?> |
| 107 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircraft types"); ?></span> |
|
| 108 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 107 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircraft types"); ?></span> |
|
| 108 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 109 | 109 | <?php |
| 110 | 110 | if ($airline_icao == '') { |
| 111 | 111 | ?> |
| 112 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
| 113 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 112 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
| 113 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 114 | 114 | <?php |
| 115 | 115 | } |
| 116 | 116 | ?> |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | if (!(isset($globalVA) && $globalVA) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS) && !(isset($globalVAM) && $globalVAM)) { |
| 119 | 119 | if ($airline_icao == '' || $airline_icao == 'all') { |
| 120 | 120 | ?> |
| 121 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
| 122 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 121 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
| 122 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 123 | 123 | <?php |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -127,35 +127,35 @@ discard block |
||
| 127 | 127 | <?php |
| 128 | 128 | } elseif ($type == 'marine') { |
| 129 | 129 | ?> |
| 130 | - <span><span class="badge"><?php print number_format($Stats->countOverallMarine($filter_name,$year,$month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
| 131 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 130 | + <span><span class="badge"><?php print number_format($Stats->countOverallMarine($filter_name, $year, $month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
| 131 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 132 | 132 | <?php |
| 133 | 133 | if (isset($globalVM) && $globalVM) { |
| 134 | 134 | ?> |
| 135 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes($filter_name,$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 136 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 137 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineRaces($filter_name,$year,$month)); ?></span> <?php echo _("Races"); ?></span> |
|
| 138 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 139 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineCaptains($filter_name,$year,$month)); ?></span> <?php echo _("Captains"); ?></span> |
|
| 140 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 135 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes($filter_name, $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 136 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 137 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineRaces($filter_name, $year, $month)); ?></span> <?php echo _("Races"); ?></span> |
|
| 138 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 139 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineCaptains($filter_name, $year, $month)); ?></span> <?php echo _("Captains"); ?></span> |
|
| 140 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 141 | 141 | <?php |
| 142 | 142 | } else { |
| 143 | 143 | ?> |
| 144 | - <span><span class="badge"><?php print number_format($Stats->countOverallMarineTypes($filter_name,$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 145 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 144 | + <span><span class="badge"><?php print number_format($Stats->countOverallMarineTypes($filter_name, $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 145 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 146 | 146 | <?php |
| 147 | 147 | } |
| 148 | 148 | } elseif ($type == 'tracker') { |
| 149 | 149 | ?> |
| 150 | - <span><span class="badge"><?php print number_format($Stats->countOverallTracker($filter_name,$year,$month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
| 151 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 152 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 153 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 150 | + <span><span class="badge"><?php print number_format($Stats->countOverallTracker($filter_name, $year, $month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
| 151 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 152 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 153 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 154 | 154 | <?php |
| 155 | 155 | } |
| 156 | 156 | ?> |
| 157 | 157 | </p> |
| 158 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 158 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 159 | 159 | <div class="specific-stats"> |
| 160 | 160 | <?php |
| 161 | 161 | if ($type == 'aircraft') { |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | <div class="col-md-6"> |
| 165 | 165 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
| 166 | 166 | <?php |
| 167 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
| 167 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
| 168 | 168 | if (count($aircraft_array) == 0) { |
| 169 | 169 | print _("No data available"); |
| 170 | 170 | } else { |
| 171 | 171 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 172 | 172 | $aircraft_data = ''; |
| 173 | - foreach($aircraft_array as $aircraft_item) { |
|
| 173 | + foreach ($aircraft_array as $aircraft_item) { |
|
| 174 | 174 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
| 175 | 175 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
| 176 | 176 | } |
@@ -199,16 +199,16 @@ discard block |
||
| 199 | 199 | ?> |
| 200 | 200 | </div> |
| 201 | 201 | </div> |
| 202 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 202 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 203 | 203 | <?php |
| 204 | 204 | if ($airline_icao == '' || $airline_icao == 'all') { |
| 205 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
| 205 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
| 206 | 206 | if (count($airline_array) > 0) { |
| 207 | 207 | print '<div class="col-md-6">'; |
| 208 | 208 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
| 209 | 209 | print '<div id="chart2" class="chart" width="100%"></div><script>'; |
| 210 | 210 | $airline_data = ''; |
| 211 | - foreach($airline_array as $airline_item) { |
|
| 211 | + foreach ($airline_array as $airline_item) { |
|
| 212 | 212 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
| 213 | 213 | } |
| 214 | 214 | $airline_data = substr($airline_data, 0, -1); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | } |
| 234 | 234 | ?> |
| 235 | 235 | </div> |
| 236 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 236 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 237 | 237 | <?php |
| 238 | 238 | } |
| 239 | 239 | } |
@@ -245,12 +245,12 @@ discard block |
||
| 245 | 245 | <div class="col-md-6"> |
| 246 | 246 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
| 247 | 247 | <?php |
| 248 | - $marine_array = $Stats->countAllMarineTypes(true,$filter_name,$year,$month); |
|
| 248 | + $marine_array = $Stats->countAllMarineTypes(true, $filter_name, $year, $month); |
|
| 249 | 249 | if (count($marine_array) == 0) print _("No data available"); |
| 250 | 250 | else { |
| 251 | 251 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 252 | 252 | $marine_data = ''; |
| 253 | - foreach($marine_array as $marine_item) { |
|
| 253 | + foreach ($marine_array as $marine_item) { |
|
| 254 | 254 | $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
| 255 | 255 | } |
| 256 | 256 | $marine_data = substr($marine_data, 0, -1); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | ?> |
| 280 | 280 | </div> |
| 281 | 281 | </div> |
| 282 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 282 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 283 | 283 | <!-- </div>--> |
| 284 | 284 | <?php |
| 285 | 285 | if (isset($globalVM) && $globalVM) { |
@@ -287,12 +287,12 @@ discard block |
||
| 287 | 287 | <div class="col-md-6"> |
| 288 | 288 | <h2><?php echo _("Top 10 Races Number of Participants"); ?></h2> |
| 289 | 289 | <?php |
| 290 | - $marine_array = $Marine->countAllCaptainsByRaces(true,$filter_name,$year,$month); |
|
| 290 | + $marine_array = $Marine->countAllCaptainsByRaces(true, $filter_name, $year, $month); |
|
| 291 | 291 | if (count($marine_array) == 0) print _("No data available"); |
| 292 | 292 | else { |
| 293 | 293 | print '<div id="chart991" class="chart" width="100%"></div><script>'; |
| 294 | 294 | $marine_data = ''; |
| 295 | - foreach($marine_array as $marine_item) { |
|
| 295 | + foreach ($marine_array as $marine_item) { |
|
| 296 | 296 | $marine_data .= '["'.$marine_item['marine_race_name'].'",'.$marine_item['marine_captain_count'].'],'; |
| 297 | 297 | } |
| 298 | 298 | $marine_data = substr($marine_data, 0, -1); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | ?> |
| 323 | 323 | </div> |
| 324 | 324 | </div> |
| 325 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 325 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 326 | 326 | </div> |
| 327 | 327 | <div class="row column"> |
| 328 | 328 | |
@@ -335,12 +335,12 @@ discard block |
||
| 335 | 335 | <div class="col-md-6"> |
| 336 | 336 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
| 337 | 337 | <?php |
| 338 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
| 338 | + $tracker_array = $Tracker->countAllTrackerTypes(true, 0, '', array(), $year, $month); |
|
| 339 | 339 | if (count($tracker_array) == 0) print _("No data available"); |
| 340 | 340 | else { |
| 341 | 341 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 342 | 342 | $tracker_data = ''; |
| 343 | - foreach($tracker_array as $tracker_item) { |
|
| 343 | + foreach ($tracker_array as $tracker_item) { |
|
| 344 | 344 | $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
| 345 | 345 | } |
| 346 | 346 | $tracker_data = substr($tracker_data, 0, -1); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | ?> |
| 371 | 371 | </div> |
| 372 | 372 | </div> |
| 373 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 373 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 374 | 374 | <!-- </div>--> |
| 375 | 375 | <?php |
| 376 | 376 | } |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | else { |
| 386 | 386 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 387 | 387 | $owner_data = ''; |
| 388 | - foreach($owner_array as $owner_item) { |
|
| 388 | + foreach ($owner_array as $owner_item) { |
|
| 389 | 389 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
| 390 | 390 | } |
| 391 | 391 | $owner_data = substr($owner_data, 0, -1); |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | </div> |
| 406 | 406 | --> |
| 407 | 407 | </div> |
| 408 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 408 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 409 | 409 | <div class="col-md-6"> |
| 410 | 410 | <h2><?php echo _("Top 10 Most Common Countries Owners"); ?></h2> |
| 411 | 411 | <?php |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | else { |
| 415 | 415 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 416 | 416 | $owner_data = ''; |
| 417 | - foreach($countries_array as $owner_item) { |
|
| 417 | + foreach ($countries_array as $owner_item) { |
|
| 418 | 418 | $owner_data .= '["'.$owner_item['country_name'].'",'.$owner_item['country_count'].'],'; |
| 419 | 419 | } |
| 420 | 420 | $owner_data = substr($owner_data, 0, -1); |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | --> |
| 436 | 436 | </div> |
| 437 | 437 | |
| 438 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 438 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 439 | 439 | ² </div> |
| 440 | 440 | <div class="row column"> |
| 441 | 441 | <div class="col-md-6"> |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | else { |
| 447 | 447 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 448 | 448 | $launch_site_data = ''; |
| 449 | - foreach($launch_site_array as $launch_site_item) { |
|
| 449 | + foreach ($launch_site_array as $launch_site_item) { |
|
| 450 | 450 | $launch_site_data .= '["'.$launch_site_item['launch_site'].'",'.$launch_site_item['launch_site_count'].'],'; |
| 451 | 451 | } |
| 452 | 452 | $launch_site_data = substr($launch_site_data, 0, -1); |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | ?> |
| 474 | 474 | <div class="row column"> |
| 475 | 475 | <?php |
| 476 | - $flightover_array = $Stats->countAllFlightOverCountries(false,$airline_icao,$filter_name,$year,$month); |
|
| 476 | + $flightover_array = $Stats->countAllFlightOverCountries(false, $airline_icao, $filter_name, $year, $month); |
|
| 477 | 477 | //if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
| 478 | 478 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
| 479 | 479 | if (empty($flightover_array)) { |
@@ -484,12 +484,12 @@ discard block |
||
| 484 | 484 | ?> |
| 485 | 485 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
| 486 | 486 | <?php |
| 487 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
| 487 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
| 488 | 488 | if (count($pilot_array) == 0) print _("No data available"); |
| 489 | 489 | else { |
| 490 | 490 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 491 | 491 | $pilot_data = ''; |
| 492 | - foreach($pilot_array as $pilot_item) { |
|
| 492 | + foreach ($pilot_array as $pilot_item) { |
|
| 493 | 493 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
| 494 | 494 | } |
| 495 | 495 | $pilot_data = substr($pilot_data, 0, -1); |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | ?> |
| 511 | 511 | </div> |
| 512 | 512 | |
| 513 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 513 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 514 | 514 | <?php |
| 515 | 515 | } |
| 516 | 516 | // else { |
@@ -519,12 +519,12 @@ discard block |
||
| 519 | 519 | <div class="col-md-6"> |
| 520 | 520 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
| 521 | 521 | <?php |
| 522 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
| 522 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
| 523 | 523 | if (count($owner_array) == 0) print _("No data available"); |
| 524 | 524 | else { |
| 525 | 525 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 526 | 526 | $owner_data = ''; |
| 527 | - foreach($owner_array as $owner_item) { |
|
| 527 | + foreach ($owner_array as $owner_item) { |
|
| 528 | 528 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
| 529 | 529 | } |
| 530 | 530 | $owner_data = substr($owner_data, 0, -1); |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | </div> |
| 544 | 544 | </div> |
| 545 | 545 | |
| 546 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 546 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 547 | 547 | <?php |
| 548 | 548 | } |
| 549 | 549 | if (!empty($flightover_array)) { |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 558 | 558 | print 'var series = ['; |
| 559 | 559 | $flightover_data = ''; |
| 560 | - foreach($flightover_array as $flightover_item) { |
|
| 560 | + foreach ($flightover_array as $flightover_item) { |
|
| 561 | 561 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
| 562 | 562 | } |
| 563 | 563 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -602,12 +602,12 @@ discard block |
||
| 602 | 602 | } |
| 603 | 603 | ?> |
| 604 | 604 | </div> |
| 605 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 605 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 606 | 606 | </div> |
| 607 | 607 | <?php |
| 608 | 608 | } |
| 609 | 609 | if ($type == 'marine') { |
| 610 | - $flightover_array = $Stats->countAllMarineOverCountries(true,$filter_name,$year,$month); |
|
| 610 | + $flightover_array = $Stats->countAllMarineOverCountries(true, $filter_name, $year, $month); |
|
| 611 | 611 | ?> |
| 612 | 612 | <!-- <div class="row column">--> |
| 613 | 613 | <div class="col-md-6"> |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 619 | 619 | print 'var series = ['; |
| 620 | 620 | $flightover_data = ''; |
| 621 | - foreach($flightover_array as $flightover_item) { |
|
| 621 | + foreach ($flightover_array as $flightover_item) { |
|
| 622 | 622 | $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
| 623 | 623 | } |
| 624 | 624 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | <div class="more"> |
| 659 | 659 | <a href="<?php print $globalURL; ?>/marine/statistics/country" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 660 | 660 | </div> |
| 661 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 661 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 662 | 662 | </div> |
| 663 | 663 | </div> |
| 664 | 664 | |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 677 | 677 | print 'var series = ['; |
| 678 | 678 | $flightover_data = ''; |
| 679 | - foreach($flightover_array as $flightover_item) { |
|
| 679 | + foreach ($flightover_array as $flightover_item) { |
|
| 680 | 680 | $flightover_data .= '[ "'.$flightover_item['tracker_country_iso3'].'",'.$flightover_item['tracker_count'].'],'; |
| 681 | 681 | } |
| 682 | 682 | $flightover_data = substr($flightover_data, 0, -1); |
@@ -726,14 +726,14 @@ discard block |
||
| 726 | 726 | <div class="row column"> |
| 727 | 727 | <div class="col-md-6"> |
| 728 | 728 | <?php |
| 729 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 729 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 730 | 730 | if (count($airport_airport_array) > 0) { |
| 731 | 731 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
| 732 | 732 | print '<div id="chart3" class="chart" width="100%"></div><script>'; |
| 733 | 733 | print "\n"; |
| 734 | 734 | print 'var series = ['; |
| 735 | 735 | $airport_data = ''; |
| 736 | - foreach($airport_airport_array as $airport_item) { |
|
| 736 | + foreach ($airport_airport_array as $airport_item) { |
|
| 737 | 737 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 738 | 738 | } |
| 739 | 739 | $airport_data = substr($airport_data, 0, -1); |
@@ -783,18 +783,18 @@ discard block |
||
| 783 | 783 | } |
| 784 | 784 | ?> |
| 785 | 785 | </div> |
| 786 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 786 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 787 | 787 | |
| 788 | 788 | <div class="col-md-6"> |
| 789 | 789 | <?php |
| 790 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 790 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 791 | 791 | if (count($airport_airport_array2) > 0) { |
| 792 | 792 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
| 793 | 793 | print '<div id="chart4" class="chart" width="100%"></div><script>'; |
| 794 | 794 | print "\n"; |
| 795 | 795 | print 'var series = ['; |
| 796 | 796 | $airport_data = ''; |
| 797 | - foreach($airport_airport_array2 as $airport_item) |
|
| 797 | + foreach ($airport_airport_array2 as $airport_item) |
|
| 798 | 798 | { |
| 799 | 799 | if (isset($airport_item['airport_arrival_longitude']) && isset($airport_item['airport_arrival_latitude'])) { |
| 800 | 800 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
@@ -848,7 +848,7 @@ discard block |
||
| 848 | 848 | ?> |
| 849 | 849 | </div> |
| 850 | 850 | </div> |
| 851 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 851 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 852 | 852 | <?php |
| 853 | 853 | } |
| 854 | 854 | if ($type == 'aircraft') { |
@@ -860,18 +860,18 @@ discard block |
||
| 860 | 860 | <div class="col-md-6"> |
| 861 | 861 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 862 | 862 | <?php |
| 863 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
| 863 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
| 864 | 864 | if (count($year_array) == 0) print _("No data available"); |
| 865 | 865 | else { |
| 866 | 866 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 867 | 867 | $year_data = ''; |
| 868 | 868 | $year_cnt = ''; |
| 869 | - foreach($year_array as $year_item) { |
|
| 869 | + foreach ($year_array as $year_item) { |
|
| 870 | 870 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 871 | 871 | $year_cnt .= $year_item['date_count'].','; |
| 872 | 872 | } |
| 873 | 873 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 874 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 874 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 875 | 875 | print 'c3.generate({ |
| 876 | 876 | bindto: "#chart8", |
| 877 | 877 | data: { x: "x", |
@@ -884,22 +884,22 @@ discard block |
||
| 884 | 884 | <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 885 | 885 | </div> |
| 886 | 886 | </div> |
| 887 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 887 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 888 | 888 | <div class="col-md-6"> |
| 889 | 889 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 890 | 890 | <?php |
| 891 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
| 891 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
| 892 | 892 | if (count($month_array) == 0) print _("No data available"); |
| 893 | 893 | else { |
| 894 | 894 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 895 | 895 | $month_data = ''; |
| 896 | 896 | $month_cnt = ''; |
| 897 | - foreach($month_array as $month_item) { |
|
| 897 | + foreach ($month_array as $month_item) { |
|
| 898 | 898 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 899 | 899 | $month_cnt .= $month_item['date_count'].','; |
| 900 | 900 | } |
| 901 | 901 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 902 | - $month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
| 902 | + $month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
| 903 | 903 | print 'c3.generate({ |
| 904 | 904 | bindto: "#chart9", |
| 905 | 905 | data: { x: "x", |
@@ -912,23 +912,23 @@ discard block |
||
| 912 | 912 | <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 913 | 913 | </div> |
| 914 | 914 | </div> |
| 915 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 915 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 916 | 916 | |
| 917 | 917 | <div class="col-md-6"> |
| 918 | 918 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 919 | 919 | <?php |
| 920 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
| 920 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
| 921 | 921 | if (empty($date_array)) print _("No data available"); |
| 922 | 922 | else { |
| 923 | 923 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 924 | 924 | $date_data = ''; |
| 925 | 925 | $date_cnt = ''; |
| 926 | - foreach($date_array as $date_item) { |
|
| 926 | + foreach ($date_array as $date_item) { |
|
| 927 | 927 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 928 | 928 | $date_cnt .= $date_item['date_count'].','; |
| 929 | 929 | } |
| 930 | 930 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 931 | - $date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
| 931 | + $date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
| 932 | 932 | print 'c3.generate({ |
| 933 | 933 | bindto: "#chart5", |
| 934 | 934 | data: { x: "x", |
@@ -941,22 +941,22 @@ discard block |
||
| 941 | 941 | <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 942 | 942 | </div> |
| 943 | 943 | </div> |
| 944 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 944 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 945 | 945 | <div class="col-md-6"> |
| 946 | 946 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 947 | 947 | <?php |
| 948 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
| 948 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
| 949 | 949 | if (empty($hour_array)) print _("No data available"); |
| 950 | 950 | else { |
| 951 | 951 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 952 | 952 | $hour_data = ''; |
| 953 | 953 | $hour_cnt = ''; |
| 954 | - foreach($hour_array as $hour_item) { |
|
| 954 | + foreach ($hour_array as $hour_item) { |
|
| 955 | 955 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 956 | 956 | $hour_cnt .= $hour_item['hour_count'].','; |
| 957 | 957 | } |
| 958 | 958 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 959 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 959 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 960 | 960 | print 'c3.generate({ |
| 961 | 961 | bindto: "#chart6", |
| 962 | 962 | data: { |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 970 | 970 | </div> |
| 971 | 971 | </div> |
| 972 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 972 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 973 | 973 | </div> |
| 974 | 974 | <?php |
| 975 | 975 | } |
@@ -985,18 +985,18 @@ discard block |
||
| 985 | 985 | <div class="col-md-6"> |
| 986 | 986 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 987 | 987 | <?php |
| 988 | - $year_array = $Stats->countAllMarineMonthsLastYear(true,$filter_name); |
|
| 988 | + $year_array = $Stats->countAllMarineMonthsLastYear(true, $filter_name); |
|
| 989 | 989 | if (count($year_array) == 0) print _("No data available"); |
| 990 | 990 | else { |
| 991 | 991 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 992 | 992 | $year_data = ''; |
| 993 | 993 | $year_cnt = ''; |
| 994 | - foreach($year_array as $year_item) { |
|
| 994 | + foreach ($year_array as $year_item) { |
|
| 995 | 995 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 996 | 996 | $year_cnt .= $year_item['date_count'].','; |
| 997 | 997 | } |
| 998 | 998 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 999 | - $year_cnt = "['vessels',".substr($year_cnt,0,-1)."]"; |
|
| 999 | + $year_cnt = "['vessels',".substr($year_cnt, 0, -1)."]"; |
|
| 1000 | 1000 | print 'c3.generate({ |
| 1001 | 1001 | bindto: "#chart8", |
| 1002 | 1002 | data: { x: "x", |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | </div> |
| 1011 | 1011 | </div> |
| 1012 | 1012 | |
| 1013 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1013 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1014 | 1014 | <div class="col-md-6"> |
| 1015 | 1015 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 1016 | 1016 | <?php |
@@ -1020,12 +1020,12 @@ discard block |
||
| 1020 | 1020 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 1021 | 1021 | $month_data = ''; |
| 1022 | 1022 | $month_cnt = ''; |
| 1023 | - foreach($month_array as $month_item) { |
|
| 1023 | + foreach ($month_array as $month_item) { |
|
| 1024 | 1024 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 1025 | 1025 | $month_cnt .= $month_item['date_count'].','; |
| 1026 | 1026 | } |
| 1027 | 1027 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 1028 | - $month_cnt = "['vessels',".substr($month_cnt,0,-1)."]"; |
|
| 1028 | + $month_cnt = "['vessels',".substr($month_cnt, 0, -1)."]"; |
|
| 1029 | 1029 | print 'c3.generate({ |
| 1030 | 1030 | bindto: "#chart9", |
| 1031 | 1031 | data: { x: "x", |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | <a href="<?php print $globalURL; ?>/marine/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1039 | 1039 | </div> |
| 1040 | 1040 | </div> |
| 1041 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1041 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1042 | 1042 | |
| 1043 | 1043 | <div class="col-md-6"> |
| 1044 | 1044 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1049,12 +1049,12 @@ discard block |
||
| 1049 | 1049 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 1050 | 1050 | $date_data = ''; |
| 1051 | 1051 | $date_cnt = ''; |
| 1052 | - foreach($date_array as $date_item) { |
|
| 1052 | + foreach ($date_array as $date_item) { |
|
| 1053 | 1053 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 1054 | 1054 | $date_cnt .= $date_item['date_count'].','; |
| 1055 | 1055 | } |
| 1056 | 1056 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 1057 | - $date_cnt = "['vessels',".substr($date_cnt,0,-1)."]"; |
|
| 1057 | + $date_cnt = "['vessels',".substr($date_cnt, 0, -1)."]"; |
|
| 1058 | 1058 | print 'c3.generate({ |
| 1059 | 1059 | bindto: "#chart5", |
| 1060 | 1060 | data: { x: "x", |
@@ -1067,22 +1067,22 @@ discard block |
||
| 1067 | 1067 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1068 | 1068 | </div> |
| 1069 | 1069 | </div> |
| 1070 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1070 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1071 | 1071 | <div class="col-md-6"> |
| 1072 | 1072 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 1073 | 1073 | <?php |
| 1074 | - $hour_array = $Stats->countAllMarineHours('hour',true,$filter_name); |
|
| 1074 | + $hour_array = $Stats->countAllMarineHours('hour', true, $filter_name); |
|
| 1075 | 1075 | if (empty($hour_array)) print _("No data available"); |
| 1076 | 1076 | else { |
| 1077 | 1077 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 1078 | 1078 | $hour_data = ''; |
| 1079 | 1079 | $hour_cnt = ''; |
| 1080 | - foreach($hour_array as $hour_item) { |
|
| 1080 | + foreach ($hour_array as $hour_item) { |
|
| 1081 | 1081 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 1082 | 1082 | $hour_cnt .= $hour_item['hour_count'].','; |
| 1083 | 1083 | } |
| 1084 | 1084 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 1085 | - $hour_cnt = "['vessels',".substr($hour_cnt,0,-1)."]"; |
|
| 1085 | + $hour_cnt = "['vessels',".substr($hour_cnt, 0, -1)."]"; |
|
| 1086 | 1086 | print 'c3.generate({ |
| 1087 | 1087 | bindto: "#chart6", |
| 1088 | 1088 | data: { |
@@ -1095,7 +1095,7 @@ discard block |
||
| 1095 | 1095 | <a href="<?php print $globalURL; ?>/marine/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1096 | 1096 | </div> |
| 1097 | 1097 | </div> |
| 1098 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1098 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1099 | 1099 | </div> |
| 1100 | 1100 | <?php |
| 1101 | 1101 | } |
@@ -1117,12 +1117,12 @@ discard block |
||
| 1117 | 1117 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 1118 | 1118 | $year_data = ''; |
| 1119 | 1119 | $year_cnt = ''; |
| 1120 | - foreach($year_array as $year_item) { |
|
| 1120 | + foreach ($year_array as $year_item) { |
|
| 1121 | 1121 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 1122 | 1122 | $year_cnt .= $year_item['date_count'].','; |
| 1123 | 1123 | } |
| 1124 | 1124 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1125 | - $year_cnt = "['trackers',".substr($year_cnt,0,-1)."]"; |
|
| 1125 | + $year_cnt = "['trackers',".substr($year_cnt, 0, -1)."]"; |
|
| 1126 | 1126 | print 'c3.generate({ |
| 1127 | 1127 | bindto: "#chart8", |
| 1128 | 1128 | data: { x: "x", |
@@ -1136,7 +1136,7 @@ discard block |
||
| 1136 | 1136 | </div> |
| 1137 | 1137 | </div> |
| 1138 | 1138 | |
| 1139 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1139 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1140 | 1140 | <div class="col-md-6"> |
| 1141 | 1141 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 1142 | 1142 | <?php |
@@ -1146,12 +1146,12 @@ discard block |
||
| 1146 | 1146 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 1147 | 1147 | $month_data = ''; |
| 1148 | 1148 | $month_cnt = ''; |
| 1149 | - foreach($month_array as $month_item) { |
|
| 1149 | + foreach ($month_array as $month_item) { |
|
| 1150 | 1150 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 1151 | 1151 | $month_cnt .= $month_item['date_count'].','; |
| 1152 | 1152 | } |
| 1153 | 1153 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 1154 | - $month_cnt = "['trackers',".substr($month_cnt,0,-1)."]"; |
|
| 1154 | + $month_cnt = "['trackers',".substr($month_cnt, 0, -1)."]"; |
|
| 1155 | 1155 | print 'c3.generate({ |
| 1156 | 1156 | bindto: "#chart9", |
| 1157 | 1157 | data: { x: "x", |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | <a href="<?php print $globalURL; ?>/tracker/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1165 | 1165 | </div> |
| 1166 | 1166 | </div> |
| 1167 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1167 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1168 | 1168 | |
| 1169 | 1169 | <div class="col-md-6"> |
| 1170 | 1170 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1175,12 +1175,12 @@ discard block |
||
| 1175 | 1175 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 1176 | 1176 | $date_data = ''; |
| 1177 | 1177 | $date_cnt = ''; |
| 1178 | - foreach($date_array as $date_item) { |
|
| 1178 | + foreach ($date_array as $date_item) { |
|
| 1179 | 1179 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 1180 | 1180 | $date_cnt .= $date_item['date_count'].','; |
| 1181 | 1181 | } |
| 1182 | 1182 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 1183 | - $date_cnt = "['trackers',".substr($date_cnt,0,-1)."]"; |
|
| 1183 | + $date_cnt = "['trackers',".substr($date_cnt, 0, -1)."]"; |
|
| 1184 | 1184 | print 'c3.generate({ |
| 1185 | 1185 | bindto: "#chart5", |
| 1186 | 1186 | data: { x: "x", |
@@ -1193,22 +1193,22 @@ discard block |
||
| 1193 | 1193 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1194 | 1194 | </div> |
| 1195 | 1195 | </div> |
| 1196 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1196 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1197 | 1197 | <div class="col-md-6"> |
| 1198 | 1198 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 1199 | 1199 | <?php |
| 1200 | - $hour_array = $Stats->countAllTrackerHours('hour',true); |
|
| 1200 | + $hour_array = $Stats->countAllTrackerHours('hour', true); |
|
| 1201 | 1201 | if (empty($hour_array)) print _("No data available"); |
| 1202 | 1202 | else { |
| 1203 | 1203 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 1204 | 1204 | $hour_data = ''; |
| 1205 | 1205 | $hour_cnt = ''; |
| 1206 | - foreach($hour_array as $hour_item) { |
|
| 1206 | + foreach ($hour_array as $hour_item) { |
|
| 1207 | 1207 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 1208 | 1208 | $hour_cnt .= $hour_item['hour_count'].','; |
| 1209 | 1209 | } |
| 1210 | 1210 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 1211 | - $hour_cnt = "['trackers',".substr($hour_cnt,0,-1)."]"; |
|
| 1211 | + $hour_cnt = "['trackers',".substr($hour_cnt, 0, -1)."]"; |
|
| 1212 | 1212 | print 'c3.generate({ |
| 1213 | 1213 | bindto: "#chart6", |
| 1214 | 1214 | data: { |
@@ -1221,7 +1221,7 @@ discard block |
||
| 1221 | 1221 | <a href="<?php print $globalURL; ?>/tracker/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1222 | 1222 | </div> |
| 1223 | 1223 | </div> |
| 1224 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1224 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1225 | 1225 | </div> |
| 1226 | 1226 | <?php |
| 1227 | 1227 | } |
@@ -1243,12 +1243,12 @@ discard block |
||
| 1243 | 1243 | print '<div id="chart21" class="chart" width="100%"></div><script>'; |
| 1244 | 1244 | $year_data = ''; |
| 1245 | 1245 | $year_cnt = ''; |
| 1246 | - foreach($year_array as $year_item) { |
|
| 1246 | + foreach ($year_array as $year_item) { |
|
| 1247 | 1247 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 1248 | 1248 | $year_cnt .= $year_item['date_count'].','; |
| 1249 | 1249 | } |
| 1250 | 1250 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1251 | - $year_cnt = "['satellite',".substr($year_cnt,0,-1)."]"; |
|
| 1251 | + $year_cnt = "['satellite',".substr($year_cnt, 0, -1)."]"; |
|
| 1252 | 1252 | print 'c3.generate({ |
| 1253 | 1253 | bindto: "#chart21", |
| 1254 | 1254 | data: { x: "x", |
@@ -1264,7 +1264,7 @@ discard block |
||
| 1264 | 1264 | --> |
| 1265 | 1265 | </div> |
| 1266 | 1266 | |
| 1267 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1267 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1268 | 1268 | <div class="col-md-6"> |
| 1269 | 1269 | <h2><?php echo _("Busiest Launch Years of the last 10 Years"); ?></h2> |
| 1270 | 1270 | <?php |
@@ -1274,12 +1274,12 @@ discard block |
||
| 1274 | 1274 | print '<div id="chart22" class="chart" width="100%"></div><script>'; |
| 1275 | 1275 | $year_data = ''; |
| 1276 | 1276 | $year_cnt = ''; |
| 1277 | - foreach($year_array as $year_item) { |
|
| 1277 | + foreach ($year_array as $year_item) { |
|
| 1278 | 1278 | $year_data .= '"'.$year_item['year_name'].'-01-01'.'",'; |
| 1279 | 1279 | $year_cnt .= $year_item['date_count'].','; |
| 1280 | 1280 | } |
| 1281 | 1281 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1282 | - $year_cnt = "['satellite',".substr($year_cnt,0,-1)."]"; |
|
| 1282 | + $year_cnt = "['satellite',".substr($year_cnt, 0, -1)."]"; |
|
| 1283 | 1283 | print 'c3.generate({ |
| 1284 | 1284 | bindto: "#chart22", |
| 1285 | 1285 | data: { x: "x", |
@@ -1295,7 +1295,7 @@ discard block |
||
| 1295 | 1295 | --> |
| 1296 | 1296 | </div> |
| 1297 | 1297 | |
| 1298 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1298 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1299 | 1299 | </div> |
| 1300 | 1300 | <?php |
| 1301 | 1301 | } |
@@ -1317,12 +1317,12 @@ discard block |
||
| 1317 | 1317 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
| 1318 | 1318 | $year_data = ''; |
| 1319 | 1319 | $year_cnt = ''; |
| 1320 | - foreach($year_array as $year_item) { |
|
| 1320 | + foreach ($year_array as $year_item) { |
|
| 1321 | 1321 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
| 1322 | 1322 | $year_cnt .= $year_item['count'].','; |
| 1323 | 1323 | } |
| 1324 | 1324 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1325 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 1325 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 1326 | 1326 | print 'c3.generate({ |
| 1327 | 1327 | bindto: "#chart32", |
| 1328 | 1328 | data: { x: "x", |
@@ -1335,7 +1335,7 @@ discard block |
||
| 1335 | 1335 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1336 | 1336 | </div> |
| 1337 | 1337 | </div> |
| 1338 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1338 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1339 | 1339 | |
| 1340 | 1340 | <div class="row column"> |
| 1341 | 1341 | <div class="col-md-6"> |
@@ -1347,12 +1347,12 @@ discard block |
||
| 1347 | 1347 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
| 1348 | 1348 | $year_data = ''; |
| 1349 | 1349 | $year_cnt = ''; |
| 1350 | - foreach($year_array as $year_item) { |
|
| 1350 | + foreach ($year_array as $year_item) { |
|
| 1351 | 1351 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
| 1352 | 1352 | $year_cnt .= $year_item['count'].','; |
| 1353 | 1353 | } |
| 1354 | 1354 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1355 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 1355 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 1356 | 1356 | print 'c3.generate({ |
| 1357 | 1357 | bindto: "#chart33", |
| 1358 | 1358 | data: { x: "x", |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1366 | 1366 | </div> |
| 1367 | 1367 | </div> |
| 1368 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1368 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1369 | 1369 | <br/> |
| 1370 | 1370 | <?php |
| 1371 | 1371 | } |
@@ -1379,19 +1379,19 @@ discard block |
||
| 1379 | 1379 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
| 1380 | 1380 | if ($year == '' && $month == '') { |
| 1381 | 1381 | if ($type == 'aircraft') { |
| 1382 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
| 1382 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
| 1383 | 1383 | } elseif ($type == 'marine') { |
| 1384 | - $polar = $Stats->getStatsSource('polar_marine',date('Y'),date('m'),date('d')); |
|
| 1384 | + $polar = $Stats->getStatsSource('polar_marine', date('Y'), date('m'), date('d')); |
|
| 1385 | 1385 | } elseif ($type == 'tracker') { |
| 1386 | - $polar = $Stats->getStatsSource('polar_tracker',date('Y'),date('m'),date('d')); |
|
| 1386 | + $polar = $Stats->getStatsSource('polar_tracker', date('Y'), date('m'), date('d')); |
|
| 1387 | 1387 | } |
| 1388 | 1388 | } else { |
| 1389 | 1389 | if ($type == 'aircraft') { |
| 1390 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
| 1390 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
| 1391 | 1391 | } elseif ($type == 'marine') { |
| 1392 | - $polar = $Stats->getStatsSource('polar_marine',$year,$month); |
|
| 1392 | + $polar = $Stats->getStatsSource('polar_marine', $year, $month); |
|
| 1393 | 1393 | } elseif ($type == 'tracker') { |
| 1394 | - $polar = $Stats->getStatsSource('polar_tracker',$year,$month); |
|
| 1394 | + $polar = $Stats->getStatsSource('polar_tracker', $year, $month); |
|
| 1395 | 1395 | } |
| 1396 | 1396 | } |
| 1397 | 1397 | if (!empty($polar)) { |
@@ -1400,7 +1400,7 @@ discard block |
||
| 1400 | 1400 | unset($polar_data); |
| 1401 | 1401 | $Spotter = new Spotter(); |
| 1402 | 1402 | $data = json_decode($eachpolar['source_data']); |
| 1403 | - foreach($data as $value => $key) { |
|
| 1403 | + foreach ($data as $value => $key) { |
|
| 1404 | 1404 | $direction = $Spotter->parseDirection(($value*22.5)); |
| 1405 | 1405 | $distance = $key; |
| 1406 | 1406 | $unit = 'km'; |
@@ -1420,7 +1420,7 @@ discard block |
||
| 1420 | 1420 | ?> |
| 1421 | 1421 | <div class="col-md-6"> |
| 1422 | 1422 | <h4><?php print $eachpolar['source_name']; ?></h4> |
| 1423 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
| 1423 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
| 1424 | 1424 | <script> |
| 1425 | 1425 | (function() { |
| 1426 | 1426 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -1444,7 +1444,7 @@ discard block |
||
| 1444 | 1444 | color: color, |
| 1445 | 1445 | unit: '<?php echo $unit; ?>' |
| 1446 | 1446 | }; |
| 1447 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
| 1447 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
| 1448 | 1448 | })(); |
| 1449 | 1449 | </script> |
| 1450 | 1450 | </div> |
@@ -1459,19 +1459,19 @@ discard block |
||
| 1459 | 1459 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
| 1460 | 1460 | if ($year == '' && $month == '') { |
| 1461 | 1461 | if ($type == 'aircraft') { |
| 1462 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
| 1462 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
| 1463 | 1463 | } elseif ($type == 'marine') { |
| 1464 | - $msg = $Stats->getStatsSource('msg_marine',date('Y'),date('m'),date('d')); |
|
| 1464 | + $msg = $Stats->getStatsSource('msg_marine', date('Y'), date('m'), date('d')); |
|
| 1465 | 1465 | } elseif ($type == 'tracker') { |
| 1466 | - $msg = $Stats->getStatsSource('msg_tracker',date('Y'),date('m'),date('d')); |
|
| 1466 | + $msg = $Stats->getStatsSource('msg_tracker', date('Y'), date('m'), date('d')); |
|
| 1467 | 1467 | } |
| 1468 | 1468 | } else { |
| 1469 | 1469 | if ($type == 'aircraft') { |
| 1470 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
| 1470 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
| 1471 | 1471 | } elseif ($type == 'marine') { |
| 1472 | - $msg = $Stats->getStatsSource('msg_marine',$year,$month); |
|
| 1472 | + $msg = $Stats->getStatsSource('msg_marine', $year, $month); |
|
| 1473 | 1473 | } elseif ($type == 'tracker') { |
| 1474 | - $msg = $Stats->getStatsSource('msg_tracker',$year,$month); |
|
| 1474 | + $msg = $Stats->getStatsSource('msg_tracker', $year, $month); |
|
| 1475 | 1475 | } |
| 1476 | 1476 | } |
| 1477 | 1477 | if (!empty($msg)) { |
@@ -1479,13 +1479,13 @@ discard block |
||
| 1479 | 1479 | foreach ($msg as $eachmsg) { |
| 1480 | 1480 | //$eachmsg = $msg[0]; |
| 1481 | 1481 | $data = $eachmsg['source_data']; |
| 1482 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
| 1482 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
| 1483 | 1483 | else $max = 500; |
| 1484 | 1484 | ?> |
| 1485 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
| 1485 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
| 1486 | 1486 | <script> |
| 1487 | 1487 | var g = new JustGage({ |
| 1488 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
| 1488 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
| 1489 | 1489 | value: <?php echo $data; ?>, |
| 1490 | 1490 | min: 0, |
| 1491 | 1491 | max: <?php print $max; ?>, |
@@ -1507,19 +1507,19 @@ discard block |
||
| 1507 | 1507 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
| 1508 | 1508 | if ($year == '' && $month == '') { |
| 1509 | 1509 | if ($type == 'aircraft') { |
| 1510 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
| 1510 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
| 1511 | 1511 | } elseif ($type == 'marine') { |
| 1512 | - $hist = $Stats->getStatsSource('hist_marine',date('Y'),date('m'),date('d')); |
|
| 1512 | + $hist = $Stats->getStatsSource('hist_marine', date('Y'), date('m'), date('d')); |
|
| 1513 | 1513 | } elseif ($type == 'tracker') { |
| 1514 | - $hist = $Stats->getStatsSource('hist_tracker',date('Y'),date('m'),date('d')); |
|
| 1514 | + $hist = $Stats->getStatsSource('hist_tracker', date('Y'), date('m'), date('d')); |
|
| 1515 | 1515 | } |
| 1516 | 1516 | } else { |
| 1517 | 1517 | if ($type == 'aircraft') { |
| 1518 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
| 1518 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
| 1519 | 1519 | } elseif ($type == 'marine') { |
| 1520 | - $hist = $Stats->getStatsSource('hist_marine',$year,$month); |
|
| 1520 | + $hist = $Stats->getStatsSource('hist_marine', $year, $month); |
|
| 1521 | 1521 | } elseif ($type == 'tracker') { |
| 1522 | - $hist = $Stats->getStatsSource('hist_tracker',$year,$month); |
|
| 1522 | + $hist = $Stats->getStatsSource('hist_tracker', $year, $month); |
|
| 1523 | 1523 | } |
| 1524 | 1524 | } |
| 1525 | 1525 | foreach ($hist as $hists) { |
@@ -1529,7 +1529,7 @@ discard block |
||
| 1529 | 1529 | $source = $hists['source_name']; |
| 1530 | 1530 | $hist_array = json_decode($hists['source_data']); |
| 1531 | 1531 | $unit = 'km'; |
| 1532 | - foreach($hist_array as $distance => $nb) { |
|
| 1532 | + foreach ($hist_array as $distance => $nb) { |
|
| 1533 | 1533 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 1534 | 1534 | $distance = round($distance*0.539957); |
| 1535 | 1535 | $unit = 'nm'; |
@@ -1549,18 +1549,18 @@ discard block |
||
| 1549 | 1549 | $nb_data = "['flights',".substr($nb_data, 0, -1)."]"; |
| 1550 | 1550 | ?> |
| 1551 | 1551 | <div class="col-md-6"> |
| 1552 | - <h2><?php echo sprintf(_("Distance for %s"),$source); ?></h2> |
|
| 1552 | + <h2><?php echo sprintf(_("Distance for %s"), $source); ?></h2> |
|
| 1553 | 1553 | <?php |
| 1554 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
| 1554 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
| 1555 | 1555 | print 'c3.generate({ |
| 1556 | - bindto: "#charthist-'.str_replace(' ','_',strtolower($source)).'", |
|
| 1556 | + bindto: "#charthist-'.str_replace(' ', '_', strtolower($source)).'", |
|
| 1557 | 1557 | data: { x: "x", |
| 1558 | 1558 | columns: ['.$distance_data.','.$nb_data.'], types: { flights: "area"}, colors: { flights: "#1a3151"}}, |
| 1559 | 1559 | axis: { x: {label : { text: "Distance in '.$unit.'", position: "outer-right"}}, y: { label: "# of Flights"}},legend: { show: false }});'; |
| 1560 | 1560 | print '</script>'; |
| 1561 | 1561 | ?> |
| 1562 | 1562 | </div> |
| 1563 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1563 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1564 | 1564 | <?php |
| 1565 | 1565 | } |
| 1566 | 1566 | ?> |
@@ -267,16 +267,16 @@ discard block |
||
| 267 | 267 | <div class="more"> |
| 268 | 268 | <?php |
| 269 | 269 | |
| 270 | - if ($year != '' && $month != '') { |
|
| 271 | - ?> |
|
| 270 | + if ($year != '' && $month != '') { |
|
| 271 | + ?> |
|
| 272 | 272 | <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 273 | 273 | <?php |
| 274 | - } else { |
|
| 275 | - ?> |
|
| 274 | + } else { |
|
| 275 | + ?> |
|
| 276 | 276 | <a href="<?php print $globalURL; ?>/marine/statistics/type" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 277 | 277 | <?php |
| 278 | - } |
|
| 279 | - ?> |
|
| 278 | + } |
|
| 279 | + ?> |
|
| 280 | 280 | </div> |
| 281 | 281 | </div> |
| 282 | 282 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -308,16 +308,16 @@ discard block |
||
| 308 | 308 | ?> |
| 309 | 309 | <div class="more"> |
| 310 | 310 | <?php |
| 311 | - if ($year != '' && $month != '') { |
|
| 312 | - ?> |
|
| 311 | + if ($year != '' && $month != '') { |
|
| 312 | + ?> |
|
| 313 | 313 | <a href="<?php print $globalURL; ?>/marine/statistics/race/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 314 | 314 | <?php |
| 315 | - } else { |
|
| 316 | - ?> |
|
| 315 | + } else { |
|
| 316 | + ?> |
|
| 317 | 317 | <a href="<?php print $globalURL; ?>/marine/statistics/race" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 318 | 318 | <?php |
| 319 | - } |
|
| 320 | - ?> |
|
| 319 | + } |
|
| 320 | + ?> |
|
| 321 | 321 | </div> |
| 322 | 322 | </div> |
| 323 | 323 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | ?> |
| 355 | 355 | <div class="more"> |
| 356 | 356 | <?php |
| 357 | - /* |
|
| 357 | + /* |
|
| 358 | 358 | if ($year != '' && $month != '') { |
| 359 | 359 | ?> |
| 360 | 360 | <a href="<?php print $globalURL; ?>/tracker/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | <?php |
| 366 | 366 | } |
| 367 | 367 | */ |
| 368 | - ?> |
|
| 368 | + ?> |
|
| 369 | 369 | </div> |
| 370 | 370 | </div> |
| 371 | 371 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -91,32 +91,32 @@ |
||
| 91 | 91 | $limit_previous_2 = $limit_end - $absolute_difference; |
| 92 | 92 | |
| 93 | 93 | if ( |
| 94 | - (isset($_GET['q']) && $_GET['q'] != '') || |
|
| 95 | - (isset($_GET['registration']) && $_GET['registration'] != '') || |
|
| 96 | - (isset($_GET['aircraft']) && $_GET['aircraft'] != '') || |
|
| 97 | - (isset($_GET['manufacturer']) && $_GET['manufacturer'] != '') || |
|
| 98 | - (isset($_GET['highlights']) && $_GET['highlights'] != '') || |
|
| 99 | - (isset($_GET['airline']) && $_GET['airline'] != '') || |
|
| 100 | - (isset($_GET['airline_country']) && $_GET['airline_country'] != '') || |
|
| 101 | - (isset($_GET['airline_type']) && $_GET['airline_type'] != '') || |
|
| 102 | - (isset($_GET['airport']) && $_GET['airport'] != '') || |
|
| 103 | - (isset($_GET['airport_country']) && $_GET['airport_country'] != '') || |
|
| 104 | - (isset($_GET['callsign']) && $_GET['callsign'] != '') || |
|
| 105 | - (isset($_GET['captain_id']) && $_GET['captain_id'] != '') || |
|
| 106 | - (isset($_GET['race_id']) && $_GET['race_id'] != '') || |
|
| 107 | - (isset($_GET['captain_name']) && $_GET['captain_name'] != '') || |
|
| 108 | - (isset($_GET['race_name']) && $_GET['race_name'] != '') || |
|
| 109 | - (isset($_GET['owner']) && $_GET['owner'] != '') || |
|
| 110 | - (isset($_GET['pilot_name']) && $_GET['pilot_name'] != '') || |
|
| 111 | - (isset($_GET['pilot_id']) && $_GET['pilot_id'] != '') || |
|
| 112 | - (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != '') || |
|
| 113 | - (isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != '') || |
|
| 114 | - (isset($_GET['mmsi']) && $_GET['mmsi'] != '') || |
|
| 115 | - (isset($_GET['imo']) && $_GET['imo'] != '') || |
|
| 116 | - ((isset($_GET['origlat']) && $_GET['origlat'] != '') && |
|
| 117 | - (isset($_GET['origlon']) && $_GET['origlon'] != '') && |
|
| 118 | - (isset($_GET['dist']) && $_GET['dist'] != '')) |
|
| 119 | - ){ |
|
| 94 | + (isset($_GET['q']) && $_GET['q'] != '') || |
|
| 95 | + (isset($_GET['registration']) && $_GET['registration'] != '') || |
|
| 96 | + (isset($_GET['aircraft']) && $_GET['aircraft'] != '') || |
|
| 97 | + (isset($_GET['manufacturer']) && $_GET['manufacturer'] != '') || |
|
| 98 | + (isset($_GET['highlights']) && $_GET['highlights'] != '') || |
|
| 99 | + (isset($_GET['airline']) && $_GET['airline'] != '') || |
|
| 100 | + (isset($_GET['airline_country']) && $_GET['airline_country'] != '') || |
|
| 101 | + (isset($_GET['airline_type']) && $_GET['airline_type'] != '') || |
|
| 102 | + (isset($_GET['airport']) && $_GET['airport'] != '') || |
|
| 103 | + (isset($_GET['airport_country']) && $_GET['airport_country'] != '') || |
|
| 104 | + (isset($_GET['callsign']) && $_GET['callsign'] != '') || |
|
| 105 | + (isset($_GET['captain_id']) && $_GET['captain_id'] != '') || |
|
| 106 | + (isset($_GET['race_id']) && $_GET['race_id'] != '') || |
|
| 107 | + (isset($_GET['captain_name']) && $_GET['captain_name'] != '') || |
|
| 108 | + (isset($_GET['race_name']) && $_GET['race_name'] != '') || |
|
| 109 | + (isset($_GET['owner']) && $_GET['owner'] != '') || |
|
| 110 | + (isset($_GET['pilot_name']) && $_GET['pilot_name'] != '') || |
|
| 111 | + (isset($_GET['pilot_id']) && $_GET['pilot_id'] != '') || |
|
| 112 | + (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != '') || |
|
| 113 | + (isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != '') || |
|
| 114 | + (isset($_GET['mmsi']) && $_GET['mmsi'] != '') || |
|
| 115 | + (isset($_GET['imo']) && $_GET['imo'] != '') || |
|
| 116 | + ((isset($_GET['origlat']) && $_GET['origlat'] != '') && |
|
| 117 | + (isset($_GET['origlon']) && $_GET['origlon'] != '') && |
|
| 118 | + (isset($_GET['dist']) && $_GET['dist'] != '')) |
|
| 119 | + ){ |
|
| 120 | 120 | $q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING); |
| 121 | 121 | $registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING); |
| 122 | 122 | $aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING); |
@@ -26,24 +26,24 @@ discard block |
||
| 26 | 26 | $sql_date = ''; |
| 27 | 27 | if (isset($_GET['start_date'])) { |
| 28 | 28 | //for the date manipulation into the query |
| 29 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 29 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
| 30 | 30 | if (strtotime($_GET['start_date']) !== false && strtotime($_GET['end_date']) !== false) { |
| 31 | 31 | //$start_date = $_GET['start_date']." 00:00:00"; |
| 32 | - $start_date = date("Y-m-d",strtotime($_GET['start_date']))." 00:00:00"; |
|
| 32 | + $start_date = date("Y-m-d", strtotime($_GET['start_date']))." 00:00:00"; |
|
| 33 | 33 | //$end_date = $_GET['end_date']." 00:00:00"; |
| 34 | - $end_date = date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
|
| 34 | + $end_date = date("Y-m-d", strtotime($_GET['end_date']))." 00:00:00"; |
|
| 35 | 35 | $sql_date = $start_date.",".$end_date; |
| 36 | 36 | } |
| 37 | - } else if($_GET['start_date'] != ""){ |
|
| 37 | + } else if ($_GET['start_date'] != "") { |
|
| 38 | 38 | if (strtotime($_GET['start_date']) !== false) { |
| 39 | 39 | //$start_date = $_GET['start_date']." 00:00:00"; |
| 40 | - $start_date = date("Y-m-d",strtotime($_GET['start_date']))." 00:00:00"; |
|
| 40 | + $start_date = date("Y-m-d", strtotime($_GET['start_date']))." 00:00:00"; |
|
| 41 | 41 | $sql_date = $start_date; |
| 42 | 42 | } |
| 43 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 43 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
| 44 | 44 | if (strtotime($_GET['end_date']) !== false) { |
| 45 | 45 | //$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00"; |
| 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"; |
|
| 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 | 49 | } else $sql_date = ''; |
@@ -51,21 +51,21 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if (isset($_GET['highest_altitude'])) { |
| 53 | 53 | //for altitude manipulation |
| 54 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 55 | - $end_altitude = filter_input(INPUT_GET,'highest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
| 56 | - $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
| 54 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
| 55 | + $end_altitude = filter_input(INPUT_GET, 'highest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
| 56 | + $start_altitude = filter_input(INPUT_GET, 'lowest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
| 57 | 57 | $sql_altitude = $start_altitude.",".$end_altitude; |
| 58 | - } else if($_GET['highest_altitude'] != ""){ |
|
| 59 | - $end_altitude = filter_input(INPUT_GET,'highest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
| 58 | + } else if ($_GET['highest_altitude'] != "") { |
|
| 59 | + $end_altitude = filter_input(INPUT_GET, 'highest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
| 60 | 60 | $sql_altitude = $end_altitude; |
| 61 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 62 | - $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
|
| 61 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
| 62 | + $start_altitude = filter_input(INPUT_GET, 'lowest_altitude', FILTER_SANITIZE_NUMBER_INT).",60000"; |
|
| 63 | 63 | $sql_altitude = $start_altitude; |
| 64 | 64 | } else $sql_altitude = ''; |
| 65 | 65 | } else $sql_altitude = ''; |
| 66 | 66 | |
| 67 | 67 | //calculuation for the pagination |
| 68 | -if(!isset($_GET['limit'])) |
|
| 68 | +if (!isset($_GET['limit'])) |
|
| 69 | 69 | { |
| 70 | 70 | if (!isset($_GET['number_results'])) |
| 71 | 71 | { |
@@ -73,17 +73,17 @@ discard block |
||
| 73 | 73 | $limit_end = 25; |
| 74 | 74 | $absolute_difference = 25; |
| 75 | 75 | } else { |
| 76 | - if ($_GET['number_results'] > 1000){ |
|
| 76 | + if ($_GET['number_results'] > 1000) { |
|
| 77 | 77 | $_GET['number_results'] = 1000; |
| 78 | 78 | } |
| 79 | 79 | $limit_start = 0; |
| 80 | - $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
| 81 | - $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
| 80 | + $limit_end = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
| 81 | + $absolute_difference = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
| 82 | 82 | } |
| 83 | -} else { |
|
| 83 | +} else { |
|
| 84 | 84 | $limit_explode = explode(",", $_GET['limit']); |
| 85 | - $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
|
| 86 | - $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
|
| 85 | + $limit_start = filter_var($limit_explode[0], FILTER_SANITIZE_NUMBER_INT); |
|
| 86 | + $limit_end = filter_var($limit_explode[1], FILTER_SANITIZE_NUMBER_INT); |
|
| 87 | 87 | } |
| 88 | 88 | $absolute_difference = abs($limit_start - $limit_end); |
| 89 | 89 | $limit_next = $limit_end + $absolute_difference; |
@@ -116,35 +116,35 @@ discard block |
||
| 116 | 116 | ((isset($_GET['origlat']) && $_GET['origlat'] != '') && |
| 117 | 117 | (isset($_GET['origlon']) && $_GET['origlon'] != '') && |
| 118 | 118 | (isset($_GET['dist']) && $_GET['dist'] != '')) |
| 119 | - ){ |
|
| 120 | - $q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING); |
|
| 121 | - $registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING); |
|
| 122 | - $aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING); |
|
| 123 | - $manufacturer = filter_input(INPUT_GET, 'manufacturer',FILTER_SANITIZE_STRING); |
|
| 124 | - $highlights = filter_input(INPUT_GET, 'highlights',FILTER_SANITIZE_STRING); |
|
| 125 | - $airline = filter_input(INPUT_GET, 'airline',FILTER_SANITIZE_STRING); |
|
| 126 | - $airline_country = filter_input(INPUT_GET, 'airline_country',FILTER_SANITIZE_STRING); |
|
| 127 | - $airline_type = filter_input(INPUT_GET, 'airline_type',FILTER_SANITIZE_STRING); |
|
| 128 | - $airport = filter_input(INPUT_GET, 'airport',FILTER_SANITIZE_STRING); |
|
| 129 | - $airport_country = filter_input(INPUT_GET, 'airport_country',FILTER_SANITIZE_STRING); |
|
| 130 | - $callsign = filter_input(INPUT_GET, 'callsign',FILTER_SANITIZE_STRING); |
|
| 131 | - $owner = filter_input(INPUT_GET, 'owner',FILTER_SANITIZE_STRING); |
|
| 132 | - $pilot_name = filter_input(INPUT_GET, 'pilot_name',FILTER_SANITIZE_STRING); |
|
| 133 | - $pilot_id = filter_input(INPUT_GET, 'pilot_id',FILTER_SANITIZE_STRING); |
|
| 134 | - $mmsi = filter_input(INPUT_GET, 'mmsi',FILTER_SANITIZE_NUMBER_INT); |
|
| 135 | - $imo = filter_input(INPUT_GET, 'imo',FILTER_SANITIZE_NUMBER_INT); |
|
| 136 | - $captain_id = filter_input(INPUT_GET, 'captain_id',FILTER_SANITIZE_NUMBER_INT); |
|
| 137 | - $race_id = filter_input(INPUT_GET, 'race_id',FILTER_SANITIZE_NUMBER_INT); |
|
| 138 | - $captain_name = filter_input(INPUT_GET, 'captain_name',FILTER_SANITIZE_STRING); |
|
| 139 | - $race_name = filter_input(INPUT_GET, 'race_name',FILTER_SANITIZE_STRING); |
|
| 140 | - $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route',FILTER_SANITIZE_STRING); |
|
| 141 | - $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
| 142 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 143 | - $archive = filter_input(INPUT_GET,'archive',FILTER_SANITIZE_NUMBER_INT); |
|
| 144 | - $origlat = filter_input(INPUT_GET,'origlat',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 145 | - $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 146 | - $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
|
| 147 | - $number_results = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
| 119 | + ) { |
|
| 120 | + $q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
| 121 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
| 122 | + $aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
| 123 | + $manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
| 124 | + $highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
| 125 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 126 | + $airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
| 127 | + $airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 128 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 129 | + $airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
| 130 | + $callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
| 131 | + $owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 132 | + $pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
| 133 | + $pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
| 134 | + $mmsi = filter_input(INPUT_GET, 'mmsi', FILTER_SANITIZE_NUMBER_INT); |
|
| 135 | + $imo = filter_input(INPUT_GET, 'imo', FILTER_SANITIZE_NUMBER_INT); |
|
| 136 | + $captain_id = filter_input(INPUT_GET, 'captain_id', FILTER_SANITIZE_NUMBER_INT); |
|
| 137 | + $race_id = filter_input(INPUT_GET, 'race_id', FILTER_SANITIZE_NUMBER_INT); |
|
| 138 | + $captain_name = filter_input(INPUT_GET, 'captain_name', FILTER_SANITIZE_STRING); |
|
| 139 | + $race_name = filter_input(INPUT_GET, 'race_name', FILTER_SANITIZE_STRING); |
|
| 140 | + $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
| 141 | + $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
| 142 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 143 | + $archive = filter_input(INPUT_GET, 'archive', FILTER_SANITIZE_NUMBER_INT); |
|
| 144 | + $origlat = filter_input(INPUT_GET, 'origlat', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 145 | + $origlon = filter_input(INPUT_GET, 'origlon', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 146 | + $dist = filter_input(INPUT_GET, 'dist', FILTER_SANITIZE_NUMBER_INT); |
|
| 147 | + $number_results = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
| 148 | 148 | if ($dist != '') { |
| 149 | 149 | if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
| 150 | 150 | elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
@@ -153,15 +153,15 @@ discard block |
||
| 153 | 153 | if ($archive == 1) { |
| 154 | 154 | if ($type == 'aircraft') { |
| 155 | 155 | $SpotterArchive = new SpotterArchive(); |
| 156 | - $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); |
|
| 156 | + $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); |
|
| 157 | 157 | } |
| 158 | 158 | } else { |
| 159 | 159 | if ($type == 'aircraft') { |
| 160 | - $spotter_array = $Spotter->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); |
|
| 160 | + $spotter_array = $Spotter->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); |
|
| 161 | 161 | } elseif ($type == 'tracker') { |
| 162 | - $spotter_array = $Tracker->searchTrackerData($q,$callsign,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
| 162 | + $spotter_array = $Tracker->searchTrackerData($q, $callsign, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
| 163 | 163 | } elseif ($type == 'marine') { |
| 164 | - $spotter_array = $Marine->searchMarineData($q,$callsign,$mmsi,$imo,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist,$captain_id,$captain_name,$race_id,$race_name); |
|
| 164 | + $spotter_array = $Marine->searchMarineData($q, $callsign, $mmsi, $imo, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist, $captain_id, $captain_name, $race_id, $race_name); |
|
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
@@ -197,12 +197,12 @@ discard block |
||
| 197 | 197 | //remove 3D=true parameter |
| 198 | 198 | $no3D = str_replace("&3D=true", "", $_SERVER['QUERY_STRING']); |
| 199 | 199 | $kmlURL = str_replace("http://", "kml://", $globalURL); |
| 200 | - if (!isset($_GET['3D'])){ |
|
| 200 | + if (!isset($_GET['3D'])) { |
|
| 201 | 201 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'" class="active"><i class="fa fa-table"></i> '._("Table").'</a></li>'; |
| 202 | 202 | } else { |
| 203 | 203 | print '<li><span class="notablet"><a href="'.$globalURL.'/search?'.$no3D.'"><i class="fa fa-table"></i> '._("Table").'</a></span></li>'; |
| 204 | 204 | } |
| 205 | - if (isset($_GET['3D'])){ |
|
| 205 | + if (isset($_GET['3D'])) { |
|
| 206 | 206 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="active"><i class="fa fa-globe"></i> '._("3D Map").'</a></li>'; |
| 207 | 207 | } else { |
| 208 | 208 | print '<li ><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="notablet nomobile"><i class="fa fa-globe"></i> '._("3D Map").'</a><a href="'.$kmlURL.'/search/kml?'.htmlentities($_SERVER['QUERY_STRING']).'" class="tablet mobile"><i class="fa fa-globe"></i> 3D Map</a></li>'; |
@@ -223,36 +223,36 @@ discard block |
||
| 223 | 223 | print '<div class="column">'; |
| 224 | 224 | print '<div class="info">'; |
| 225 | 225 | print '<h1>'._("Search Results for").' '; |
| 226 | - if (isset($_GET['q']) && $_GET['q'] != ""){ print _("Keyword:").' <span>'.$q.'</span> '; } |
|
| 227 | - if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
|
| 228 | - if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
|
| 229 | - if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$registration.'</span> '; } |
|
| 230 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
| 231 | - if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$airline.'</span> '; } |
|
| 232 | - if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
|
| 233 | - if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
|
| 234 | - if (isset($_GET['airport']) && $_GET['airport'] != ""){ print _("Airport:").' <span>'.$airport.'</span> '; } |
|
| 235 | - if (isset($_GET['airport_country']) && $_GET['airport_country'] != ""){ print _("Airport country:").' <span>'.$airport_country.'</span> '; } |
|
| 236 | - if (isset($_GET['callsign']) && $_GET['callsign'] != ""){ print _("Callsign:").' <span>'.$callsign.'</span> '; } |
|
| 237 | - if (isset($_GET['owner']) && $_GET['owner'] != ""){ print _("Owner:").' <span>'.$owner.'</span> '; } |
|
| 238 | - if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != ""){ print _("Pilot id:").' <span>'.$pilot_id.'</span> '; } |
|
| 239 | - if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != ""){ print _("Pilot name:").' <span>'.$pilot_name.'</span> '; } |
|
| 240 | - if (isset($_GET['captain_id']) && $_GET['captain_id'] != ""){ print _("Captain id:").' <span>'.$captain_id.'</span> '; } |
|
| 241 | - if (isset($_GET['captain_name']) && $_GET['captain_name'] != ""){ print _("Captain name:").' <span>'.$captain_name.'</span> '; } |
|
| 242 | - if (isset($_GET['race_id']) && $_GET['race_id'] != ""){ print _("Race id:").' <span>'.$race_id.'</span> '; } |
|
| 243 | - if (isset($_GET['race_name']) && $_GET['race_name'] != ""){ print _("Race name:").' <span>'.$race_name.'</span> '; } |
|
| 244 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")){ print _("Route out of:").' <span>'.$departure_airport_route.'</span> '; } |
|
| 245 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route into:").' <span>'.$arrival_airport_route.'</span> '; } |
|
| 246 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route between:").' <span>'.$departure_airport_route.'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
| 247 | - if (isset($_GET['mmsi']) && $_GET['mmsi'] != ""){ print _("MMSI:").' <span>'.$mmsi.'</span> '; } |
|
| 248 | - if (isset($_GET['imo']) && $_GET['imo'] != ""){ print _("IMO:").' <span>'.$imo.'</span> '; } |
|
| 249 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == ""){ print _("Date starting at:").' <span>'.$start_date.'</span> '; } |
|
| 250 | - if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date ending at:").' <span>'.$end_date.'</span> '; } |
|
| 251 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date between:").' <span>'.$start_date.'</span> and <span>'.$end_date.'</span> '; } |
|
| 252 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == ""){ print _("Altitude starting at:").' <span>'.number_format($lowest_altitude).' feet</span> '; } |
|
| 253 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude ending at:").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
| 254 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude between:").' <span>'.number_format($lowest_altitude).' feet</span> '._("and").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
| 255 | - if (isset($_GET['number_results']) && $_GET['number_results'] != ""){ print _("limit per page:").' <span>'.$number_results.'</span> '; } |
|
| 226 | + if (isset($_GET['q']) && $_GET['q'] != "") { print _("Keyword:").' <span>'.$q.'</span> '; } |
|
| 227 | + if (isset($_GET['aircraft']) && $_GET['aircraft'] != "") { print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
|
| 228 | + if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != "") { print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
|
| 229 | + if (isset($_GET['registration']) && $_GET['registration'] != "") { print _("Registration:").' <span>'.$registration.'</span> '; } |
|
| 230 | + if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
| 231 | + if (isset($_GET['airline']) && $_GET['airline'] != "") { print _("Airline:").' <span>'.$airline.'</span> '; } |
|
| 232 | + if (isset($_GET['airline_country']) && $_GET['airline_country'] != "") { print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
|
| 233 | + if (isset($_GET['airline_type']) && $_GET['airline_type'] != "") { print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
|
| 234 | + if (isset($_GET['airport']) && $_GET['airport'] != "") { print _("Airport:").' <span>'.$airport.'</span> '; } |
|
| 235 | + if (isset($_GET['airport_country']) && $_GET['airport_country'] != "") { print _("Airport country:").' <span>'.$airport_country.'</span> '; } |
|
| 236 | + if (isset($_GET['callsign']) && $_GET['callsign'] != "") { print _("Callsign:").' <span>'.$callsign.'</span> '; } |
|
| 237 | + if (isset($_GET['owner']) && $_GET['owner'] != "") { print _("Owner:").' <span>'.$owner.'</span> '; } |
|
| 238 | + if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != "") { print _("Pilot id:").' <span>'.$pilot_id.'</span> '; } |
|
| 239 | + if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != "") { print _("Pilot name:").' <span>'.$pilot_name.'</span> '; } |
|
| 240 | + if (isset($_GET['captain_id']) && $_GET['captain_id'] != "") { print _("Captain id:").' <span>'.$captain_id.'</span> '; } |
|
| 241 | + if (isset($_GET['captain_name']) && $_GET['captain_name'] != "") { print _("Captain name:").' <span>'.$captain_name.'</span> '; } |
|
| 242 | + if (isset($_GET['race_id']) && $_GET['race_id'] != "") { print _("Race id:").' <span>'.$race_id.'</span> '; } |
|
| 243 | + if (isset($_GET['race_name']) && $_GET['race_name'] != "") { print _("Race name:").' <span>'.$race_name.'</span> '; } |
|
| 244 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")) { print _("Route out of:").' <span>'.$departure_airport_route.'</span> '; } |
|
| 245 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route into:").' <span>'.$arrival_airport_route.'</span> '; } |
|
| 246 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route between:").' <span>'.$departure_airport_route.'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
| 247 | + if (isset($_GET['mmsi']) && $_GET['mmsi'] != "") { print _("MMSI:").' <span>'.$mmsi.'</span> '; } |
|
| 248 | + if (isset($_GET['imo']) && $_GET['imo'] != "") { print _("IMO:").' <span>'.$imo.'</span> '; } |
|
| 249 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == "") { print _("Date starting at:").' <span>'.$start_date.'</span> '; } |
|
| 250 | + if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date ending at:").' <span>'.$end_date.'</span> '; } |
|
| 251 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date between:").' <span>'.$start_date.'</span> and <span>'.$end_date.'</span> '; } |
|
| 252 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == "") { print _("Altitude starting at:").' <span>'.number_format($lowest_altitude).' feet</span> '; } |
|
| 253 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude ending at:").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
| 254 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude between:").' <span>'.number_format($lowest_altitude).' feet</span> '._("and").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
| 255 | + if (isset($_GET['number_results']) && $_GET['number_results'] != "") { print _("limit per page:").' <span>'.$number_results.'</span> '; } |
|
| 256 | 256 | print '</h1>'; |
| 257 | 257 | print '</div>'; |
| 258 | 258 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | </select> |
| 391 | 391 | </div> |
| 392 | 392 | </div> |
| 393 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
| 393 | + <script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
| 394 | 394 | <div class="form-group"> |
| 395 | 395 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
| 396 | 396 | <div class="col-sm-10"> |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | </select> |
| 400 | 400 | </div> |
| 401 | 401 | </div> |
| 402 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
| 402 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
| 403 | 403 | <div class="form-group"> |
| 404 | 404 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
| 405 | 405 | <div class="col-sm-10"> |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | </div> |
| 423 | 423 | </div> |
| 424 | 424 | <?php |
| 425 | - }else { |
|
| 425 | + } else { |
|
| 426 | 426 | ?> |
| 427 | 427 | <div class="form-group"> |
| 428 | 428 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
@@ -435,8 +435,8 @@ discard block |
||
| 435 | 435 | ?> |
| 436 | 436 | <div class="form-group"> |
| 437 | 437 | <div class="col-sm-offset-2 col-sm-10"> |
| 438 | - <!--<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>--> |
|
| 439 | - <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> |
|
| 438 | + <!--<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>--> |
|
| 439 | + <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> |
|
| 440 | 440 | </div> |
| 441 | 441 | </div> |
| 442 | 442 | </fieldset> |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | </select> |
| 451 | 451 | </div> |
| 452 | 452 | </div> |
| 453 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $airline; ?>');</script> |
|
| 453 | + <script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $airline; ?>');</script> |
|
| 454 | 454 | <div class="form-group"> |
| 455 | 455 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
| 456 | 456 | <div class="col-sm-10"> |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | </select> |
| 460 | 460 | </div> |
| 461 | 461 | </div> |
| 462 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
| 462 | + <script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
| 463 | 463 | <div class="form-group"> |
| 464 | 464 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
| 465 | 465 | <div class="col-sm-10"> |
@@ -468,10 +468,10 @@ discard block |
||
| 468 | 468 | </div> |
| 469 | 469 | <div class="form-group"> |
| 470 | 470 | <div class="col-sm-offset-2 col-sm-10"> |
| 471 | - <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> |
|
| 472 | - <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> |
|
| 473 | - <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> |
|
| 474 | - <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> |
|
| 471 | + <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> |
|
| 472 | + <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> |
|
| 473 | + <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> |
|
| 474 | + <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> |
|
| 475 | 475 | </div> |
| 476 | 476 | </div> |
| 477 | 477 | </fieldset> |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | </select> |
| 486 | 486 | </div> |
| 487 | 487 | </div> |
| 488 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
| 488 | + <script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
| 489 | 489 | <div class="form-group"> |
| 490 | 490 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
| 491 | 491 | <div class="col-sm-10"> |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | </select> |
| 495 | 495 | </div> |
| 496 | 496 | </div> |
| 497 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
| 497 | + <script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
| 498 | 498 | </fieldset> |
| 499 | 499 | <fieldset> |
| 500 | 500 | <legend><?php echo _("Route"); ?></legend> |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | </select> |
| 507 | 507 | </div> |
| 508 | 508 | </div> |
| 509 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
| 509 | + <script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
| 510 | 510 | <div class="form-group"> |
| 511 | 511 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
| 512 | 512 | <div class="col-sm-10"> |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | </select> |
| 516 | 516 | </div> |
| 517 | 517 | </div> |
| 518 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
| 518 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
| 519 | 519 | </fieldset> |
| 520 | 520 | <fieldset> |
| 521 | 521 | <legend><?php echo _("Altitude"); ?></legend> |
@@ -526,9 +526,9 @@ discard block |
||
| 526 | 526 | <option></option> |
| 527 | 527 | <?php |
| 528 | 528 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
| 529 | -foreach($altitude_array as $altitude) |
|
| 529 | +foreach ($altitude_array as $altitude) |
|
| 530 | 530 | { |
| 531 | - if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
| 531 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
| 532 | 532 | { |
| 533 | 533 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
| 534 | 534 | } else { |
@@ -546,9 +546,9 @@ discard block |
||
| 546 | 546 | <option></option> |
| 547 | 547 | <?php |
| 548 | 548 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
| 549 | - foreach($altitude_array as $altitude) |
|
| 549 | + foreach ($altitude_array as $altitude) |
|
| 550 | 550 | { |
| 551 | - if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
| 551 | + if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
| 552 | 552 | { |
| 553 | 553 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
| 554 | 554 | } else { |
@@ -710,10 +710,10 @@ discard block |
||
| 710 | 710 | <div class="col-sm-10"> |
| 711 | 711 | <select class="form-control" name="number_results"> |
| 712 | 712 | <?php |
| 713 | -$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
| 714 | -foreach($number_results_array as $number) |
|
| 713 | +$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
| 714 | +foreach ($number_results_array as $number) |
|
| 715 | 715 | { |
| 716 | - if(isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
| 716 | + if (isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
| 717 | 717 | { |
| 718 | 718 | print '<option value="'.$number.'" selected="selected">'.$number.'</option>'; |
| 719 | 719 | } else { |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | <fieldset> |
| 733 | 733 | <div class="form-group"> |
| 734 | 734 | <div class="col-sm-offset-2 col-sm-10"> |
| 735 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" disabled /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
| 735 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" disabled /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
| 736 | 736 | <p class="help-block">Disabled in demo</p> |
| 737 | 737 | </div> |
| 738 | 738 | </div> |
@@ -743,7 +743,7 @@ discard block |
||
| 743 | 743 | <fieldset> |
| 744 | 744 | <div class="form-group"> |
| 745 | 745 | <div class="col-sm-offset-2 col-sm-10"> |
| 746 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
| 746 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
| 747 | 747 | </div> |
| 748 | 748 | </div> |
| 749 | 749 | </fieldset> |
@@ -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); |
@@ -146,10 +152,15 @@ discard block |
||
| 146 | 152 | $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
| 147 | 153 | $number_results = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
| 148 | 154 | if ($dist != '') { |
| 149 | - if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
|
| 150 | - elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
|
| 155 | + if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') { |
|
| 156 | + $dist = $dist*1.60934; |
|
| 157 | + } elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') { |
|
| 158 | + $dist = $dist*1.852; |
|
| 159 | + } |
|
| 160 | + } |
|
| 161 | + if (!isset($sql_date)) { |
|
| 162 | + $sql_date = ''; |
|
| 151 | 163 | } |
| 152 | - if (!isset($sql_date)) $sql_date = ''; |
|
| 153 | 164 | if ($archive == 1) { |
| 154 | 165 | if ($type == 'aircraft') { |
| 155 | 166 | $SpotterArchive = new SpotterArchive(); |
@@ -227,7 +238,10 @@ discard block |
||
| 227 | 238 | if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
| 228 | 239 | if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
| 229 | 240 | if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$registration.'</span> '; } |
| 230 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
| 241 | + if (isset($_GET['highlights'])) { |
|
| 242 | + if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; |
|
| 243 | + } |
|
| 244 | + } |
|
| 231 | 245 | if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$airline.'</span> '; } |
| 232 | 246 | if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
| 233 | 247 | if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
@@ -371,7 +385,10 @@ discard block |
||
| 371 | 385 | <div class="form-group"> |
| 372 | 386 | <label class="control-label col-sm-2"><?php echo _("Keywords"); ?></label> |
| 373 | 387 | <div class="col-sm-10"> |
| 374 | - <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) print $q; ?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
| 388 | + <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) { |
|
| 389 | + print $q; |
|
| 390 | +} |
|
| 391 | +?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
| 375 | 392 | </div> |
| 376 | 393 | </div> |
| 377 | 394 | </fieldset> |
@@ -390,7 +407,10 @@ discard block |
||
| 390 | 407 | </select> |
| 391 | 408 | </div> |
| 392 | 409 | </div> |
| 393 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
| 410 | + <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) { |
|
| 411 | + print $manufacturer; |
|
| 412 | +} |
|
| 413 | +?>')</script> |
|
| 394 | 414 | <div class="form-group"> |
| 395 | 415 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
| 396 | 416 | <div class="col-sm-10"> |
@@ -399,11 +419,17 @@ discard block |
||
| 399 | 419 | </select> |
| 400 | 420 | </div> |
| 401 | 421 | </div> |
| 402 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
| 422 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) { |
|
| 423 | + print $aircraft_icao; |
|
| 424 | +} |
|
| 425 | +?>');</script> |
|
| 403 | 426 | <div class="form-group"> |
| 404 | 427 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
| 405 | 428 | <div class="col-sm-10"> |
| 406 | - <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) print $registration; ?>" size="8" placeholder="<?php echo _("Registration"); ?>" /> |
|
| 429 | + <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) { |
|
| 430 | + print $registration; |
|
| 431 | +} |
|
| 432 | +?>" size="8" placeholder="<?php echo _("Registration"); ?>" /> |
|
| 407 | 433 | </div> |
| 408 | 434 | </div> |
| 409 | 435 | <?php |
@@ -412,22 +438,31 @@ discard block |
||
| 412 | 438 | <div class="form-group"> |
| 413 | 439 | <label class="control-label col-sm-2"><?php echo _("Pilot id"); ?></label> |
| 414 | 440 | <div class="col-sm-10"> |
| 415 | - <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"); ?>" /> |
|
| 441 | + <input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) { |
|
| 442 | + print $pilot_id; |
|
| 443 | +} |
|
| 444 | +?>" size="15" placeholder="<?php echo _("Pilot id"); ?>" /> |
|
| 416 | 445 | </div> |
| 417 | 446 | </div> |
| 418 | 447 | <div class="form-group"> |
| 419 | 448 | <label class="control-label col-sm-2"><?php echo _("Pilot name"); ?></label> |
| 420 | 449 | <div class="col-sm-10"> |
| 421 | - <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"); ?>" /> |
|
| 450 | + <input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) { |
|
| 451 | + print $pilot_name; |
|
| 452 | +} |
|
| 453 | +?>" size="15" placeholder="<?php echo _("Pilot name"); ?>" /> |
|
| 422 | 454 | </div> |
| 423 | 455 | </div> |
| 424 | 456 | <?php |
| 425 | - }else { |
|
| 457 | + } else { |
|
| 426 | 458 | ?> |
| 427 | 459 | <div class="form-group"> |
| 428 | 460 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
| 429 | 461 | <div class="col-sm-10"> |
| 430 | - <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) print $owner; ?>" size="15" placeholder="<?php echo _("Owner name"); ?>" /> |
|
| 462 | + <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) { |
|
| 463 | + print $owner; |
|
| 464 | +} |
|
| 465 | +?>" size="15" placeholder="<?php echo _("Owner name"); ?>" /> |
|
| 431 | 466 | </div> |
| 432 | 467 | </div> |
| 433 | 468 | <?php |
@@ -435,8 +470,14 @@ discard block |
||
| 435 | 470 | ?> |
| 436 | 471 | <div class="form-group"> |
| 437 | 472 | <div class="col-sm-offset-2 col-sm-10"> |
| 438 | - <!--<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>--> |
|
| 439 | - <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> |
|
| 473 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
| 474 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
| 475 | +} |
|
| 476 | +} ?>> <label for="highlights"><?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
| 477 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
| 478 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
| 479 | +} |
|
| 480 | +} ?>> <?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
| 440 | 481 | </div> |
| 441 | 482 | </div> |
| 442 | 483 | </fieldset> |
@@ -450,7 +491,10 @@ discard block |
||
| 450 | 491 | </select> |
| 451 | 492 | </div> |
| 452 | 493 | </div> |
| 453 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $airline; ?>');</script> |
|
| 494 | + <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) { |
|
| 495 | + print $airline; |
|
| 496 | +} |
|
| 497 | +?>');</script> |
|
| 454 | 498 | <div class="form-group"> |
| 455 | 499 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
| 456 | 500 | <div class="col-sm-10"> |
@@ -459,19 +503,34 @@ discard block |
||
| 459 | 503 | </select> |
| 460 | 504 | </div> |
| 461 | 505 | </div> |
| 462 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
| 506 | + <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) { |
|
| 507 | + print $airline_country; |
|
| 508 | +} |
|
| 509 | +?>');</script> |
|
| 463 | 510 | <div class="form-group"> |
| 464 | 511 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
| 465 | 512 | <div class="col-sm-10"> |
| 466 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
| 513 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
| 514 | + print $callsign; |
|
| 515 | +} |
|
| 516 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
| 467 | 517 | </div> |
| 468 | 518 | </div> |
| 469 | 519 | <div class="form-group"> |
| 470 | 520 | <div class="col-sm-offset-2 col-sm-10"> |
| 471 | 521 | <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> |
| 472 | - <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> |
|
| 473 | - <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> |
|
| 474 | - <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> |
|
| 522 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) { |
|
| 523 | + if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; |
|
| 524 | +} |
|
| 525 | +} ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
| 526 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) { |
|
| 527 | + if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; |
|
| 528 | +} |
|
| 529 | +} ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
| 530 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) { |
|
| 531 | + if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; |
|
| 532 | +} |
|
| 533 | +} ?>> <?php echo _("Only Military airlines"); ?></label> |
|
| 475 | 534 | </div> |
| 476 | 535 | </div> |
| 477 | 536 | </fieldset> |
@@ -485,7 +544,10 @@ discard block |
||
| 485 | 544 | </select> |
| 486 | 545 | </div> |
| 487 | 546 | </div> |
| 488 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
| 547 | + <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) { |
|
| 548 | + print $airport_icao; |
|
| 549 | +} |
|
| 550 | +?>');</script> |
|
| 489 | 551 | <div class="form-group"> |
| 490 | 552 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
| 491 | 553 | <div class="col-sm-10"> |
@@ -494,7 +556,10 @@ discard block |
||
| 494 | 556 | </select> |
| 495 | 557 | </div> |
| 496 | 558 | </div> |
| 497 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
| 559 | + <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) { |
|
| 560 | + print $airport_country; |
|
| 561 | +} |
|
| 562 | +?>');</script> |
|
| 498 | 563 | </fieldset> |
| 499 | 564 | <fieldset> |
| 500 | 565 | <legend><?php echo _("Route"); ?></legend> |
@@ -506,7 +571,10 @@ discard block |
||
| 506 | 571 | </select> |
| 507 | 572 | </div> |
| 508 | 573 | </div> |
| 509 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
| 574 | + <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) { |
|
| 575 | + print $departure_airport_route; |
|
| 576 | +} |
|
| 577 | +?>');</script> |
|
| 510 | 578 | <div class="form-group"> |
| 511 | 579 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
| 512 | 580 | <div class="col-sm-10"> |
@@ -515,7 +583,10 @@ discard block |
||
| 515 | 583 | </select> |
| 516 | 584 | </div> |
| 517 | 585 | </div> |
| 518 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
| 586 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) { |
|
| 587 | + print $arrival_airport_route; |
|
| 588 | +} |
|
| 589 | +?>');</script> |
|
| 519 | 590 | </fieldset> |
| 520 | 591 | <fieldset> |
| 521 | 592 | <legend><?php echo _("Altitude"); ?></legend> |
@@ -565,19 +636,33 @@ discard block |
||
| 565 | 636 | <div class="form-group"> |
| 566 | 637 | <label class="control-label col-sm-2"><?php echo _("Latitude"); ?></label> |
| 567 | 638 | <div class="col-sm-10"> |
| 568 | - <input type="text" name="origlat" class="form-control" placeholder="<?php echo _("Center point latitude"); ?>" value="<?php if (isset($_GET['origlat'])) print $origlat; ?>" /> |
|
| 639 | + <input type="text" name="origlat" class="form-control" placeholder="<?php echo _("Center point latitude"); ?>" value="<?php if (isset($_GET['origlat'])) { |
|
| 640 | + print $origlat; |
|
| 641 | +} |
|
| 642 | +?>" /> |
|
| 569 | 643 | </div> |
| 570 | 644 | </div> |
| 571 | 645 | <div class="form-group"> |
| 572 | 646 | <label class="control-label col-sm-2"><?php echo _("Longitude"); ?></label> |
| 573 | 647 | <div class="col-sm-10"> |
| 574 | - <input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" value="<?php if (isset($_GET['origlon'])) print $origlon; ?>" /> |
|
| 648 | + <input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" value="<?php if (isset($_GET['origlon'])) { |
|
| 649 | + print $origlon; |
|
| 650 | +} |
|
| 651 | +?>" /> |
|
| 575 | 652 | </div> |
| 576 | 653 | </div> |
| 577 | 654 | <div class="form-group"> |
| 578 | - <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) print $globalDistanceUnit; else print 'km'; print ')'; ?></label> |
|
| 655 | + <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) { |
|
| 656 | + print $globalDistanceUnit; |
|
| 657 | +} else { |
|
| 658 | + print 'km'; |
|
| 659 | +} |
|
| 660 | +print ')'; ?></label> |
|
| 579 | 661 | <div class="col-sm-10"> |
| 580 | - <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" value="<?php if (isset($_GET['distance'])) print $distance; ?>" /> |
|
| 662 | + <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" value="<?php if (isset($_GET['distance'])) { |
|
| 663 | + print $distance; |
|
| 664 | +} |
|
| 665 | +?>" /> |
|
| 581 | 666 | </div> |
| 582 | 667 | </div> |
| 583 | 668 | </fieldset> |
@@ -588,7 +673,10 @@ discard block |
||
| 588 | 673 | <div class="form-group"> |
| 589 | 674 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
| 590 | 675 | <div class="col-sm-10"> |
| 591 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
| 676 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
| 677 | + print $callsign; |
|
| 678 | +} |
|
| 679 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
| 592 | 680 | </div> |
| 593 | 681 | </div> |
| 594 | 682 | </fieldset> |
@@ -599,7 +687,10 @@ discard block |
||
| 599 | 687 | <div class="form-group"> |
| 600 | 688 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
| 601 | 689 | <div class="col-sm-10"> |
| 602 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $callsign; ?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
| 690 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
| 691 | + print $callsign; |
|
| 692 | +} |
|
| 693 | +?>" size="8" placeholder="<?php echo _("Callsign"); ?>" /> |
|
| 603 | 694 | </div> |
| 604 | 695 | </div> |
| 605 | 696 | </fieldset> |
@@ -610,7 +701,10 @@ discard block |
||
| 610 | 701 | <div class="form-group"> |
| 611 | 702 | <label class="control-label col-sm-2"><?php echo _("Captain id"); ?></label> |
| 612 | 703 | <div class="col-sm-10"> |
| 613 | - <input type="text" name="captain_id" class="form-control" value="<?php if (isset($_GET['captain_id'])) print $captain_id; ?>" size="8" placeholder="<?php echo _("Captain id"); ?>" /> |
|
| 704 | + <input type="text" name="captain_id" class="form-control" value="<?php if (isset($_GET['captain_id'])) { |
|
| 705 | + print $captain_id; |
|
| 706 | +} |
|
| 707 | +?>" size="8" placeholder="<?php echo _("Captain id"); ?>" /> |
|
| 614 | 708 | </div> |
| 615 | 709 | </div> |
| 616 | 710 | </fieldset> |
@@ -618,7 +712,10 @@ discard block |
||
| 618 | 712 | <div class="form-group"> |
| 619 | 713 | <label class="control-label col-sm-2"><?php echo _("Captain name"); ?></label> |
| 620 | 714 | <div class="col-sm-10"> |
| 621 | - <input type="text" name="captain_name" class="form-control" value="<?php if (isset($_GET['captain_name'])) print $captain_name; ?>" size="8" placeholder="<?php echo _("Captain name"); ?>" /> |
|
| 715 | + <input type="text" name="captain_name" class="form-control" value="<?php if (isset($_GET['captain_name'])) { |
|
| 716 | + print $captain_name; |
|
| 717 | +} |
|
| 718 | +?>" size="8" placeholder="<?php echo _("Captain name"); ?>" /> |
|
| 622 | 719 | </div> |
| 623 | 720 | </div> |
| 624 | 721 | </fieldset> |
@@ -626,7 +723,10 @@ discard block |
||
| 626 | 723 | <div class="form-group"> |
| 627 | 724 | <label class="control-label col-sm-2"><?php echo _("Race id"); ?></label> |
| 628 | 725 | <div class="col-sm-10"> |
| 629 | - <input type="text" name="race_id" class="form-control" value="<?php if (isset($_GET['race_id'])) print $race_id; ?>" size="8" placeholder="<?php echo _("Race id"); ?>" /> |
|
| 726 | + <input type="text" name="race_id" class="form-control" value="<?php if (isset($_GET['race_id'])) { |
|
| 727 | + print $race_id; |
|
| 728 | +} |
|
| 729 | +?>" size="8" placeholder="<?php echo _("Race id"); ?>" /> |
|
| 630 | 730 | </div> |
| 631 | 731 | </div> |
| 632 | 732 | </fieldset> |
@@ -634,7 +734,10 @@ discard block |
||
| 634 | 734 | <div class="form-group"> |
| 635 | 735 | <label class="control-label col-sm-2"><?php echo _("Race name"); ?></label> |
| 636 | 736 | <div class="col-sm-10"> |
| 637 | - <input type="text" name="race_name" class="form-control" value="<?php if (isset($_GET['race_name'])) print $race_name; ?>" size="8" placeholder="<?php echo _("Race name"); ?>" /> |
|
| 737 | + <input type="text" name="race_name" class="form-control" value="<?php if (isset($_GET['race_name'])) { |
|
| 738 | + print $race_name; |
|
| 739 | +} |
|
| 740 | +?>" size="8" placeholder="<?php echo _("Race name"); ?>" /> |
|
| 638 | 741 | </div> |
| 639 | 742 | </div> |
| 640 | 743 | </fieldset> |
@@ -645,7 +748,10 @@ discard block |
||
| 645 | 748 | <div class="form-group"> |
| 646 | 749 | <label class="control-label col-sm-2"><?php echo _("MMSI"); ?></label> |
| 647 | 750 | <div class="col-sm-10"> |
| 648 | - <input type="text" name="mmsi" class="form-control" value="<?php if (isset($_GET['mmsi'])) print $mmsi; ?>" size="8" placeholder="<?php echo _("MMSI"); ?>" /> |
|
| 751 | + <input type="text" name="mmsi" class="form-control" value="<?php if (isset($_GET['mmsi'])) { |
|
| 752 | + print $mmsi; |
|
| 753 | +} |
|
| 754 | +?>" size="8" placeholder="<?php echo _("MMSI"); ?>" /> |
|
| 649 | 755 | </div> |
| 650 | 756 | </div> |
| 651 | 757 | </fieldset> |
@@ -653,7 +759,10 @@ discard block |
||
| 653 | 759 | <div class="form-group"> |
| 654 | 760 | <label class="control-label col-sm-2"><?php echo _("IMO"); ?></label> |
| 655 | 761 | <div class="col-sm-10"> |
| 656 | - <input type="text" name="imo" class="form-control" value="<?php if (isset($_GET['imo'])) print $imo; ?>" size="8" placeholder="<?php echo _("IMO"); ?>" /> |
|
| 762 | + <input type="text" name="imo" class="form-control" value="<?php if (isset($_GET['imo'])) { |
|
| 763 | + print $imo; |
|
| 764 | +} |
|
| 765 | +?>" size="8" placeholder="<?php echo _("IMO"); ?>" /> |
|
| 657 | 766 | </div> |
| 658 | 767 | </div> |
| 659 | 768 | </fieldset> |
@@ -667,7 +776,10 @@ discard block |
||
| 667 | 776 | <label class="control-label col-sm-2"><?php echo _("Start Date"); ?></label> |
| 668 | 777 | <div class="col-sm-10"> |
| 669 | 778 | <div class='input-group date' id='datetimepicker1'> |
| 670 | - <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"); ?>" /> |
|
| 779 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date']) && $_GET['start_date'] != '') { |
|
| 780 | + print $start_date; |
|
| 781 | +} |
|
| 782 | +?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
| 671 | 783 | <span class="input-group-addon"> |
| 672 | 784 | <span class="glyphicon glyphicon-calendar"></span> |
| 673 | 785 | </span> |
@@ -678,7 +790,10 @@ discard block |
||
| 678 | 790 | <label class="control-label col-sm-2"><?php echo _("End Date"); ?></label> |
| 679 | 791 | <div class="col-sm-10"> |
| 680 | 792 | <div class='input-group date' id='datetimepicker2'> |
| 681 | - <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"); ?>" /> |
|
| 793 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date']) && $_GET['end_date'] != '') { |
|
| 794 | + print $end_date; |
|
| 795 | +} |
|
| 796 | +?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
| 682 | 797 | <span class="input-group-addon"> |
| 683 | 798 | <span class="glyphicon glyphicon-calendar"></span> |
| 684 | 799 | </span> |
@@ -11,7 +11,9 @@ discard block |
||
| 11 | 11 | header('Content-Type: text/javascript'); |
| 12 | 12 | $latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 13 | 13 | $longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
| 14 | -if ($latitude == '' || $longitude == '') return ''; |
|
| 14 | +if ($latitude == '' || $longitude == '') { |
|
| 15 | + return ''; |
|
| 16 | +} |
|
| 15 | 17 | //echo 'latitude : '.$latitude.' - longitude : '.$longitude."\n"; |
| 16 | 18 | $airports = $Spotter->closestAirports($latitude,$longitude,300); |
| 17 | 19 | //print_r($airports); |
@@ -20,7 +22,9 @@ discard block |
||
| 20 | 22 | $i = 0; |
| 21 | 23 | $ew = true; |
| 22 | 24 | $dtf = false; |
| 23 | -if (empty($airports)) $ew = false; |
|
| 25 | +if (empty($airports)) { |
|
| 26 | + $ew = false; |
|
| 27 | +} |
|
| 24 | 28 | while($ew) { |
| 25 | 29 | $met = $METAR->getMETAR($airports[$i]['icao']); |
| 26 | 30 | //print_r($met); |
@@ -43,8 +47,12 @@ discard block |
||
| 43 | 47 | } |
| 44 | 48 | } |
| 45 | 49 | $i++; |
| 46 | - if ($i >= count($airports)) $ew = false; |
|
| 50 | + if ($i >= count($airports)) { |
|
| 51 | + $ew = false; |
|
| 52 | + } |
|
| 53 | + } |
|
| 54 | +if ($dtf === false) { |
|
| 55 | + echo json_encode($Weather->openweathermap($latitude,$longitude)); |
|
| 47 | 56 | } |
| 48 | -if ($dtf === false) echo json_encode($Weather->openweathermap($latitude,$longitude)); |
|
| 49 | 57 | |
| 50 | 58 | ?> |
| 51 | 59 | \ No newline at end of file |
@@ -9,11 +9,11 @@ discard block |
||
| 9 | 9 | header('Content-disposition: attachment; filename="weather.json"'); |
| 10 | 10 | } |
| 11 | 11 | header('Content-Type: text/javascript'); |
| 12 | -$latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 13 | -$longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 12 | +$latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 13 | +$longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 14 | 14 | if ($latitude == '' || $longitude == '') return ''; |
| 15 | 15 | //echo 'latitude : '.$latitude.' - longitude : '.$longitude."\n"; |
| 16 | -$airports = $Spotter->closestAirports($latitude,$longitude,300); |
|
| 16 | +$airports = $Spotter->closestAirports($latitude, $longitude, 300); |
|
| 17 | 17 | //print_r($airports); |
| 18 | 18 | $METAR = new METAR(); |
| 19 | 19 | $Weather = new Weather(); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $ew = true; |
| 22 | 22 | $dtf = false; |
| 23 | 23 | if (empty($airports)) $ew = false; |
| 24 | -while($ew) { |
|
| 24 | +while ($ew) { |
|
| 25 | 25 | $met = $METAR->getMETAR($airports[$i]['icao']); |
| 26 | 26 | //print_r($met); |
| 27 | 27 | if (!empty($met)) { |
@@ -29,13 +29,13 @@ discard block |
||
| 29 | 29 | //print_r($parsed); |
| 30 | 30 | $rain = array(); |
| 31 | 31 | if (isset($parsed['temperature'])) { |
| 32 | - $rain = array_merge($rain,array('temp' => $parsed['temperature'])); |
|
| 32 | + $rain = array_merge($rain, array('temp' => $parsed['temperature'])); |
|
| 33 | 33 | } |
| 34 | 34 | if (isset($parsed['rh'])) { |
| 35 | - $rain = array_merge($rain,array('rh' => $parsed['rh'])); |
|
| 35 | + $rain = array_merge($rain, array('rh' => $parsed['rh'])); |
|
| 36 | 36 | } |
| 37 | 37 | if (isset($parsed['weather']) && $parsed['weather'] == 'CAVOK') { |
| 38 | - echo json_encode(array('clouds' => array(),'rain' => array())); |
|
| 38 | + echo json_encode(array('clouds' => array(), 'rain' => array())); |
|
| 39 | 39 | $ew = false; |
| 40 | 40 | $dtf = true; |
| 41 | 41 | } elseif (isset($parsed['cloud'])) { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | if (!empty($result)) { |
| 44 | 44 | //print_r($met); |
| 45 | 45 | //print_r($parsed); |
| 46 | - echo json_encode(array('clouds' => $result,'rain' => $rain)); |
|
| 46 | + echo json_encode(array('clouds' => $result, 'rain' => $rain)); |
|
| 47 | 47 | $ew = false; |
| 48 | 48 | $dtf = true; |
| 49 | 49 | } |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | $i++; |
| 53 | 53 | if ($i >= count($airports)) $ew = false; |
| 54 | 54 | } |
| 55 | -if ($dtf === false) echo json_encode($Weather->openweathermap($latitude,$longitude)); |
|
| 55 | +if ($dtf === false) echo json_encode($Weather->openweathermap($latitude, $longitude)); |
|
| 56 | 56 | |
| 57 | 57 | ?> |
| 58 | 58 | \ No newline at end of file |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | $title = _("Statistics").' - '._("Top 10 Races Number of Participants"); |
| 7 | 7 | |
| 8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
| 9 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 9 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 11 | 11 | $type = 'marine'; |
| 12 | 12 | require_once('header.php'); |
| 13 | 13 | include('statistics-sub-menu.php'); |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | </div> |
| 19 | 19 | <p>'._("Below are the <strong>Top 10</strong> races with the most number of participants.").'</p>'; |
| 20 | 20 | |
| 21 | -$race_array = $Marine->countAllCaptainsByRaces(true,$filter_name,$year,$month); |
|
| 21 | +$race_array = $Marine->countAllCaptainsByRaces(true, $filter_name, $year, $month); |
|
| 22 | 22 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
| 23 | 23 | $pilot_data = ''; |
| 24 | -foreach($race_array as $race_item) |
|
| 24 | +foreach ($race_array as $race_item) |
|
| 25 | 25 | { |
| 26 | 26 | $race_data .= '["'.$race_item['marine_race_name'].' ('.$race_item['marine_race_id'].')",'.$race_item['marine_captain_count'].'],'; |
| 27 | 27 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | print '</thead>'; |
| 47 | 47 | print '<tbody>'; |
| 48 | 48 | $i = 1; |
| 49 | - foreach($race_array as $race_item) |
|
| 49 | + foreach ($race_array as $race_item) |
|
| 50 | 50 | { |
| 51 | 51 | print '<tr>'; |
| 52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,7 +5,9 @@ |
||
| 5 | 5 | $Marine = new Marine(); |
| 6 | 6 | $title = _("Statistics").' - '._("Top 10 Races Number of Participants"); |
| 7 | 7 | |
| 8 | -if (!isset($filter_name)) $filter_name = ''; |
|
| 8 | +if (!isset($filter_name)) { |
|
| 9 | + $filter_name = ''; |
|
| 10 | +} |
|
| 9 | 11 | $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
| 10 | 12 | $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
| 11 | 13 | $type = 'marine'; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | // When button "Remove all filters" is clicked |
| 39 | 39 | if (isset($_POST['removefilters'])) { |
| 40 | 40 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
| 41 | - return strpos($key,'filter_') === 0; |
|
| 41 | + return strpos($key,'filter_') === 0; |
|
| 42 | 42 | }); |
| 43 | 43 | foreach ($allfilters as $filt) { |
| 44 | 44 | unset($_COOKIE[$filt]); |
@@ -409,34 +409,34 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | <ul class="nav navbar-nav"> |
| 411 | 411 | <?php |
| 412 | - if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) { |
|
| 412 | + if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) { |
|
| 413 | 413 | ?> |
| 414 | 414 | <li><a href="<?php print $globalURL; ?>/news"><?php echo _("News"); ?></a></li> |
| 415 | 415 | <?php |
| 416 | - } |
|
| 416 | + } |
|
| 417 | 417 | ?> |
| 418 | 418 | |
| 419 | 419 | <?php |
| 420 | - $sub = false; |
|
| 421 | - if ( |
|
| 420 | + $sub = false; |
|
| 421 | + if ( |
|
| 422 | 422 | ( |
| 423 | - (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 423 | + (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 424 | 424 | ) || |
| 425 | 425 | ( |
| 426 | - isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 426 | + isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 427 | 427 | ) || |
| 428 | 428 | ( |
| 429 | - isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 429 | + isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 430 | 430 | ) || |
| 431 | 431 | ( |
| 432 | - isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
| 432 | + isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
| 433 | 433 | ) |
| 434 | - ) { |
|
| 434 | + ) { |
|
| 435 | 435 | $sub = true; |
| 436 | - } |
|
| 436 | + } |
|
| 437 | 437 | ?> |
| 438 | 438 | <?php |
| 439 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 439 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 440 | 440 | ?> |
| 441 | 441 | <li class="dropdown"> |
| 442 | 442 | <?php |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | <ul class="dropdown-menu multi-level"> |
| 448 | 448 | <li class="dropdown-submenu"> |
| 449 | 449 | <?php |
| 450 | - } |
|
| 450 | + } |
|
| 451 | 451 | ?> |
| 452 | 452 | <?php |
| 453 | 453 | if (isset($globalNewsFeeds['aircraft']) && !empty($globalNewsFeeds['aircraft'])) { |
@@ -462,25 +462,25 @@ discard block |
||
| 462 | 462 | <ul class="dropdown-menu"> |
| 463 | 463 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li> |
| 464 | 464 | <?php |
| 465 | - if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
| 465 | + if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
| 466 | 466 | ?> |
| 467 | 467 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
| 468 | 468 | <?php |
| 469 | - } |
|
| 469 | + } |
|
| 470 | 470 | ?> |
| 471 | 471 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
| 472 | 472 | <?php |
| 473 | - if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 473 | + if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 474 | 474 | ?> |
| 475 | 475 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
| 476 | 476 | <?php |
| 477 | - } |
|
| 478 | - if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 477 | + } |
|
| 478 | + if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 479 | 479 | |
| 480 | 480 | ?> |
| 481 | 481 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
| 482 | 482 | <?php |
| 483 | - } |
|
| 483 | + } |
|
| 484 | 484 | ?> |
| 485 | 485 | <li><hr /></li> |
| 486 | 486 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
@@ -488,43 +488,43 @@ discard block |
||
| 488 | 488 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
| 489 | 489 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
| 490 | 490 | <?php |
| 491 | - if ($globalACARS) { |
|
| 492 | - if (isset($globalDemo) && $globalDemo) { |
|
| 493 | - ?> |
|
| 491 | + if ($globalACARS) { |
|
| 492 | + if (isset($globalDemo) && $globalDemo) { |
|
| 493 | + ?> |
|
| 494 | 494 | <li><hr /></li> |
| 495 | 495 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
| 496 | 496 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
| 497 | 497 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
| 498 | 498 | <?php |
| 499 | - } else { |
|
| 500 | - ?> |
|
| 499 | + } else { |
|
| 500 | + ?> |
|
| 501 | 501 | <li><hr /></li> |
| 502 | 502 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
| 503 | 503 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
| 504 | 504 | <?php |
| 505 | - } |
|
| 506 | - } |
|
| 507 | - ?> |
|
| 505 | + } |
|
| 506 | + } |
|
| 507 | + ?> |
|
| 508 | 508 | <?php |
| 509 | - if (isset($globalAccidents) && $globalAccidents) { |
|
| 510 | - ?> |
|
| 509 | + if (isset($globalAccidents) && $globalAccidents) { |
|
| 510 | + ?> |
|
| 511 | 511 | <li><hr /></li> |
| 512 | 512 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
| 513 | 513 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
| 514 | 514 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
| 515 | 515 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
| 516 | 516 | <?php |
| 517 | - } |
|
| 518 | - ?> |
|
| 517 | + } |
|
| 518 | + ?> |
|
| 519 | 519 | <li><hr /></li> |
| 520 | 520 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
| 521 | 521 | <?php |
| 522 | 522 | if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) { |
| 523 | - ?> |
|
| 523 | + ?> |
|
| 524 | 524 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
| 525 | 525 | <?php |
| 526 | 526 | } |
| 527 | - ?> |
|
| 527 | + ?> |
|
| 528 | 528 | </ul> |
| 529 | 529 | </li> |
| 530 | 530 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
@@ -551,14 +551,14 @@ discard block |
||
| 551 | 551 | </ul> |
| 552 | 552 | <?php |
| 553 | 553 | } |
| 554 | - } |
|
| 554 | + } |
|
| 555 | 555 | ?> |
| 556 | 556 | <?php |
| 557 | - if (isset($globalMarine) && $globalMarine) { |
|
| 557 | + if (isset($globalMarine) && $globalMarine) { |
|
| 558 | 558 | ?> |
| 559 | 559 | <li class="dropdown"> |
| 560 | 560 | <?php |
| 561 | - if ($sub) { |
|
| 561 | + if ($sub) { |
|
| 562 | 562 | ?> |
| 563 | 563 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Marines"); ?> <b class="caret"></b></a> |
| 564 | 564 | <ul class="dropdown-menu multi-level"> |
@@ -601,14 +601,14 @@ discard block |
||
| 601 | 601 | } |
| 602 | 602 | ?> |
| 603 | 603 | <?php |
| 604 | - } |
|
| 604 | + } |
|
| 605 | 605 | ?> |
| 606 | 606 | <?php |
| 607 | - if (isset($globalTracker) && $globalTracker) { |
|
| 607 | + if (isset($globalTracker) && $globalTracker) { |
|
| 608 | 608 | ?> |
| 609 | 609 | <li class="dropdown"> |
| 610 | 610 | <?php |
| 611 | - if ($sub) { |
|
| 611 | + if ($sub) { |
|
| 612 | 612 | ?> |
| 613 | 613 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a> |
| 614 | 614 | <ul class="dropdown-menu multi-level"> |
@@ -642,14 +642,14 @@ discard block |
||
| 642 | 642 | } |
| 643 | 643 | ?> |
| 644 | 644 | <?php |
| 645 | - } |
|
| 645 | + } |
|
| 646 | 646 | ?> |
| 647 | 647 | <?php |
| 648 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 648 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 649 | 649 | ?> |
| 650 | 650 | <li class="dropdown"> |
| 651 | 651 | <?php |
| 652 | - if ($sub) { |
|
| 652 | + if ($sub) { |
|
| 653 | 653 | ?> |
| 654 | 654 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellites"); ?> <b class="caret"></b></a> |
| 655 | 655 | <ul class="dropdown-menu multi-level"> |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | } |
| 686 | 686 | ?> |
| 687 | 687 | <?php |
| 688 | - } |
|
| 688 | + } |
|
| 689 | 689 | ?> |
| 690 | 690 | |
| 691 | 691 | <li class="dropdown"> |
@@ -693,13 +693,13 @@ discard block |
||
| 693 | 693 | <ul class="dropdown-menu"> |
| 694 | 694 | <li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li> |
| 695 | 695 | <?php |
| 696 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 696 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 697 | 697 | ?> |
| 698 | 698 | <li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li> |
| 699 | 699 | <li><hr /></li> |
| 700 | 700 | <li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li> |
| 701 | 701 | <?php |
| 702 | - } |
|
| 702 | + } |
|
| 703 | 703 | ?> |
| 704 | 704 | <?php if (isset($globalContribute) && $globalContribute) { ?> |
| 705 | 705 | <li><hr /></li> |
@@ -723,13 +723,13 @@ discard block |
||
| 723 | 723 | <form> |
| 724 | 724 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
| 725 | 725 | <?php |
| 726 | - foreach ($alllang as $key => $lang) { |
|
| 727 | - print '<option value="'.$key.'"'; |
|
| 728 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 729 | - if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (βeta)</option>'; |
|
| 730 | - else print '>'.$lang[0].'</option>'; |
|
| 731 | - } |
|
| 732 | - ?> |
|
| 726 | + foreach ($alllang as $key => $lang) { |
|
| 727 | + print '<option value="'.$key.'"'; |
|
| 728 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 729 | + if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (βeta)</option>'; |
|
| 730 | + else print '>'.$lang[0].'</option>'; |
|
| 731 | + } |
|
| 732 | + ?> |
|
| 733 | 733 | </select> |
| 734 | 734 | </form> |
| 735 | 735 | </div> |
@@ -762,18 +762,18 @@ discard block |
||
| 762 | 762 | ?> |
| 763 | 763 | <div class="top-header clear" role="main"> |
| 764 | 764 | <?php |
| 765 | - if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 765 | + if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 766 | 766 | ?> |
| 767 | 767 | <div id="archive-map"></div> |
| 768 | 768 | <?php |
| 769 | - } |
|
| 769 | + } |
|
| 770 | 770 | ?> |
| 771 | 771 | </div> |
| 772 | 772 | <?php |
| 773 | 773 | } |
| 774 | 774 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
| 775 | 775 | { |
| 776 | - ?> |
|
| 776 | + ?> |
|
| 777 | 777 | <div class="top-header clear" role="main"> |
| 778 | 778 | <div id="map"></div> |
| 779 | 779 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -784,15 +784,15 @@ discard block |
||
| 784 | 784 | var zoom = 13; |
| 785 | 785 | //create the map |
| 786 | 786 | <?php |
| 787 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 787 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 788 | 788 | ?> |
| 789 | 789 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 790 | 790 | <?php |
| 791 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 791 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 792 | 792 | ?> |
| 793 | 793 | map = L.map('map', { zoomControl:true }); |
| 794 | 794 | <?php |
| 795 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 795 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 796 | 796 | ?> |
| 797 | 797 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 798 | 798 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -800,22 +800,22 @@ discard block |
||
| 800 | 800 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 801 | 801 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 802 | 802 | <?php |
| 803 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
| 803 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
| 804 | 804 | ?> |
| 805 | 805 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 806 | 806 | <?php |
| 807 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 807 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 808 | 808 | ?> |
| 809 | 809 | map = L.map('map', { zoomControl:true }); |
| 810 | 810 | <?php |
| 811 | - } |
|
| 811 | + } |
|
| 812 | 812 | ?> |
| 813 | 813 | //initialize the layer group for the aircrft markers |
| 814 | 814 | var layer_data = L.layerGroup(); |
| 815 | 815 | |
| 816 | 816 | //a few title layers |
| 817 | 817 | <?php |
| 818 | - if ($globalMapProvider == 'Mapbox') { |
|
| 818 | + if ($globalMapProvider == 'Mapbox') { |
|
| 819 | 819 | ?> |
| 820 | 820 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 821 | 821 | maxZoom: 18, |
@@ -826,14 +826,14 @@ discard block |
||
| 826 | 826 | token : '<?php print $globalMapboxToken; ?>' |
| 827 | 827 | }).addTo(map); |
| 828 | 828 | <?php |
| 829 | - } elseif ($globalMapProvider == 'Mapbox-GL') { |
|
| 829 | + } elseif ($globalMapProvider == 'Mapbox-GL') { |
|
| 830 | 830 | ?> |
| 831 | 831 | L.mapboxGL({ |
| 832 | 832 | accessToken: '<?php print $globalMapboxToken; ?>', |
| 833 | 833 | style: 'mapbox://styles/mapbox/bright-v8' |
| 834 | 834 | }).addTo(map); |
| 835 | 835 | <?php |
| 836 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 836 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 837 | 837 | ?> |
| 838 | 838 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
| 839 | 839 | maxZoom: 18, |
@@ -842,7 +842,7 @@ discard block |
||
| 842 | 842 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
| 843 | 843 | }).addTo(map); |
| 844 | 844 | <?php |
| 845 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 845 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 846 | 846 | ?> |
| 847 | 847 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
| 848 | 848 | maxZoom: 18, |
@@ -851,27 +851,27 @@ discard block |
||
| 851 | 851 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
| 852 | 852 | }).addTo(map); |
| 853 | 853 | <?php |
| 854 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 854 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 855 | 855 | ?> |
| 856 | 856 | var googleLayer = new L.Google('ROADMAP'); |
| 857 | 857 | map.addLayer(googleLayer); |
| 858 | 858 | <?php |
| 859 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 859 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 860 | 860 | ?> |
| 861 | 861 | var googleLayer = new L.Google('SATELLITE'); |
| 862 | 862 | map.addLayer(googleLayer); |
| 863 | 863 | <?php |
| 864 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 864 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 865 | 865 | ?> |
| 866 | 866 | var googleLayer = new L.Google('HYBRID'); |
| 867 | 867 | map.addLayer(googleLayer); |
| 868 | 868 | <?php |
| 869 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 869 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 870 | 870 | ?> |
| 871 | 871 | var googleLayer = new L.Google('Terrain'); |
| 872 | 872 | map.addLayer(googleLayer); |
| 873 | 873 | <?php |
| 874 | - } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 874 | + } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 875 | 875 | $customid = $globalMapProvider; |
| 876 | 876 | ?> |
| 877 | 877 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
@@ -881,7 +881,7 @@ discard block |
||
| 881 | 881 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 882 | 882 | }).addTo(map); |
| 883 | 883 | <?php |
| 884 | - } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) { |
|
| 884 | + } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) { |
|
| 885 | 885 | ?> |
| 886 | 886 | var center = map.getCenter(); |
| 887 | 887 | map.options.crs = L.CRS.EPSG4326; |
@@ -896,8 +896,8 @@ discard block |
||
| 896 | 896 | attribution: 'Natural Earth' |
| 897 | 897 | }).addTo(map); |
| 898 | 898 | <?php |
| 899 | - //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 900 | - } else { |
|
| 899 | + //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 900 | + } else { |
|
| 901 | 901 | ?> |
| 902 | 902 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 903 | 903 | maxZoom: 18, |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | }).addTo(map); |
| 907 | 907 | |
| 908 | 908 | <?php |
| 909 | - } |
|
| 909 | + } |
|
| 910 | 910 | ?> |
| 911 | 911 | </script> |
| 912 | 912 | </div> |
@@ -14,35 +14,35 @@ discard block |
||
| 14 | 14 | if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline'; |
| 15 | 15 | |
| 16 | 16 | if (isset($_GET['3d'])) { |
| 17 | - setcookie('MapFormat','3d'); |
|
| 17 | + setcookie('MapFormat', '3d'); |
|
| 18 | 18 | } else if (isset($_GET['2d'])) { |
| 19 | - setcookie('MapFormat','2d'); |
|
| 19 | + setcookie('MapFormat', '2d'); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
| 23 | - $tsk = filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); |
|
| 23 | + $tsk = filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | if (isset($_POST['archive'])) { |
| 27 | - setcookie('archive','true'); |
|
| 28 | - setcookie('archive_begin',strtotime($_POST['start_date'])); |
|
| 29 | - setcookie('archive_end',strtotime($_POST['end_date'])); |
|
| 30 | - setcookie('archive_speed',$_POST['archivespeed']); |
|
| 27 | + setcookie('archive', 'true'); |
|
| 28 | + setcookie('archive_begin', strtotime($_POST['start_date'])); |
|
| 29 | + setcookie('archive_end', strtotime($_POST['end_date'])); |
|
| 30 | + setcookie('archive_speed', $_POST['archivespeed']); |
|
| 31 | 31 | } |
| 32 | 32 | if (isset($_POST['noarchive'])) { |
| 33 | - setcookie('archive','false',-1); |
|
| 34 | - setcookie('archive_begin','',-1); |
|
| 35 | - setcookie('archive_end','',-1); |
|
| 36 | - setcookie('archive_speed','',-1); |
|
| 33 | + setcookie('archive', 'false', -1); |
|
| 34 | + setcookie('archive_begin', '', -1); |
|
| 35 | + setcookie('archive_end', '', -1); |
|
| 36 | + setcookie('archive_speed', '', -1); |
|
| 37 | 37 | } |
| 38 | 38 | // When button "Remove all filters" is clicked |
| 39 | 39 | if (isset($_POST['removefilters'])) { |
| 40 | - $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
|
| 41 | - return strpos($key,'filter_') === 0; |
|
| 40 | + $allfilters = array_filter(array_keys($_COOKIE), function($key) { |
|
| 41 | + return strpos($key, 'filter_') === 0; |
|
| 42 | 42 | }); |
| 43 | 43 | foreach ($allfilters as $filt) { |
| 44 | 44 | unset($_COOKIE[$filt]); |
| 45 | - setcookie($filt,null,-1); |
|
| 45 | + setcookie($filt, null, -1); |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | ?> |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 251 | 251 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 252 | 252 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 253 | -<script type="text/javascript" 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> |
|
| 253 | +<script type="text/javascript" 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> |
|
| 254 | 254 | <?php |
| 255 | 255 | if (!isset($type) || $type == 'aircraft') { |
| 256 | 256 | ?> |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 324 | 324 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 325 | 325 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 326 | -<script type="text/javascript" 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> |
|
| 326 | +<script type="text/javascript" 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> |
|
| 327 | 327 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
| 328 | 328 | <?php |
| 329 | 329 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -743,8 +743,8 @@ discard block |
||
| 743 | 743 | ?> |
| 744 | 744 | <div class="search"> |
| 745 | 745 | <form action="<?php print $globalURL; ?>/search" method="get"> |
| 746 | - <!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>--> |
|
| 747 | - <input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != ""){ print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
|
| 746 | + <!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != "") { print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>--> |
|
| 747 | + <input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != "") { print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
|
| 748 | 748 | </form> |
| 749 | 749 | </div> |
| 750 | 750 | <div class="social"> |
@@ -762,7 +762,7 @@ discard block |
||
| 762 | 762 | print '</div>'; |
| 763 | 763 | } |
| 764 | 764 | |
| 765 | -if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
|
| 765 | +if (strtolower($current_page) == 'ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
|
| 766 | 766 | ?> |
| 767 | 767 | <div class="top-header clear" role="main"> |
| 768 | 768 | <?php |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | </div> |
| 776 | 776 | <?php |
| 777 | 777 | } |
| 778 | -if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
|
| 778 | +if ((strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) || (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false)) |
|
| 779 | 779 | { |
| 780 | 780 | ?> |
| 781 | 781 | <div class="top-header clear" role="main"> |
@@ -788,15 +788,15 @@ discard block |
||
| 788 | 788 | var zoom = 13; |
| 789 | 789 | //create the map |
| 790 | 790 | <?php |
| 791 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 791 | + if (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 792 | 792 | ?> |
| 793 | 793 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 794 | 794 | <?php |
| 795 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 795 | + } elseif (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) { |
|
| 796 | 796 | ?> |
| 797 | 797 | map = L.map('map', { zoomControl:true }); |
| 798 | 798 | <?php |
| 799 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 799 | + } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 800 | 800 | ?> |
| 801 | 801 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 802 | 802 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 805 | 805 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 806 | 806 | <?php |
| 807 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
| 807 | + } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
| 808 | 808 | ?> |
| 809 | 809 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 810 | 810 | <?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'); |
@@ -210,7 +217,10 @@ discard block |
||
| 210 | 217 | <?php |
| 211 | 218 | } else { |
| 212 | 219 | ?> |
| 213 | -<script type="text/javascript" src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) print '&tsk='.$tsk; ?>"></script> |
|
| 220 | +<script type="text/javascript" src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) { |
|
| 221 | + print '&tsk='.$tsk; |
|
| 222 | +} |
|
| 223 | +?>"></script> |
|
| 214 | 224 | <?php |
| 215 | 225 | } |
| 216 | 226 | if (!isset($globalAircraft) || $globalAircraft) { |
@@ -250,7 +260,13 @@ discard block |
||
| 250 | 260 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 251 | 261 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 252 | 262 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 253 | -<script type="text/javascript" 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> |
|
| 263 | +<script type="text/javascript" src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
| 264 | + print '&latitude='.$latitude; |
|
| 265 | +} |
|
| 266 | +?><?php if(isset($longitude)) { |
|
| 267 | + print '&longitude='.$longitude; |
|
| 268 | +} |
|
| 269 | +?>&<?php print time(); ?>"></script> |
|
| 254 | 270 | <?php |
| 255 | 271 | if (!isset($type) || $type == 'aircraft') { |
| 256 | 272 | ?> |
@@ -323,7 +339,13 @@ discard block |
||
| 323 | 339 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 324 | 340 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 325 | 341 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 326 | -<script type="text/javascript" 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> |
|
| 342 | +<script type="text/javascript" src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
| 343 | + print '&latitude='.$latitude; |
|
| 344 | +} |
|
| 345 | +?><?php if(isset($longitude)) { |
|
| 346 | + print '&longitude='.$longitude; |
|
| 347 | +} |
|
| 348 | +?>&<?php print time(); ?>"></script> |
|
| 327 | 349 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
| 328 | 350 | <?php |
| 329 | 351 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -389,7 +411,9 @@ discard block |
||
| 389 | 411 | } |
| 390 | 412 | ?> |
| 391 | 413 | <?php |
| 392 | -if (isset($globalPubHeader)) print $globalPubHeader; |
|
| 414 | +if (isset($globalPubHeader)) { |
|
| 415 | + print $globalPubHeader; |
|
| 416 | +} |
|
| 393 | 417 | ?> |
| 394 | 418 | |
| 395 | 419 | <meta property="og:title" content="<?php print $title; ?> | <?php print $globalName; ?>"/> |
@@ -407,7 +431,12 @@ discard block |
||
| 407 | 431 | <span class="icon-bar"></span> |
| 408 | 432 | </button> |
| 409 | 433 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle search"><i class="fa fa-search"></i></a> |
| 410 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 434 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
| 435 | + print '/'; |
|
| 436 | +} else { |
|
| 437 | + print $globalURL; |
|
| 438 | +} |
|
| 439 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 411 | 440 | </div> |
| 412 | 441 | <div class="collapse navbar-collapse"> |
| 413 | 442 | |
@@ -462,7 +491,10 @@ discard block |
||
| 462 | 491 | } |
| 463 | 492 | ?> |
| 464 | 493 | |
| 465 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 494 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 495 | + echo 'right-'; |
|
| 496 | +} |
|
| 497 | +?>caret"></b></a> |
|
| 466 | 498 | <ul class="dropdown-menu"> |
| 467 | 499 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li> |
| 468 | 500 | <?php |
@@ -533,8 +565,14 @@ discard block |
||
| 533 | 565 | </li> |
| 534 | 566 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
| 535 | 567 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
| 536 | - <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
|
| 537 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 568 | + <li class="dropdown<?php if ($sub) { |
|
| 569 | + echo '-submenu'; |
|
| 570 | +} |
|
| 571 | +?>"> |
|
| 572 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) { |
|
| 573 | + echo 'right-'; |
|
| 574 | +} |
|
| 575 | +?>caret"></b></a> |
|
| 538 | 576 | <ul class="dropdown-menu"> |
| 539 | 577 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
| 540 | 578 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
@@ -578,7 +616,10 @@ discard block |
||
| 578 | 616 | <?php |
| 579 | 617 | } |
| 580 | 618 | ?> |
| 581 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 619 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 620 | + echo 'right-'; |
|
| 621 | +} |
|
| 622 | +?>caret"></b></a> |
|
| 582 | 623 | <ul class="dropdown-menu"> |
| 583 | 624 | <?php |
| 584 | 625 | if (isset($globalVM) && $globalVM) { |
@@ -628,7 +669,10 @@ discard block |
||
| 628 | 669 | <?php |
| 629 | 670 | } |
| 630 | 671 | ?> |
| 631 | - <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> |
|
| 632 | 676 | <ul class="dropdown-menu"> |
| 633 | 677 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
| 634 | 678 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -671,7 +715,10 @@ discard block |
||
| 671 | 715 | ?> |
| 672 | 716 | |
| 673 | 717 | <!-- |
| 674 | - <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> |
|
| 675 | 722 | <ul class="dropdown-menu"> |
| 676 | 723 | <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li> |
| 677 | 724 | <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -729,9 +776,14 @@ discard block |
||
| 729 | 776 | <?php |
| 730 | 777 | foreach ($alllang as $key => $lang) { |
| 731 | 778 | print '<option value="'.$key.'"'; |
| 732 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 733 | - if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (βeta)</option>'; |
|
| 734 | - else print '>'.$lang[0].'</option>'; |
|
| 779 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
| 780 | + print ' selected '; |
|
| 781 | + } |
|
| 782 | + if ($lang[0] == 'Deutsch') { |
|
| 783 | + print '>'.$lang[0].' (βeta)</option>'; |
|
| 784 | + } else { |
|
| 785 | + print '>'.$lang[0].'</option>'; |
|
| 786 | + } |
|
| 735 | 787 | } |
| 736 | 788 | ?> |
| 737 | 789 | </select> |
@@ -879,9 +931,24 @@ discard block |
||
| 879 | 931 | $customid = $globalMapProvider; |
| 880 | 932 | ?> |
| 881 | 933 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
| 882 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
| 883 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 884 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 934 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 935 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 936 | +} else { |
|
| 937 | + print '18'; |
|
| 938 | +} |
|
| 939 | +?>, |
|
| 940 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 941 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 942 | +} else { |
|
| 943 | + print '0'; |
|
| 944 | +} |
|
| 945 | +?>, |
|
| 946 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 947 | + print 'false'; |
|
| 948 | +} else { |
|
| 949 | + print 'true'; |
|
| 950 | +} |
|
| 951 | +?>, |
|
| 885 | 952 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 886 | 953 | }).addTo(map); |
| 887 | 954 | <?php |
@@ -896,7 +963,12 @@ discard block |
||
| 896 | 963 | maxZoom: 5, |
| 897 | 964 | tms : true, |
| 898 | 965 | zindex : 3, |
| 899 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 966 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 967 | + print 'false'; |
|
| 968 | +} else { |
|
| 969 | + print 'true'; |
|
| 970 | +} |
|
| 971 | +?>, |
|
| 900 | 972 | attribution: 'Natural Earth' |
| 901 | 973 | }).addTo(map); |
| 902 | 974 | <?php |
@@ -919,4 +991,7 @@ discard block |
||
| 919 | 991 | |
| 920 | 992 | ?> |
| 921 | 993 | |
| 922 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
| 994 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
| 995 | + print 'index '; |
|
| 996 | +} |
|
| 997 | +?>clear"> |
|
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | <button type="button" class="close">×</button> |
| 10 | 10 | <?php |
| 11 | 11 | |
| 12 | -$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING); |
|
| 12 | +$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING); |
|
| 13 | 13 | $sat = urldecode($sat); |
| 14 | 14 | //$info = $Satellite->get_info(str_replace(' ','-',$sat)); |
| 15 | 15 | //print_r($info); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $aircraft_name = 'INTEGRAL'; |
| 49 | 49 | // $ground_speed = 14970; |
| 50 | 50 | $launch_date = '17 October 2002'; |
| 51 | -} elseif (strpos($sat,'IRIDIUM') !== false) { |
|
| 51 | +} elseif (strpos($sat, 'IRIDIUM') !== false) { |
|
| 52 | 52 | $image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg'; |
| 53 | 53 | $image_copyright = 'Cliff'; |
| 54 | 54 | $ident = 'Iridium satellite constellation'; |
@@ -56,23 +56,23 @@ discard block |
||
| 56 | 56 | $aircraft_name = $sat; |
| 57 | 57 | // $ground_speed = 14970; |
| 58 | 58 | // $launch_date = '29 september 2011'; |
| 59 | -} elseif (strpos($sat,'ORBCOMM') !== false) { |
|
| 59 | +} elseif (strpos($sat, 'ORBCOMM') !== false) { |
|
| 60 | 60 | $ident = 'Orbcomm'; |
| 61 | 61 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)'; |
| 62 | 62 | $aircraft_name = $sat; |
| 63 | -} elseif (strpos($sat,'GLOBALSTAR') !== false) { |
|
| 63 | +} elseif (strpos($sat, 'GLOBALSTAR') !== false) { |
|
| 64 | 64 | $ident = 'Globalstar'; |
| 65 | 65 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar'; |
| 66 | 66 | $aircraft_name = $sat; |
| 67 | - $satname = str_replace(array('[+]','[-]'),'',$sat); |
|
| 68 | -} elseif (strpos($sat,'OSCAR 7') !== false) { |
|
| 67 | + $satname = str_replace(array('[+]', '[-]'), '', $sat); |
|
| 68 | +} elseif (strpos($sat, 'OSCAR 7') !== false) { |
|
| 69 | 69 | $image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg'; |
| 70 | 70 | $image_copyright = 'Amsat.org'; |
| 71 | 71 | $ident = 'AMSAT-OSCAR 7'; |
| 72 | 72 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/AMSAT-OSCAR_7'; |
| 73 | 73 | $aircraft_name = $sat; |
| 74 | 74 | $launch_date = '15 November 1974'; |
| 75 | -} elseif (strpos($sat,'santaclaus') !== false) { |
|
| 75 | +} elseif (strpos($sat, 'santaclaus') !== false) { |
|
| 76 | 76 | $image = 'https://upload.wikimedia.org/wikipedia/commons/4/49/Jonathan_G_Meath_portrays_Santa_Claus.jpg'; |
| 77 | 77 | $image_copyright = 'Jonathan G Meath'; |
| 78 | 78 | $ident = 'Santa Claus'; |
@@ -81,8 +81,8 @@ discard block |
||
| 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, '(')) $satname = $sat; |
|
| 85 | + else $satname = str_replace(array(' '), '-', $sat); |
|
| 86 | 86 | } |
| 87 | 87 | if (!isset($satname)) $satname = $sat; |
| 88 | 88 | if ($satname != 'santaclaus') { |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | print '<div><span>'._("Orbit").'</span>'.$info['orbit'].'</div>'; |
| 157 | 157 | } |
| 158 | 158 | if ($info['launch_date'] != '') { |
| 159 | - print '<div><span>'._("Launch Date").'</span>'.date('Y-m-d',strtotime($info['launch_date'])).'</div>'; |
|
| 159 | + print '<div><span>'._("Launch Date").'</span>'.date('Y-m-d', strtotime($info['launch_date'])).'</div>'; |
|
| 160 | 160 | } |
| 161 | 161 | if ($info['launch_site'] != '') { |
| 162 | 162 | print '<div><span>'._("Launch Site").'</span>'.$info['launch_site'].'</div>'; |
@@ -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 | if ($satname != 'santaclaus') { |
| 89 | 94 | $info = $Satellite->get_info(strtolower(trim($satname))); |
| 90 | 95 | $position = $Satellite->position($sat); |
@@ -18,7 +18,9 @@ discard block |
||
| 18 | 18 | public function __construct($dbc = null) { |
| 19 | 19 | $Connection = new Connection($dbc); |
| 20 | 20 | $this->db = $Connection->db; |
| 21 | - if ($this->db === null) die('Error: No DB connection. (Source)'); |
|
| 21 | + if ($this->db === null) { |
|
| 22 | + die('Error: No DB connection. (Source)'); |
|
| 23 | + } |
|
| 22 | 24 | } |
| 23 | 25 | |
| 24 | 26 | public function getAllLocationInfo() { |
@@ -83,7 +85,9 @@ discard block |
||
| 83 | 85 | $query .= " AND source_location.latitude BETWEEN ".$minlat." AND ".$maxlat." AND source_location.longitude BETWEEN ".$minlong." AND ".$maxlong." AND source_location.latitude <> 0 AND source_location.longitude <> 0"; |
| 84 | 86 | } |
| 85 | 87 | $query .= " ORDER BY last_seen DESC"; |
| 86 | - if ($limit) $query .= " LIMIT 1000"; |
|
| 88 | + if ($limit) { |
|
| 89 | + $query .= " LIMIT 1000"; |
|
| 90 | + } |
|
| 87 | 91 | $query_values = array(':type' => $type); |
| 88 | 92 | try { |
| 89 | 93 | $sth = $this->db->prepare($query); |
@@ -122,7 +126,9 @@ discard block |
||
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '', $description = '') { |
| 125 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
| 129 | + if ($last_seen == '') { |
|
| 130 | + $last_seen = date('Y-m-d H:i:s'); |
|
| 131 | + } |
|
| 126 | 132 | $query = "INSERT INTO source_location (name,latitude,longitude,altitude,country,city,logo,source,type,source_id,last_seen,location_id,description) VALUES (:name,:latitude,:longitude,:altitude,:country,:city,:logo,:source,:type,:source_id,:last_seen,:location_id,:description)"; |
| 127 | 133 | $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
| 128 | 134 | try { |
@@ -134,7 +140,9 @@ discard block |
||
| 134 | 140 | } |
| 135 | 141 | |
| 136 | 142 | public function updateLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '',$description = '') { |
| 137 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
| 143 | + if ($last_seen == '') { |
|
| 144 | + $last_seen = date('Y-m-d H:i:s'); |
|
| 145 | + } |
|
| 138 | 146 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, source_id = :source_id, last_seen = :last_seen,location_id = :location_id, description = :description WHERE name = :name AND source = :source"; |
| 139 | 147 | $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
| 140 | 148 | try { |
@@ -157,7 +165,9 @@ discard block |
||
| 157 | 165 | } |
| 158 | 166 | |
| 159 | 167 | public function updateLocationByLocationID($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0, $location_id,$last_seen = '',$description = '') { |
| 160 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
| 168 | + if ($last_seen == '') { |
|
| 169 | + $last_seen = date('Y-m-d H:i:s'); |
|
| 170 | + } |
|
| 161 | 171 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, last_seen = :last_seen, description = :description WHERE location_id = :location_id AND source = :source AND source_id = :source_id"; |
| 162 | 172 | $query_values = array(':source_id' => $source_id,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
| 163 | 173 | try { |
@@ -60,11 +60,11 @@ |
||
| 60 | 60 | return $all; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * @param $name |
|
| 65 | - * @return array |
|
| 66 | - */ |
|
| 67 | - public function getLocationInfobySourceName($name) { |
|
| 63 | + /** |
|
| 64 | + * @param $name |
|
| 65 | + * @return array |
|
| 66 | + */ |
|
| 67 | + public function getLocationInfobySourceName($name) { |
|
| 68 | 68 | $query = "SELECT * FROM source_location WHERE source = :name"; |
| 69 | 69 | $query_values = array(':name' => $name); |
| 70 | 70 | try { |
@@ -187,6 +187,9 @@ |
||
| 187 | 187 | return ''; |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | + /** |
|
| 191 | + * @param string $type |
|
| 192 | + */ |
|
| 190 | 193 | public function deleteLocationByType($type) { |
| 191 | 194 | $query = "DELETE FROM source_location WHERE type = :type"; |
| 192 | 195 | $query_values = array(':type' => $type); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | try { |
| 28 | 28 | $sth = $this->db->prepare($query); |
| 29 | 29 | $sth->execute($query_values); |
| 30 | - } catch(PDOException $e) { |
|
| 30 | + } catch (PDOException $e) { |
|
| 31 | 31 | return "error : ".$e->getMessage(); |
| 32 | 32 | } |
| 33 | 33 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -40,20 +40,20 @@ discard block |
||
| 40 | 40 | try { |
| 41 | 41 | $sth = $this->db->prepare($query); |
| 42 | 42 | $sth->execute($query_values); |
| 43 | - } catch(PDOException $e) { |
|
| 43 | + } catch (PDOException $e) { |
|
| 44 | 44 | return "error : ".$e->getMessage(); |
| 45 | 45 | } |
| 46 | 46 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 47 | 47 | return $all; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - public function getLocationInfobyNameType($name,$type) { |
|
| 50 | + public function getLocationInfobyNameType($name, $type) { |
|
| 51 | 51 | $query = "SELECT * FROM source_location WHERE name = :name AND type = :type"; |
| 52 | - $query_values = array(':name' => $name,':type' => $type); |
|
| 52 | + $query_values = array(':name' => $name, ':type' => $type); |
|
| 53 | 53 | try { |
| 54 | 54 | $sth = $this->db->prepare($query); |
| 55 | 55 | $sth->execute($query_values); |
| 56 | - } catch(PDOException $e) { |
|
| 56 | + } catch (PDOException $e) { |
|
| 57 | 57 | return "error : ".$e->getMessage(); |
| 58 | 58 | } |
| 59 | 59 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | try { |
| 71 | 71 | $sth = $this->db->prepare($query); |
| 72 | 72 | $sth->execute($query_values); |
| 73 | - } catch(PDOException $e) { |
|
| 73 | + } catch (PDOException $e) { |
|
| 74 | 74 | echo "error : ".$e->getMessage(); |
| 75 | 75 | return array(); |
| 76 | 76 | } |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | public function getLocationInfoByType($type, $coord = array(), $limit = false) { |
| 82 | 82 | $query = "SELECT * FROM source_location WHERE type = :type"; |
| 83 | 83 | if (is_array($coord) && !empty($coord) && count($coord) == 4) { |
| 84 | - $minlong = filter_var($coord[0],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 85 | - $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 86 | - $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 87 | - $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
| 84 | + $minlong = filter_var($coord[0], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 85 | + $minlat = filter_var($coord[1], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 86 | + $maxlong = filter_var($coord[2], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 87 | + $maxlat = filter_var($coord[3], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
| 88 | 88 | $query .= " AND source_location.latitude BETWEEN ".$minlat." AND ".$maxlat." AND source_location.longitude BETWEEN ".$minlong." AND ".$maxlong." AND source_location.latitude <> 0 AND source_location.longitude <> 0"; |
| 89 | 89 | } |
| 90 | 90 | $query .= " ORDER BY last_seen DESC"; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | try { |
| 94 | 94 | $sth = $this->db->prepare($query); |
| 95 | 95 | $sth->execute($query_values); |
| 96 | - } catch(PDOException $e) { |
|
| 96 | + } catch (PDOException $e) { |
|
| 97 | 97 | return "error : ".$e->getMessage(); |
| 98 | 98 | } |
| 99 | 99 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | try { |
| 107 | 107 | $sth = $this->db->prepare($query); |
| 108 | 108 | $sth->execute($query_values); |
| 109 | - } catch(PDOException $e) { |
|
| 109 | + } catch (PDOException $e) { |
|
| 110 | 110 | return "error : ".$e->getMessage(); |
| 111 | 111 | } |
| 112 | 112 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -119,58 +119,58 @@ discard block |
||
| 119 | 119 | try { |
| 120 | 120 | $sth = $this->db->prepare($query); |
| 121 | 121 | $sth->execute($query_values); |
| 122 | - } catch(PDOException $e) { |
|
| 122 | + } catch (PDOException $e) { |
|
| 123 | 123 | return "error : ".$e->getMessage(); |
| 124 | 124 | } |
| 125 | 125 | $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
| 126 | 126 | return $all; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '', $description = '') { |
|
| 129 | + public function addLocation($name, $latitude, $longitude, $altitude, $city, $country, $source, $logo = 'antenna.png', $type = '', $source_id = 0, $location_id = 0, $last_seen = '', $description = '') { |
|
| 130 | 130 | if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
| 131 | 131 | $query = "INSERT INTO source_location (name,latitude,longitude,altitude,country,city,logo,source,type,source_id,last_seen,location_id,description) VALUES (:name,:latitude,:longitude,:altitude,:country,:city,:logo,:source,:type,:source_id,:last_seen,:location_id,:description)"; |
| 132 | - $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
|
| 132 | + $query_values = array(':name' => $name, ':latitude' => $latitude, ':longitude' => $longitude, ':altitude' => $altitude, ':city' => $city, ':country' => $country, ':logo' => $logo, ':source' => $source, ':type' => $type, ':source_id' => $source_id, ':last_seen' => $last_seen, ':location_id' => $location_id, ':description' => $description); |
|
| 133 | 133 | try { |
| 134 | 134 | $sth = $this->db->prepare($query); |
| 135 | 135 | $sth->execute($query_values); |
| 136 | - } catch(PDOException $e) { |
|
| 136 | + } catch (PDOException $e) { |
|
| 137 | 137 | echo "error : ".$e->getMessage(); |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - public function updateLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '',$description = '') { |
|
| 141 | + public function updateLocation($name, $latitude, $longitude, $altitude, $city, $country, $source, $logo = 'antenna.png', $type = '', $source_id = 0, $location_id = 0, $last_seen = '', $description = '') { |
|
| 142 | 142 | if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
| 143 | 143 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, source_id = :source_id, last_seen = :last_seen,location_id = :location_id, description = :description WHERE name = :name AND source = :source"; |
| 144 | - $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
|
| 144 | + $query_values = array(':name' => $name, ':latitude' => $latitude, ':longitude' => $longitude, ':altitude' => $altitude, ':city' => $city, ':country' => $country, ':logo' => $logo, ':source' => $source, ':type' => $type, ':source_id' => $source_id, ':last_seen' => $last_seen, ':location_id' => $location_id, ':description' => $description); |
|
| 145 | 145 | try { |
| 146 | 146 | $sth = $this->db->prepare($query); |
| 147 | 147 | $sth->execute($query_values); |
| 148 | - } catch(PDOException $e) { |
|
| 148 | + } catch (PDOException $e) { |
|
| 149 | 149 | return "error : ".$e->getMessage(); |
| 150 | 150 | } |
| 151 | 151 | return ''; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - public function updateLocationDescByName($name,$source,$source_id = 0,$description = '') { |
|
| 154 | + public function updateLocationDescByName($name, $source, $source_id = 0, $description = '') { |
|
| 155 | 155 | $query = "UPDATE source_location SET description = :description WHERE source_id = :source_id AND name = :name AND source = :source"; |
| 156 | - $query_values = array(':name' => $name,':source' => $source,':source_id' => $source_id,':description' => $description); |
|
| 156 | + $query_values = array(':name' => $name, ':source' => $source, ':source_id' => $source_id, ':description' => $description); |
|
| 157 | 157 | try { |
| 158 | 158 | $sth = $this->db->prepare($query); |
| 159 | 159 | $sth->execute($query_values); |
| 160 | - } catch(PDOException $e) { |
|
| 160 | + } catch (PDOException $e) { |
|
| 161 | 161 | return "error : ".$e->getMessage(); |
| 162 | 162 | } |
| 163 | 163 | return ''; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - public function updateLocationByLocationID($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0, $location_id,$last_seen = '',$description = '') { |
|
| 166 | + public function updateLocationByLocationID($name, $latitude, $longitude, $altitude, $city, $country, $source, $logo = 'antenna.png', $type = '', $source_id = 0, $location_id, $last_seen = '', $description = '') { |
|
| 167 | 167 | if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
| 168 | 168 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, last_seen = :last_seen, description = :description WHERE location_id = :location_id AND source = :source AND source_id = :source_id"; |
| 169 | - $query_values = array(':source_id' => $source_id,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
|
| 169 | + $query_values = array(':source_id' => $source_id, ':latitude' => $latitude, ':longitude' => $longitude, ':altitude' => $altitude, ':city' => $city, ':country' => $country, ':logo' => $logo, ':source' => $source, ':type' => $type, ':last_seen' => $last_seen, ':location_id' => $location_id, ':description' => $description); |
|
| 170 | 170 | try { |
| 171 | 171 | $sth = $this->db->prepare($query); |
| 172 | 172 | $sth->execute($query_values); |
| 173 | - } catch(PDOException $e) { |
|
| 173 | + } catch (PDOException $e) { |
|
| 174 | 174 | echo "error : ".$e->getMessage(); |
| 175 | 175 | } |
| 176 | 176 | } |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | try { |
| 182 | 182 | $sth = $this->db->prepare($query); |
| 183 | 183 | $sth->execute($query_values); |
| 184 | - } catch(PDOException $e) { |
|
| 184 | + } catch (PDOException $e) { |
|
| 185 | 185 | return "error : ".$e->getMessage(); |
| 186 | 186 | } |
| 187 | 187 | return ''; |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | try { |
| 194 | 194 | $sth = $this->db->prepare($query); |
| 195 | 195 | $sth->execute($query_values); |
| 196 | - } catch(PDOException $e) { |
|
| 196 | + } catch (PDOException $e) { |
|
| 197 | 197 | return "error : ".$e->getMessage(); |
| 198 | 198 | } |
| 199 | 199 | return ''; |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | try { |
| 206 | 206 | $sth = $this->db->prepare($query); |
| 207 | 207 | $sth->execute($query_values); |
| 208 | - } catch(PDOException $e) { |
|
| 208 | + } catch (PDOException $e) { |
|
| 209 | 209 | return "error : ".$e->getMessage(); |
| 210 | 210 | } |
| 211 | 211 | return ''; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | try { |
| 217 | 217 | $sth = $this->db->prepare($query); |
| 218 | 218 | $sth->execute(); |
| 219 | - } catch(PDOException $e) { |
|
| 219 | + } catch (PDOException $e) { |
|
| 220 | 220 | return "error : ".$e->getMessage(); |
| 221 | 221 | } |
| 222 | 222 | return ''; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | try { |
| 247 | 247 | $sth = $this->db->prepare($query); |
| 248 | 248 | $sth->execute(array(':type' => $type)); |
| 249 | - } catch(PDOException $e) { |
|
| 249 | + } catch (PDOException $e) { |
|
| 250 | 250 | return "error"; |
| 251 | 251 | } |
| 252 | 252 | return "success"; |
@@ -57,21 +57,30 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | document.cookie = 'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 59 | 59 | <?php |
| 60 | - if (isset($_COOKIE['MapType3D'])) $MapType = $_COOKIE['MapType3D']; |
|
| 61 | - else $MapType = $globalMapProvider; |
|
| 62 | -// unset($_COOKIE['MapType']); |
|
| 60 | + if (isset($_COOKIE['MapType3D'])) { |
|
| 61 | + $MapType = $_COOKIE['MapType3D']; |
|
| 62 | + } else { |
|
| 63 | + $MapType = $globalMapProvider; |
|
| 64 | + } |
|
| 65 | + // unset($_COOKIE['MapType']); |
|
| 63 | 66 | |
| 64 | 67 | if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline' && $MapType != 'ArcGIS-Streetmap' && $MapType != 'ArcGIS-Satellite' && $MapType != 'NatGeo-Street') { |
| 65 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial'; |
|
| 66 | - else $MapType = 'OpenStreetMap'; |
|
| 68 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 69 | + $MapType = 'Bing-Aerial'; |
|
| 70 | + } else { |
|
| 71 | + $MapType = 'OpenStreetMap'; |
|
| 72 | + } |
|
| 67 | 73 | } |
| 68 | 74 | if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) { |
| 69 | 75 | $MapType = 'OpenStreetMap'; |
| 70 | 76 | } |
| 71 | 77 | if ($MapType == 'Mapbox') { |
| 72 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
| 73 | - else $MapBoxId = $_COOKIE['MapType3DId']; |
|
| 74 | -?> |
|
| 78 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
| 79 | + $MapBoxId = $globalMapboxId; |
|
| 80 | + } else { |
|
| 81 | + $MapBoxId = $_COOKIE['MapType3DId']; |
|
| 82 | + } |
|
| 83 | + ?> |
|
| 75 | 84 | var imProv = Cesium.MapboxImageryProvider({ |
| 76 | 85 | credit: 'Map data © OpenStreetMap contributors, ' + |
| 77 | 86 | 'CC-BY-SA, ' + |
@@ -153,13 +162,23 @@ discard block |
||
| 153 | 162 | credit : 'Imagery courtesy Natural Earth' |
| 154 | 163 | }); |
| 155 | 164 | <?php |
| 156 | - } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
| 165 | + } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
| 157 | 166 | $customid = $MapType; |
| 158 | 167 | ?> |
| 159 | 168 | var imProv = Cesium.createOpenStreetMapImageryProvider({ |
| 160 | 169 | url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>', |
| 161 | - maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>, |
|
| 162 | - minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 170 | + maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 171 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 172 | +} else { |
|
| 173 | + print '99'; |
|
| 174 | +} |
|
| 175 | +?>, |
|
| 176 | + minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 177 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 178 | +} else { |
|
| 179 | + print '0'; |
|
| 180 | +} |
|
| 181 | +?>, |
|
| 163 | 182 | credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 164 | 183 | }); |
| 165 | 184 | <?php |
@@ -449,7 +468,12 @@ discard block |
||
| 449 | 468 | imageryProvider : imProv, |
| 450 | 469 | timeline : archive, |
| 451 | 470 | animation : false, |
| 452 | - shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) print 'false'; else print 'true'; ?>, |
|
| 471 | + shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) { |
|
| 472 | + print 'false'; |
|
| 473 | +} else { |
|
| 474 | + print 'true'; |
|
| 475 | +} |
|
| 476 | +?>, |
|
| 453 | 477 | infoBox : false, |
| 454 | 478 | navigationHelpButton : false, |
| 455 | 479 | geocoder : false, |
@@ -464,8 +488,11 @@ discard block |
||
| 464 | 488 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
| 465 | 489 | if (isset($_COOKIE['lastcentercoord'])) { |
| 466 | 490 | $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
| 467 | - if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
|
| 468 | - else $zoom = $lastcentercoord[3]; |
|
| 491 | + if (!isset($lastcentercoord[3])) { |
|
| 492 | + $zoom = $lastcentercoord[2]*1000000.0; |
|
| 493 | + } else { |
|
| 494 | + $zoom = $lastcentercoord[3]; |
|
| 495 | + } |
|
| 469 | 496 | $viewcenterlatitude = $lastcentercoord[0]; |
| 470 | 497 | $viewcenterlongitude = $lastcentercoord[1]; |
| 471 | 498 | } else { |
@@ -597,7 +624,12 @@ discard block |
||
| 597 | 624 | ?> |
| 598 | 625 | |
| 599 | 626 | update_locationsLayer(); |
| 600 | -setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 627 | +setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 628 | + print $globalMapRefresh*1000*2; |
|
| 629 | +} else { |
|
| 630 | + print '60000'; |
|
| 631 | +} |
|
| 632 | +?>); |
|
| 601 | 633 | |
| 602 | 634 | var currentposition; |
| 603 | 635 | viewer.camera.moveEnd.addEventListener(function() { |
@@ -755,5 +787,10 @@ discard block |
||
| 755 | 787 | } |
| 756 | 788 | } |
| 757 | 789 | } |
| 758 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 790 | + ,<?php if (isset($globalMapRefresh)) { |
|
| 791 | + print $globalMapRefresh*1000; |
|
| 792 | +} else { |
|
| 793 | + print '30000'; |
|
| 794 | +} |
|
| 795 | +?>); |
|
| 759 | 796 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | break; |
| 400 | 400 | } |
| 401 | 401 | } |
| 402 | - var tsk_geojson = Cesium.Resource.fetchJson("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php print filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); ?>"); |
|
| 402 | + var tsk_geojson = Cesium.Resource.fetchJson("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php print filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); ?>"); |
|
| 403 | 403 | tsk_geojson.then(function(geojsondata) { |
| 404 | 404 | tsk = new Cesium.CustomDataSource('tsk'); |
| 405 | 405 | for (var i =0;i < geojsondata.features.length; i++) { |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | <?php |
| 479 | 479 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
| 480 | 480 | if (isset($_COOKIE['lastcentercoord'])) { |
| 481 | - $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
|
| 481 | + $lastcentercoord = explode(',', $_COOKIE['lastcentercoord']); |
|
| 482 | 482 | if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
| 483 | 483 | else $zoom = $lastcentercoord[3]; |
| 484 | 484 | $viewcenterlatitude = $lastcentercoord[0]; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | } |
| 9 | 9 | header('Content-Type: text/javascript'); |
| 10 | 10 | |
| 11 | -$race_id = filter_input(INPUT_GET,'race_id',FILTER_SANITIZE_NUMBER_INT); |
|
| 11 | +$race_id = filter_input(INPUT_GET, 'race_id', FILTER_SANITIZE_NUMBER_INT); |
|
| 12 | 12 | if ($race_id != '') { |
| 13 | 13 | $race_array = $Marine->getRace($race_id); |
| 14 | 14 | } else { |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | $output = '{"type": "FeatureCollection","features": ['; |
| 19 | 19 | if (!empty($race_array)) |
| 20 | 20 | { |
| 21 | - $course = json_decode($race_array['race_markers'],true); |
|
| 21 | + $course = json_decode($race_array['race_markers'], true); |
|
| 22 | 22 | $i = 0; |
| 23 | 23 | $f = count($course); |
| 24 | - foreach($course as $marker) |
|
| 24 | + foreach ($course as $marker) |
|
| 25 | 25 | { |
| 26 | 26 | date_default_timezone_set('UTC'); |
| 27 | 27 | $output .= '{"type": "Feature",'; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $output .= '"type": "'.$marker['type'].'",'; |
| 34 | 34 | if ($i == 0 || $i == 1) { |
| 35 | 35 | $output .= '"icon": "images/tsk/tsk-start.png",'; |
| 36 | - } elseif ($i == $f-1 || $i == $f-2) { |
|
| 36 | + } elseif ($i == $f - 1 || $i == $f - 2) { |
|
| 37 | 37 | $output .= '"icon": "images/tsk/tsk-finish.png",'; |
| 38 | 38 | } elseif ($marker['type'] == 4) { |
| 39 | 39 | $output .= '"icon": "images/kardinalstonne.png",'; |