@@ -662,9 +662,9 @@ |
||
662 | 662 | // var timeline = new Cesium.Timeline(viewer); |
663 | 663 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
664 | 664 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
665 | - //this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a> <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>'; |
|
666 | - $(".archivebox").html('<h4><?php echo str_replace("'","\'",_("Archive")); ?></h4>' + '<br/><form id="noarchive" method="post"><input type="hidden" name="noarchive" /></form><a href="#" onClick="animationViewModel.playReverseViewModel.command();"><i class="fa fa-play fa-flip-horizontal" aria-hidden="true"></i></a> <a href="#" onClick="'+"document.getElementById('noarchive').submit();"+'"><i class="fa fa-eject" aria-hidden="true"></i></a> <a href="#" onClick="animationViewModel.pauseViewModel.command();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="animationViewModel.playForwardViewModel.command();"><i class="fa fa-play" aria-hidden="true"></i></a>'); |
|
667 | - // this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'; |
|
665 | + //this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a> <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>'; |
|
666 | + $(".archivebox").html('<h4><?php echo str_replace("'", "\'", _("Archive")); ?></h4>' + '<br/><form id="noarchive" method="post"><input type="hidden" name="noarchive" /></form><a href="#" onClick="animationViewModel.playReverseViewModel.command();"><i class="fa fa-play fa-flip-horizontal" aria-hidden="true"></i></a> <a href="#" onClick="'+"document.getElementById('noarchive').submit();"+'"><i class="fa fa-eject" aria-hidden="true"></i></a> <a href="#" onClick="animationViewModel.pauseViewModel.command();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="animationViewModel.playForwardViewModel.command();"><i class="fa fa-play" aria-hidden="true"></i></a>'); |
|
667 | + // this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'; |
|
668 | 668 | |
669 | 669 | } |
670 | 670 |
@@ -218,7 +218,12 @@ discard block |
||
218 | 218 | <?php |
219 | 219 | } else { |
220 | 220 | ?> |
221 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
221 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
222 | + print $globalMapRefresh*2000; |
|
223 | +} else { |
|
224 | + print '60000'; |
|
225 | +} |
|
226 | +?>)) { |
|
222 | 227 | viewer.dataSources.get(dsn).entities.remove(entity); |
223 | 228 | czmlds.entities.removeById(entityid); |
224 | 229 | } |
@@ -502,7 +507,12 @@ discard block |
||
502 | 507 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
503 | 508 | ?> |
504 | 509 | update_polarLayer(); |
505 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
510 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
511 | + print $globalMapRefresh*1000*2; |
|
512 | +} else { |
|
513 | + print '60000'; |
|
514 | +} |
|
515 | +?>); |
|
506 | 516 | <?php |
507 | 517 | } |
508 | 518 | ?> |
@@ -613,7 +623,12 @@ discard block |
||
613 | 623 | } |
614 | 624 | } |
615 | 625 | } |
616 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
626 | + ,<?php if (isset($globalMapRefresh)) { |
|
627 | + print $globalMapRefresh*1000; |
|
628 | +} else { |
|
629 | + print '30000'; |
|
630 | +} |
|
631 | +?>); |
|
617 | 632 | } else { |
618 | 633 | //var widget = new Cesium.CesiumWidget('archivebox'); |
619 | 634 | // var timeline = new Cesium.Timeline(viewer); |
@@ -632,7 +647,12 @@ discard block |
||
632 | 647 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
633 | 648 | ?> |
634 | 649 | update_atcLayer(); |
635 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
650 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
651 | + print $globalMapRefresh*1000*2; |
|
652 | +} else { |
|
653 | + print '60000'; |
|
654 | +} |
|
655 | +?>); |
|
636 | 656 | <?php |
637 | 657 | } |
638 | 658 | ?> |
@@ -265,22 +265,22 @@ discard block |
||
265 | 265 | var entityid = entity.id; |
266 | 266 | var lastupdateentity = entity.properties.lastupdate; |
267 | 267 | <?php |
268 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
269 | - // Remove flights not in latest CZML |
|
268 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
269 | + // Remove flights not in latest CZML |
|
270 | 270 | ?> |
271 | 271 | if (lastupdateentity != lastupdate) { |
272 | 272 | viewer.dataSources.get(dsn).entities.remove(entity); |
273 | 273 | czmlds.entities.removeById(entityid); |
274 | 274 | } |
275 | 275 | <?php |
276 | - } else { |
|
276 | + } else { |
|
277 | 277 | ?> |
278 | 278 | if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
279 | 279 | viewer.dataSources.get(dsn).entities.remove(entity); |
280 | 280 | czmlds.entities.removeById(entityid); |
281 | 281 | } |
282 | 282 | <?php |
283 | - } |
|
283 | + } |
|
284 | 284 | ?> |
285 | 285 | } |
286 | 286 | } |
@@ -718,12 +718,12 @@ discard block |
||
718 | 718 | } |
719 | 719 | |
720 | 720 | <?php |
721 | - if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
721 | + if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
722 | 722 | ?> |
723 | 723 | update_atcLayer(); |
724 | 724 | setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
725 | 725 | <?php |
726 | - } |
|
726 | + } |
|
727 | 727 | ?> |
728 | 728 | |
729 | 729 | function iconColor(color) { |
@@ -63,7 +63,9 @@ |
||
63 | 63 | { |
64 | 64 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
65 | 65 | $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
66 | - } else $image = $spotter_item['image_thumbnail']; |
|
66 | + } else { |
|
67 | + $image = $spotter_item['image_thumbnail']; |
|
68 | + } |
|
67 | 69 | |
68 | 70 | } |
69 | 71 | /* else { |
@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | |
10 | 10 | $from_archive = false; |
11 | 11 | if (isset($_GET['ident'])) { |
12 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
13 | 13 | if (isset($_GET['currenttime'])) { |
14 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
14 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
15 | 15 | $currenttime = round($currenttime/1000); |
16 | - $spotter_array = $MarineLive->getDateLiveMarineDataByIdent($ident,$currenttime); |
|
16 | + $spotter_array = $MarineLive->getDateLiveMarineDataByIdent($ident, $currenttime); |
|
17 | 17 | |
18 | 18 | if (empty($spotter_array)) { |
19 | 19 | $from_archive = true; |
20 | - $spotter_array = $MarineArchive->getDateArchiveMarineDataByIdent($ident,$currenttime); |
|
20 | + $spotter_array = $MarineArchive->getDateArchiveMarineDataByIdent($ident, $currenttime); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | } else { |
@@ -31,16 +31,16 @@ discard block |
||
31 | 31 | } |
32 | 32 | } |
33 | 33 | if (isset($_GET['fammarine_id'])) { |
34 | - $fammarine_id = filter_input(INPUT_GET,'fammarine_id',FILTER_SANITIZE_STRING); |
|
34 | + $fammarine_id = filter_input(INPUT_GET, 'fammarine_id', FILTER_SANITIZE_STRING); |
|
35 | 35 | if (isset($_GET['currenttime'])) { |
36 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
36 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
37 | 37 | $currenttime = round($currenttime/1000); |
38 | - $spotter_array = $MarineLive->getDateLiveMarineDataById($fammarine_id,$currenttime); |
|
38 | + $spotter_array = $MarineLive->getDateLiveMarineDataById($fammarine_id, $currenttime); |
|
39 | 39 | |
40 | 40 | if (empty($spotter_array)) { |
41 | 41 | $from_archive = true; |
42 | 42 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
43 | - $spotter_array = $MarineArchive->getDateArchiveMarineDataById($flightaware_id,$currenttime); |
|
43 | + $spotter_array = $MarineArchive->getDateArchiveMarineDataById($flightaware_id, $currenttime); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
63 | 63 | { |
64 | 64 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
65 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
65 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
66 | 66 | } else $image = $spotter_item['image_thumbnail']; |
67 | 67 | |
68 | 68 | } |
@@ -63,7 +63,9 @@ |
||
63 | 63 | { |
64 | 64 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
65 | 65 | $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
66 | - } else $image = $spotter_item['image_thumbnail']; |
|
66 | + } else { |
|
67 | + $image = $spotter_item['image_thumbnail']; |
|
68 | + } |
|
67 | 69 | |
68 | 70 | } |
69 | 71 | /* else { |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | print '<div class="details">'; |
79 | 79 | print '<div><span>'._("Altitude").'</span>'; |
80 | 80 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
81 | - try { |
|
81 | + try { |
|
82 | 82 | $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
83 | - } catch(Exception $e) { |
|
84 | - } |
|
83 | + } catch(Exception $e) { |
|
84 | + } |
|
85 | 85 | } |
86 | 86 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
87 | 87 | print $spotter_item['altitude'].' feet (FL'.$spotter_item['altitude'].')'; |
@@ -89,14 +89,14 @@ discard block |
||
89 | 89 | print round($spotter_item['altitude']*0.3048).' m (FL'.round($spotter_item['altitude']/100).')'; |
90 | 90 | } |
91 | 91 | if (isset($groundAltitude) && $groundAltitude < $spotter_item['altitude']*0.3048) { |
92 | - print '<br>'; |
|
93 | - print '<span>'._("Ground Altitude").'</span>'; |
|
94 | - if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
92 | + print '<br>'; |
|
93 | + print '<span>'._("Ground Altitude").'</span>'; |
|
94 | + if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
95 | 95 | print round($groundAltitude*3.28084).' feet'; |
96 | - } else { |
|
96 | + } else { |
|
97 | 97 | print round($groundAltitude).' m'; |
98 | - } |
|
99 | - print '</i>'; |
|
98 | + } |
|
99 | + print '</i>'; |
|
100 | 100 | } |
101 | 101 | print '</div>'; |
102 | 102 | print '<div><span>'._("Speed").'</span>'; |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | |
12 | 12 | $from_archive = false; |
13 | 13 | if (isset($_GET['ident'])) { |
14 | - $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
|
14 | + $ident = urldecode(filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING)); |
|
15 | 15 | if (isset($_GET['currenttime'])) { |
16 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
16 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
17 | 17 | $currenttime = round($currenttime/1000); |
18 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident,$currenttime); |
|
18 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataByIdent($ident, $currenttime); |
|
19 | 19 | if (empty($spotter_array)) { |
20 | 20 | $from_archive = true; |
21 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident,$currenttime); |
|
21 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataByIdent($ident, $currenttime); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } else { |
@@ -30,16 +30,16 @@ discard block |
||
30 | 30 | } |
31 | 31 | } |
32 | 32 | if (isset($_GET['famtrackid'])) { |
33 | - $famtrackid = urldecode(filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING)); |
|
33 | + $famtrackid = urldecode(filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING)); |
|
34 | 34 | if (isset($_GET['currenttime'])) { |
35 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
35 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
36 | 36 | $currenttime = round($currenttime/1000); |
37 | - $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid,$currenttime); |
|
37 | + $spotter_array = $TrackerLive->getDateLiveTrackerDataById($famtrackid, $currenttime); |
|
38 | 38 | |
39 | 39 | if (empty($spotter_array)) { |
40 | 40 | $from_archive = true; |
41 | 41 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
42 | - $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid,$currenttime); |
|
42 | + $spotter_array = $TrackerArchive->getDateArchiveTrackerDataById($famtrackid, $currenttime); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
60 | 60 | { |
61 | 61 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
62 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
62 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
63 | 63 | } else $image = $spotter_item['image_thumbnail']; |
64 | 64 | |
65 | 65 | } |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | print '<div><span>'._("Altitude").'</span>'; |
80 | 80 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
81 | 81 | try { |
82 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
83 | - } catch(Exception $e) { |
|
82 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
83 | + } catch (Exception $e) { |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | -$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
|
3 | +$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING); |
|
4 | 4 | if ($date == '') $date = date('Y-m-d'); |
5 | 5 | header('Location: '.$globalURL.'/accident/'.$date); |
6 | 6 | ?> |
7 | 7 | \ No newline at end of file |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | 3 | $date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
4 | -if ($date == '') $date = date('Y-m-d'); |
|
4 | +if ($date == '') { |
|
5 | + $date = date('Y-m-d'); |
|
6 | +} |
|
5 | 7 | header('Location: '.$globalURL.'/accident/'.$date); |
6 | 8 | ?> |
7 | 9 | \ No newline at end of file |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
20 | 20 | $year_data = ''; |
21 | 21 | $year_cnt = ''; |
22 | -foreach($date_array as $year_item) |
|
22 | +foreach ($date_array as $year_item) |
|
23 | 23 | { |
24 | 24 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
25 | 25 | $year_cnt .= $year_item['count'].','; |
26 | 26 | } |
27 | 27 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
28 | -$year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
28 | +$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
29 | 29 | print 'c3.generate({ |
30 | 30 | bindto: "#chart", |
31 | 31 | data: { x: "x", |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | |
36 | 36 | if (!empty($date_array)) |
37 | 37 | { |
38 | - foreach($date_array as $key => $row) { |
|
38 | + foreach ($date_array as $key => $row) { |
|
39 | 39 | $years[$key] = $row['year']; |
40 | 40 | $counts[$key] = $row['count']; |
41 | 41 | } |
42 | 42 | //array_multisort($years,SORT_DESC,$date_array); |
43 | - array_multisort($counts,SORT_DESC,$date_array); |
|
43 | + array_multisort($counts, SORT_DESC, $date_array); |
|
44 | 44 | print '<div class="table-responsive">'; |
45 | 45 | print '<table class="common-date table-striped">'; |
46 | 46 | print '<thead>'; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | print '</thead>'; |
51 | 51 | print '<tbody>'; |
52 | 52 | $i = 1; |
53 | - foreach($date_array as $date_item) |
|
53 | + foreach ($date_array as $date_item) |
|
54 | 54 | { |
55 | 55 | print '<tr>'; |
56 | 56 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $route_array = $Spotter->countAllRoutes(); |
19 | 19 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
20 | 20 | $route_data = ''; |
21 | -foreach($route_array as $route_item) |
|
21 | +foreach ($route_array as $route_item) |
|
22 | 22 | { |
23 | 23 | $route_data .= '[ "'.$route_item['airport_departure_icao'].' - '.$route_item['airport_arrival_icao'].'",'.$route_item['route_count'].'],'; |
24 | 24 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | print '</thead>'; |
47 | 47 | print '<tbody>'; |
48 | 48 | $i = 1; |
49 | - foreach($route_array as $route_item) |
|
49 | + foreach ($route_array as $route_item) |
|
50 | 50 | { |
51 | 51 | print '<tr>'; |
52 | 52 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,7 +5,9 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Route by Airport"); |
7 | 7 | require_once('header.php'); |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | include('statistics-sub-menu.php'); |
10 | 12 | |
11 | 13 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | -$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
|
3 | +$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING); |
|
4 | 4 | if ($date == '') $date = date('Y-m-d'); |
5 | 5 | header('Location: '.$globalURL.'/incident/'.$date); |
6 | 6 | ?> |
7 | 7 | \ No newline at end of file |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
3 | 3 | $date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
4 | -if ($date == '') $date = date('Y-m-d'); |
|
4 | +if ($date == '') { |
|
5 | + $date = date('Y-m-d'); |
|
6 | +} |
|
5 | 7 | header('Location: '.$globalURL.'/incident/'.$date); |
6 | 8 | ?> |
7 | 9 | \ No newline at end of file |
@@ -3,13 +3,13 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
8 | -$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
8 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
9 | 9 | |
10 | 10 | if (!empty($spotter_array)) |
11 | 11 | { |
12 | - $title = sprintf(_("Most Common Departure Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | + $title = sprintf(_("Most Common Departure Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | 13 | |
14 | 14 | require_once('header.php'); |
15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
28 | 28 | print '<br />'; |
29 | 29 | print '<div class="info column">'; |
30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
31 | 31 | print '</div>'; |
32 | 32 | |
33 | 33 | include('date-sub-menu.php'); |
34 | 34 | print '<div class="column">'; |
35 | 35 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
36 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
36 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
37 | 37 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByDate($date); |
38 | 38 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
39 | 39 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
42 | 42 | print 'var series = ['; |
43 | 43 | $country_data = ''; |
44 | - foreach($airport_country_array as $airport_item) |
|
44 | + foreach ($airport_country_array as $airport_item) |
|
45 | 45 | { |
46 | 46 | $country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
47 | 47 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | print '</thead>'; |
90 | 90 | print '<tbody>'; |
91 | 91 | $i = 1; |
92 | - foreach($airport_country_array as $airport_item) |
|
92 | + foreach ($airport_country_array as $airport_item) |
|
93 | 93 | { |
94 | 94 | print '<tr>'; |
95 | 95 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/manufacturer/<?php print $manufacturer; ?>" <?php if (strtolower($current_page) == "manufacturer-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/manufacturer/<?php print $manufacturer; ?>" <?php if (strtolower($current_page) == "manufacturer-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <li class="dropdown"> |
8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-aircraft" || strtolower($current_page) == "manufacturer-statistics-registration"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-aircraft" || strtolower($current_page) == "manufacturer-statistics-registration") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 10 | </a> |
11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | </ul> |
15 | 15 | </li> |
16 | 16 | <li class="dropdown"> |
17 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-airline" || strtolower($current_page) == "manufacturer-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
17 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-airline" || strtolower($current_page) == "manufacturer-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | 18 | <?php echo _("Airline"); ?> <span class="caret"></span> |
19 | 19 | </a> |
20 | 20 | <ul class="dropdown-menu" role="menu"> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | </ul> |
24 | 24 | </li> |
25 | 25 | <li class="dropdown"> |
26 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-departure-airport" || strtolower($current_page) == "manufacturer-statistics-departure-airport-country" || strtolower($current_page) == "manufacturer-statistics-arrival-airport" || strtolower($current_page) == "manufacturer-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
26 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-departure-airport" || strtolower($current_page) == "manufacturer-statistics-departure-airport-country" || strtolower($current_page) == "manufacturer-statistics-arrival-airport" || strtolower($current_page) == "manufacturer-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
27 | 27 | <?php echo _("Airport"); ?> <span class="caret"></span> |
28 | 28 | </a> |
29 | 29 | <ul class="dropdown-menu" role="menu"> |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/arrival-airport-country/<?php print $manufacturer; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
34 | 34 | </ul> |
35 | 35 | </li> |
36 | - <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/route/<?php print $manufacturer; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
37 | - <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/time/<?php print $manufacturer; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
36 | + <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/route/<?php print $manufacturer; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
37 | + <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/time/<?php print $manufacturer; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
38 | 38 | </ul> |
39 | 39 | </div> |
40 | 40 | \ No newline at end of file |