@@ -20,17 +20,17 @@ discard block |
||
20 | 20 | |
21 | 21 | $spotter_array = array(); |
22 | 22 | if (isset($_COOKIE['sattypes']) && $_COOKIE['sattypes'] != '') { |
23 | - $sattypes = explode(',',$_COOKIE['sattypes']); |
|
23 | + $sattypes = explode(',', $_COOKIE['sattypes']); |
|
24 | 24 | foreach ($sattypes as $sattype) { |
25 | - $spotter_array = array_merge($Satellite->position_all_type($sattype,$timeb-$globalLiveInterval,$timeb),$spotter_array); |
|
25 | + $spotter_array = array_merge($Satellite->position_all_type($sattype, $timeb - $globalLiveInterval, $timeb), $spotter_array); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss']) { |
29 | - $spotter_array = array_merge($Satellite->position('ISS (ZARYA)',time()-$globalLiveInterval,time()),$spotter_array); |
|
30 | - $spotter_array = array_merge($Satellite->position('TIANGONG 1',time()-$globalLiveInterval,time()),$spotter_array); |
|
31 | - $spotter_array = array_merge($Satellite->position('TIANGONG-2',time()-$globalLiveInterval,time()),$spotter_array); |
|
29 | + $spotter_array = array_merge($Satellite->position('ISS (ZARYA)', time() - $globalLiveInterval, time()), $spotter_array); |
|
30 | + $spotter_array = array_merge($Satellite->position('TIANGONG 1', time() - $globalLiveInterval, time()), $spotter_array); |
|
31 | + $spotter_array = array_merge($Satellite->position('TIANGONG-2', time() - $globalLiveInterval, time()), $spotter_array); |
|
32 | 32 | } |
33 | -$spotter_array = array_unique($spotter_array,SORT_REGULAR); |
|
33 | +$spotter_array = array_unique($spotter_array, SORT_REGULAR); |
|
34 | 34 | /* |
35 | 35 | $modelsdb = array(); |
36 | 36 | if (file_exists('models/space/space_modelsdb')) { |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
55 | 55 | |
56 | 56 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
57 | -$output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
57 | +$output .= ',"clock": {"currentTime" : "'.date("c", time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
|
58 | 58 | //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
59 | 59 | |
60 | 60 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
61 | 61 | $output .= '},'; |
62 | 62 | if (!empty($spotter_array) && is_array($spotter_array)) |
63 | 63 | { |
64 | - foreach($spotter_array as $spotter_item) |
|
64 | + foreach ($spotter_array as $spotter_item) |
|
65 | 65 | { |
66 | 66 | $j++; |
67 | 67 | date_default_timezone_set('UTC'); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $orientation = ''; |
77 | 77 | $prev_satname = $spotter_item['name']; |
78 | 78 | $output .= '{'; |
79 | - $output .= '"id": "'.trim(str_replace(array('[+]','[-]'),'',$spotter_item['name'])).'",'; |
|
79 | + $output .= '"id": "'.trim(str_replace(array('[+]', '[-]'), '', $spotter_item['name'])).'",'; |
|
80 | 80 | $output .= '"properties": {'; |
81 | 81 | // Not yet supported in CZML with Cesium |
82 | 82 | $output .= '},'; |
@@ -114,23 +114,23 @@ discard block |
||
114 | 114 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubiesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
115 | 115 | } elseif ($spotter_item['name'] == 'TERRA') { |
116 | 116 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/terra.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
117 | - } elseif (strpos($spotter_item['name'],'O3B') !== false) { |
|
117 | + } elseif (strpos($spotter_item['name'], 'O3B') !== false) { |
|
118 | 118 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/o3b.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
119 | - } elseif (strpos($spotter_item['name'],'GLOBALSTAR') !== false) { |
|
119 | + } elseif (strpos($spotter_item['name'], 'GLOBALSTAR') !== false) { |
|
120 | 120 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/globalstar.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
121 | - } elseif (strpos($spotter_item['name'],'GPS') !== false) { |
|
121 | + } elseif (strpos($spotter_item['name'], 'GPS') !== false) { |
|
122 | 122 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/gps.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
123 | - } elseif (strpos($spotter_item['name'],'GENESIS') !== false) { |
|
123 | + } elseif (strpos($spotter_item['name'], 'GENESIS') !== false) { |
|
124 | 124 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/genesis.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
125 | - } elseif (strpos($spotter_item['name'],'OSCAR 7') !== false) { |
|
125 | + } elseif (strpos($spotter_item['name'], 'OSCAR 7') !== false) { |
|
126 | 126 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/oscar7.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
127 | - } elseif (strpos($spotter_item['name'],'FLOCK') !== false) { |
|
127 | + } elseif (strpos($spotter_item['name'], 'FLOCK') !== false) { |
|
128 | 128 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
129 | - } elseif (strpos($spotter_item['name'],'PLEIADES') !== false) { |
|
129 | + } elseif (strpos($spotter_item['name'], 'PLEIADES') !== false) { |
|
130 | 130 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/pleiades.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
131 | - } elseif (strpos($spotter_item['name'],'DUCHIFAT') !== false) { |
|
131 | + } elseif (strpos($spotter_item['name'], 'DUCHIFAT') !== false) { |
|
132 | 132 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/duchifat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
133 | - } elseif (strpos($spotter_item['name'],'FORMOSAT-2') !== false) { |
|
133 | + } elseif (strpos($spotter_item['name'], 'FORMOSAT-2') !== false) { |
|
134 | 134 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/formosat2.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
135 | 135 | } elseif ($spotter_item['type'] == 'iridium') { |
136 | 136 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/space/iridium.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },'; |
@@ -152,14 +152,14 @@ discard block |
||
152 | 152 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
153 | 153 | $output .= '"interpolationAlgorithm":"HERMITE","interpolationDegree":3,'; |
154 | 154 | $output .= '"cartographicDegrees": ['; |
155 | - $output .= '"'.date("c",$spotter_item['timestamp']).'", '; |
|
155 | + $output .= '"'.date("c", $spotter_item['timestamp']).'", '; |
|
156 | 156 | $output .= $spotter_item['longitude'].', '; |
157 | 157 | $output .= $spotter_item['latitude'].', '; |
158 | 158 | $output .= $spotter_item['altitude']*1000; |
159 | 159 | $orientation = '"orientation" : { '; |
160 | 160 | $orientation .= '"unitQuaternion": ['; |
161 | 161 | } else { |
162 | - $output .= ',"'.date("c",$spotter_item['timestamp']).'", '; |
|
162 | + $output .= ',"'.date("c", $spotter_item['timestamp']).'", '; |
|
163 | 163 | $output .= $spotter_item['longitude'].', '; |
164 | 164 | $output .= $spotter_item['latitude'].', '; |
165 | 165 | $output .= $spotter_item['altitude']*1000; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -7,17 +7,17 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | 12 | if ($sort != '') { |
13 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
13 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
14 | 14 | } else { |
15 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", ''); |
|
15 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", ''); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['ident']); |
|
20 | + $title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['ident']); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="info column">'; |
23 | 23 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | include('ident-sub-menu.php'); |
29 | 29 | print '<div class="column">'; |
30 | 30 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
31 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
31 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
32 | 32 | |
33 | 33 | $aircraft_array = $Spotter->countAllAircraftTypesByIdent($ident); |
34 | 34 | if (!empty($aircraft_array)) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | print '</thead>'; |
44 | 44 | print '<tbody>'; |
45 | 45 | $i = 1; |
46 | - foreach($aircraft_array as $aircraft_item) |
|
46 | + foreach ($aircraft_array as $aircraft_item) |
|
47 | 47 | { |
48 | 48 | print '<tr>'; |
49 | 49 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_type'])) { |
7 | - header('Location: '.$globalURL.'/aircraft'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/aircraft'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | function drawChart() { |
65 | 65 | var data = google.visualization.arrayToDataTable([ |
66 | 66 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
67 | - $hour_data = ''; |
|
67 | + $hour_data = ''; |
|
68 | 68 | foreach($hour_array as $hour_item) |
69 | 69 | { |
70 | 70 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
71 | 71 | } |
72 | 72 | $hour_data = substr($hour_data, 0, -1); |
73 | 73 | print $hour_data; |
74 | - print ']); |
|
74 | + print ']); |
|
75 | 75 | |
76 | 76 | var options = { |
77 | 77 | legend: {position: "none"}, |
@@ -8,15 +8,15 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | |
11 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
11 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | $Spotter = new Spotter(); |
14 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
14 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
15 | 15 | |
16 | 16 | |
17 | 17 | if (!empty($spotter_array)) |
18 | 18 | { |
19 | - $title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
19 | + $title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="select-item">'; |
22 | 22 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $Stats = new Stats(); |
26 | 26 | $aircraft_types = $Stats->getAllAircraftTypes(); |
27 | 27 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
28 | - foreach($aircraft_types as $aircraft_type) |
|
28 | + foreach ($aircraft_types as $aircraft_type) |
|
29 | 29 | { |
30 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
30 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
33 | 33 | } else { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | include('aircraft-sub-menu.php'); |
54 | 54 | print '<div class="column">'; |
55 | 55 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
56 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
56 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
57 | 57 | |
58 | 58 | $hour_array = $Spotter->countAllHoursByAircraft($aircraft_type); |
59 | 59 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | var data = google.visualization.arrayToDataTable([ |
66 | 66 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
67 | 67 | $hour_data = ''; |
68 | - foreach($hour_array as $hour_item) |
|
68 | + foreach ($hour_array as $hour_item) |
|
69 | 69 | { |
70 | 70 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
71 | 71 | } |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $aircraft_types = $Stats->getAllAircraftTypes(); |
25 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
25 | + if (empty($aircraft_types)) { |
|
26 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
27 | + } |
|
26 | 28 | foreach($aircraft_types as $aircraft_type) |
27 | 29 | { |
28 | 30 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -10,10 +10,10 @@ |
||
10 | 10 | $timearray = array(); |
11 | 11 | if (isset($_GET['now'])) $begin = time(); |
12 | 12 | else $begin = strtotime(date("Y").'-12-24T02:00:00Z'); |
13 | -for ($i =0; $i <= 288; $i++) { |
|
13 | +for ($i = 0; $i <= 288; $i++) { |
|
14 | 14 | $timearray[] = ($begin + $i*300)*1000; |
15 | 15 | } |
16 | -$output = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"santaclaus","time": ['.implode(',',$timearray).']},"geometry":{"type":"MultiPoint","coordinates":[[-114.4,82.7,0],[-173.300003,64.379997,0],[177.479995,64.75,0],[158.65,53.016667,0],[165.545318,11.626074,0],[171.1300517813333,7.07999665990053,0],[179.380004,-16.469999,0],[178.429992,-18.129999,0],[174.759994,-36.849998,0],[176.839996,-39.639999,0],[174.779998,-41.279998,0],[172.639999,-43.529998,0],[167.838199,-46.986747,0],[168.320999,-17.740391,0],[167.149993,-15.51,0],[159.910003,-9.43,0],[156.850006,-8.1,0],[158.160003,6.92,0],[150.017702,45.873311,0],[154.796487,49.429802,0],[142.7262,46.948978,0],[150.800003,59.569999,0],[135.119995,48.419998,0],[131.899993,43.130001,0],[142.212096,27.070652,0],[141.312779,24.78389,0],[144.79373,13.444305,0],[151.783334,8.45,0],[151.749999,7.416667,0],[152.160003,-4.199999,0],[146.990005,-6.719999,0],[143.211639,-9.085352,0],[146.779998,-19.26,0],[149.179992,-21.139999,0],[153.020004,-27.459999,0],[151.210006,-33.869998,0],[147.291199,-42.85088,0],[138.600006,-34.93,0],[133.869995,-23.7,0],[130.850006,-12.43,0],[143.62,-3.56,0],[134.5552,7.3608,0],[135.169998,34.68,0],[138.690002,35.169998,0],[139.770004,35.669998,0],[140.740005,40.830001,0],[128.600006,35.869998,0],[125.925925,38.950981,0],[129.771118,62.093056,0],[104.239997,52.330001,0],[114.5056,48.060478,0],[106.580001,29.569999,0],[121.470001,31.229999,0],[113.25,23.12,0],[114.177465,22.307184,0],[121.639999,18.36,0],[122.080001,6.92,0],[114.639999,4.809999,0],[119.412399,-5.152193,0],[122.230003,-17.959999,0],[115.839996,-31.959999,0],[105.680687,-10.428593,0],[104.75,-2.99,0],[113.029998,3.17,0],[100.720001,4.86,0],[104.18,10.609999,0],[103.864403,13.36866,0],[99.330001,9.14,0],[105.073303,18.30217,0],[91.132088,29.6507,0],[116.477651,40.332809,0],[93.059997,56.02,0],[86.18,69.410003,0],[88.202881,69.315422,0],[73.400001,55,0],[76.949996,52.299999,0],[78.379997,42.490001,0],[69.779998,37.919998,0],[86.933333,27.983333,0],[84.870002,27.02,0],[88.36,22.569999,0],[90.389999,23.7,0],[97.04,20.78,0],[92.762917,11.66857,0],[50.23720550537109,-46.10261535644531,0],[72.422489,-7.336367,0],[73.510915,4.174199,0],[81.050003,6.989999,0],[72.819999,18.959999,0],[78.042222,27.174167,0],[71.449996,30.2,0],[67.109993,36.703819,0],[54.36,39.509998,0],[63.726529,40.214486,0],[58.853439,48.251126,0],[56.23246,58.00024,0],[49.659999,58.599998,0],[50.150001,53.2,0],[44.11,41.979999,0],[49.893226,40.38344,0],[44.75,40.5,0],[50.95,34.650001,0],[56.27433,27.18717,0],[54.989491,25.005817,0],[59.549999,22.569999,0],[47.58318996007591,-9.722414273737707,0],[57.471008,-20.26026,0],[37.946460723877,-46.6428451538086,0],[53,-67.5,0],[46.99004,-25.03233,0],[46.310001,-15.72,0],[44.41203117370608,-12.22338294982911,0],[39.3822,-6.097406,0],[39.659999,-4.039999,0],[40.033333,7.916667,0],[42.549999,16.899999,0],[43.970001,26.37,0],[41.12,30.455,0],[38.278671,34.547951,0],[37.619998,55.75,0],[30.453329,59.951889,0],[23.12,63.84,0],[26.709999,58.380001,0],[25.42,57.549999,0],[23.319999,55.93,0],[26.1,52.119998,0],[32.259998,48.5,0],[28.829999,47.029998,0],[25.61,45.659999,0],[27.469999,42.509998,0],[23.729999,37.979999,0],[27.149999,38.43,0],[31.132659,29.977088,0],[32.659999,13.17,0],[33.599998,1.71,0],[25.92,-2.95,0],[28.45,-14.439999,0],[30.819999,-20.059999,0],[21.639999,-21.7,0],[25.59,-33.959999,0],[18.129999,-26.579999,0],[13.767777,-10.722417,0],[10.13,-0.15,0],[20.67,5.76,0],[9.71,4.059999,0],[7.44,10.52,0],[18.69,12.189999,0],[7.98,17,0],[14.42,27.069999,0],[3.678539,32.489059,0],[-7.619999,33.599998,0],[13.611066,38.129963,0],[12.482323,41.895466,0],[17.189752,44.763891,0],[16.45,43.509998,0],[14.51,46.060001,0],[21.629999,47.54,0],[16.37,48.220001,0],[10.736111,47.554444,0],[14.43,50.080001,0],[17.129999,48.159999,0],[22.569999,51.240001,0],[13.411895,52.523781,0],[10.039999,56.470001,0],[13.02,55.61,0],[17.329999,62.400001,0],[14.229999,78.059997,0],[10.399999,63.439998,0],[2.350966,48.856558,0],[7.42,43.75,0],[1.57,42.54,0],[-0.991293,37.605651,0],[-7.429999,39.29,0],[-11.4053,16.5889,0],[-3.009999,16.78,0],[-5.36008,5.83885,0],[-12.3,11.319999,0],[-16.239999,12.829999,0],[-16.2507,28.457661,0],[-0.126197,51.500197,0],[-2.968111,56.461428,0],[-7.308429,54.998539,0],[-8.92,52.7,0],[-19.000959,63.427502,0],[-28.364049911499,38.47212219238281,0],[-23.76,15.279999,0],[-36.511219,-54.274151,0],[-58.979999,-51.830001,0],[-64.190002,-31.399999,0],[-54.18,-32.36,0],[-43.2,-22.909999,0],[-37.333333,65.666667,0],[-69.345131,77.48262,0],[-55.65049,48.929001,0],[-63.530471,44.681263,0],[-66.647818,45.957319,0],[-59.630001,13.18,0],[-61.744888,12.06526,0],[-61.171322,10.30501,0],[-67.470001,7.9,0],[-58.159999,6.789999,0],[-60.02,-3.119999,0],[-56.45,-14.409999,0],[-65.260002,-19.059999,0],[-56.636503,-24.158676,0],[-56.509998,-33.409999,0],[-68.523514,-50.021889,0],[-72.505127,-51.732529,0],[-71.639999,-33.04,0],[-72.515821,-13.162849,0],[-76.970001,-6.03,0],[-78.620002,-1.24,0],[-76.739997,8.1,0],[-79.879913,9.368985,0],[-76.949996,18,0],[-72.699996,19.11,0],[-75.220001,20.149999,0],[-73.682953,20.95027,0],[-80.605,28.405556,0],[-84.388056,33.748889,0],[-79.931111,32.776389,0],[-83.920833,35.960556,0],[-84.500278,38.049167,0],[-77.460833,38.303056,0],[-82.515556,40.758333,0],[-83.045833,42.331389,0],[-74.006389,40.714167,0],[-71.802778,42.2625,0],[-72.973056,43.610556,0],[-68.0125,46.860556,0],[-72.581779,46.357398,0],[-78.53632621543271,52.72737572958358,0],[-66.921779,52.940118,0],[-75.652573,62.201069,0],[-64.865257,67.935417,0],[-94.969443,74.716943,0],[-82.793909,76.395731,0],[-97.49276733398439,69.18675994873048,0],[-90.5537452697754,63.36753463745121,0],[-89.270113,48.412197,0],[-79.604159,43.68731,0],[-89.401111,43.073056,0],[-94.633611,42.395278,0],[-89.588889,40.693611,0],[-90.197778,38.627222,0],[-90.704167,35.842222,0],[-91.061667,33.41,0],[-92.445,31.311111,0],[-98.493333,29.423889,0],[-103.349998,20.67,0],[-86.830001,21.17,0],[-89.529998,14.979999,0],[-87.449996,13.42,0],[-83.709999,9.369999,0],[-91.5149765,-0.3781085,0],[-109.425598,-27.1546,0],[-109.9142,22.88093,0],[-110.910003,27.92,0],[-110.925833,32.221667,0],[-104.526667,33.395,0],[-113.061111,37.6775,0],[-104.820833,38.833889,0],[-108.73,42.833056,0],[-113.895,45.175833,0],[-113.993056,46.872222,0],[-114.080796,51.039877,0],[-102.3889594419702,57.15883691318781,0],[-118.0333,66.0833,0],[-140.55,64.45,0],[-122.690386,58.80667,0],[-121.92985,50.686341,0],[-122.330833,47.606389,0],[-122.274167,47.564167,0],[-122.968503,45.309901,0],[-122.874444,42.326667,0],[-122.390556,40.586667,0],[-117.068611,39.493333,0],[-122.418333,37.775,0],[-117.108333,34.207778,0],[-116.544444,33.830278,0],[-117.156389,32.715278,0],[-149.891667,61.218333,0],[-155.566389,62.948889,0],[-165.406389,64.501111,0],[-155.09,19.729722,0],[-156.337974,20.804858,0],[-157.043209,21.141189,0],[-158.009167,21.386667,0],[-159.371111,21.981111,0]]}}]}'; |
|
16 | +$output = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"santaclaus","time": ['.implode(',', $timearray).']},"geometry":{"type":"MultiPoint","coordinates":[[-114.4,82.7,0],[-173.300003,64.379997,0],[177.479995,64.75,0],[158.65,53.016667,0],[165.545318,11.626074,0],[171.1300517813333,7.07999665990053,0],[179.380004,-16.469999,0],[178.429992,-18.129999,0],[174.759994,-36.849998,0],[176.839996,-39.639999,0],[174.779998,-41.279998,0],[172.639999,-43.529998,0],[167.838199,-46.986747,0],[168.320999,-17.740391,0],[167.149993,-15.51,0],[159.910003,-9.43,0],[156.850006,-8.1,0],[158.160003,6.92,0],[150.017702,45.873311,0],[154.796487,49.429802,0],[142.7262,46.948978,0],[150.800003,59.569999,0],[135.119995,48.419998,0],[131.899993,43.130001,0],[142.212096,27.070652,0],[141.312779,24.78389,0],[144.79373,13.444305,0],[151.783334,8.45,0],[151.749999,7.416667,0],[152.160003,-4.199999,0],[146.990005,-6.719999,0],[143.211639,-9.085352,0],[146.779998,-19.26,0],[149.179992,-21.139999,0],[153.020004,-27.459999,0],[151.210006,-33.869998,0],[147.291199,-42.85088,0],[138.600006,-34.93,0],[133.869995,-23.7,0],[130.850006,-12.43,0],[143.62,-3.56,0],[134.5552,7.3608,0],[135.169998,34.68,0],[138.690002,35.169998,0],[139.770004,35.669998,0],[140.740005,40.830001,0],[128.600006,35.869998,0],[125.925925,38.950981,0],[129.771118,62.093056,0],[104.239997,52.330001,0],[114.5056,48.060478,0],[106.580001,29.569999,0],[121.470001,31.229999,0],[113.25,23.12,0],[114.177465,22.307184,0],[121.639999,18.36,0],[122.080001,6.92,0],[114.639999,4.809999,0],[119.412399,-5.152193,0],[122.230003,-17.959999,0],[115.839996,-31.959999,0],[105.680687,-10.428593,0],[104.75,-2.99,0],[113.029998,3.17,0],[100.720001,4.86,0],[104.18,10.609999,0],[103.864403,13.36866,0],[99.330001,9.14,0],[105.073303,18.30217,0],[91.132088,29.6507,0],[116.477651,40.332809,0],[93.059997,56.02,0],[86.18,69.410003,0],[88.202881,69.315422,0],[73.400001,55,0],[76.949996,52.299999,0],[78.379997,42.490001,0],[69.779998,37.919998,0],[86.933333,27.983333,0],[84.870002,27.02,0],[88.36,22.569999,0],[90.389999,23.7,0],[97.04,20.78,0],[92.762917,11.66857,0],[50.23720550537109,-46.10261535644531,0],[72.422489,-7.336367,0],[73.510915,4.174199,0],[81.050003,6.989999,0],[72.819999,18.959999,0],[78.042222,27.174167,0],[71.449996,30.2,0],[67.109993,36.703819,0],[54.36,39.509998,0],[63.726529,40.214486,0],[58.853439,48.251126,0],[56.23246,58.00024,0],[49.659999,58.599998,0],[50.150001,53.2,0],[44.11,41.979999,0],[49.893226,40.38344,0],[44.75,40.5,0],[50.95,34.650001,0],[56.27433,27.18717,0],[54.989491,25.005817,0],[59.549999,22.569999,0],[47.58318996007591,-9.722414273737707,0],[57.471008,-20.26026,0],[37.946460723877,-46.6428451538086,0],[53,-67.5,0],[46.99004,-25.03233,0],[46.310001,-15.72,0],[44.41203117370608,-12.22338294982911,0],[39.3822,-6.097406,0],[39.659999,-4.039999,0],[40.033333,7.916667,0],[42.549999,16.899999,0],[43.970001,26.37,0],[41.12,30.455,0],[38.278671,34.547951,0],[37.619998,55.75,0],[30.453329,59.951889,0],[23.12,63.84,0],[26.709999,58.380001,0],[25.42,57.549999,0],[23.319999,55.93,0],[26.1,52.119998,0],[32.259998,48.5,0],[28.829999,47.029998,0],[25.61,45.659999,0],[27.469999,42.509998,0],[23.729999,37.979999,0],[27.149999,38.43,0],[31.132659,29.977088,0],[32.659999,13.17,0],[33.599998,1.71,0],[25.92,-2.95,0],[28.45,-14.439999,0],[30.819999,-20.059999,0],[21.639999,-21.7,0],[25.59,-33.959999,0],[18.129999,-26.579999,0],[13.767777,-10.722417,0],[10.13,-0.15,0],[20.67,5.76,0],[9.71,4.059999,0],[7.44,10.52,0],[18.69,12.189999,0],[7.98,17,0],[14.42,27.069999,0],[3.678539,32.489059,0],[-7.619999,33.599998,0],[13.611066,38.129963,0],[12.482323,41.895466,0],[17.189752,44.763891,0],[16.45,43.509998,0],[14.51,46.060001,0],[21.629999,47.54,0],[16.37,48.220001,0],[10.736111,47.554444,0],[14.43,50.080001,0],[17.129999,48.159999,0],[22.569999,51.240001,0],[13.411895,52.523781,0],[10.039999,56.470001,0],[13.02,55.61,0],[17.329999,62.400001,0],[14.229999,78.059997,0],[10.399999,63.439998,0],[2.350966,48.856558,0],[7.42,43.75,0],[1.57,42.54,0],[-0.991293,37.605651,0],[-7.429999,39.29,0],[-11.4053,16.5889,0],[-3.009999,16.78,0],[-5.36008,5.83885,0],[-12.3,11.319999,0],[-16.239999,12.829999,0],[-16.2507,28.457661,0],[-0.126197,51.500197,0],[-2.968111,56.461428,0],[-7.308429,54.998539,0],[-8.92,52.7,0],[-19.000959,63.427502,0],[-28.364049911499,38.47212219238281,0],[-23.76,15.279999,0],[-36.511219,-54.274151,0],[-58.979999,-51.830001,0],[-64.190002,-31.399999,0],[-54.18,-32.36,0],[-43.2,-22.909999,0],[-37.333333,65.666667,0],[-69.345131,77.48262,0],[-55.65049,48.929001,0],[-63.530471,44.681263,0],[-66.647818,45.957319,0],[-59.630001,13.18,0],[-61.744888,12.06526,0],[-61.171322,10.30501,0],[-67.470001,7.9,0],[-58.159999,6.789999,0],[-60.02,-3.119999,0],[-56.45,-14.409999,0],[-65.260002,-19.059999,0],[-56.636503,-24.158676,0],[-56.509998,-33.409999,0],[-68.523514,-50.021889,0],[-72.505127,-51.732529,0],[-71.639999,-33.04,0],[-72.515821,-13.162849,0],[-76.970001,-6.03,0],[-78.620002,-1.24,0],[-76.739997,8.1,0],[-79.879913,9.368985,0],[-76.949996,18,0],[-72.699996,19.11,0],[-75.220001,20.149999,0],[-73.682953,20.95027,0],[-80.605,28.405556,0],[-84.388056,33.748889,0],[-79.931111,32.776389,0],[-83.920833,35.960556,0],[-84.500278,38.049167,0],[-77.460833,38.303056,0],[-82.515556,40.758333,0],[-83.045833,42.331389,0],[-74.006389,40.714167,0],[-71.802778,42.2625,0],[-72.973056,43.610556,0],[-68.0125,46.860556,0],[-72.581779,46.357398,0],[-78.53632621543271,52.72737572958358,0],[-66.921779,52.940118,0],[-75.652573,62.201069,0],[-64.865257,67.935417,0],[-94.969443,74.716943,0],[-82.793909,76.395731,0],[-97.49276733398439,69.18675994873048,0],[-90.5537452697754,63.36753463745121,0],[-89.270113,48.412197,0],[-79.604159,43.68731,0],[-89.401111,43.073056,0],[-94.633611,42.395278,0],[-89.588889,40.693611,0],[-90.197778,38.627222,0],[-90.704167,35.842222,0],[-91.061667,33.41,0],[-92.445,31.311111,0],[-98.493333,29.423889,0],[-103.349998,20.67,0],[-86.830001,21.17,0],[-89.529998,14.979999,0],[-87.449996,13.42,0],[-83.709999,9.369999,0],[-91.5149765,-0.3781085,0],[-109.425598,-27.1546,0],[-109.9142,22.88093,0],[-110.910003,27.92,0],[-110.925833,32.221667,0],[-104.526667,33.395,0],[-113.061111,37.6775,0],[-104.820833,38.833889,0],[-108.73,42.833056,0],[-113.895,45.175833,0],[-113.993056,46.872222,0],[-114.080796,51.039877,0],[-102.3889594419702,57.15883691318781,0],[-118.0333,66.0833,0],[-140.55,64.45,0],[-122.690386,58.80667,0],[-121.92985,50.686341,0],[-122.330833,47.606389,0],[-122.274167,47.564167,0],[-122.968503,45.309901,0],[-122.874444,42.326667,0],[-122.390556,40.586667,0],[-117.068611,39.493333,0],[-122.418333,37.775,0],[-117.108333,34.207778,0],[-116.544444,33.830278,0],[-117.156389,32.715278,0],[-149.891667,61.218333,0],[-155.566389,62.948889,0],[-165.406389,64.501111,0],[-155.09,19.729722,0],[-156.337974,20.804858,0],[-157.043209,21.141189,0],[-158.009167,21.386667,0],[-159.371111,21.981111,0]]}}]}'; |
|
17 | 17 | print $output; |
18 | 18 | |
19 | 19 | ?> |
@@ -8,8 +8,11 @@ |
||
8 | 8 | } |
9 | 9 | header('Content-Type: text/javascript'); |
10 | 10 | $timearray = array(); |
11 | -if (isset($_GET['now'])) $begin = time(); |
|
12 | -else $begin = strtotime(date("Y").'-12-24T02:00:00Z'); |
|
11 | +if (isset($_GET['now'])) { |
|
12 | + $begin = time(); |
|
13 | +} else { |
|
14 | + $begin = strtotime(date("Y").'-12-24T02:00:00Z'); |
|
15 | +} |
|
13 | 16 | for ($i =0; $i <= 288; $i++) { |
14 | 17 | $timearray[] = ($begin + $i*300)*1000; |
15 | 18 | } |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Airlines").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $airline_array = $Spotter->countAllAirlinesByIdent($ident); |
30 | 30 | if (!empty($airline_array)) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | print '</thead>'; |
42 | 42 | print '<tbody>'; |
43 | 43 | $i = 1; |
44 | - foreach($airline_array as $airline_item) |
|
44 | + foreach ($airline_array as $airline_item) |
|
45 | 45 | { |
46 | 46 | print '<tr>'; |
47 | 47 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Departure Airports by Country from %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Departure Airports by Country from %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | |
56 | 56 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByCountry($country); |
57 | 57 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
61 | 61 | print 'var series = ['; |
62 | 62 | $country_data = ''; |
63 | - foreach($airport_country_array as $airport_item) |
|
63 | + foreach ($airport_country_array as $airport_item) |
|
64 | 64 | { |
65 | 65 | $country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
66 | 66 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | print '</thead>'; |
109 | 109 | print '<tbody>'; |
110 | 110 | $i = 1; |
111 | - foreach($airport_country_array as $airport_item) |
|
111 | + foreach ($airport_country_array as $airport_item) |
|
112 | 112 | { |
113 | 113 | print '<tr>'; |
114 | 114 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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 Time of Day on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | + $title = sprintf(_("Most Common Time of Day on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | 13 | require_once('header.php'); |
14 | 14 | print '<div class="select-item">'; |
15 | 15 | print '<form action="'.$globalURL.'/date" method="post" class="form-inline">'; |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
27 | 27 | print '<br />'; |
28 | 28 | print '<div class="info column">'; |
29 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
29 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
30 | 30 | print '</div>'; |
31 | 31 | |
32 | 32 | include('date-sub-menu.php'); |
33 | 33 | print '<div class="column">'; |
34 | 34 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
35 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
35 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
36 | 36 | |
37 | 37 | $hour_array = $Spotter->countAllHoursByDate($date); |
38 | 38 | print ' <script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
46 | 46 | |
47 | 47 | $hour_data = ''; |
48 | - foreach($hour_array as $hour_item) |
|
48 | + foreach ($hour_array as $hour_item) |
|
49 | 49 | { |
50 | 50 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
51 | 51 | } |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Arrival Airports from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | include('airport-sub-menu.php'); |
58 | 58 | print '<div class="column">'; |
59 | 59 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
60 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
60 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
61 | 61 | $airport_airport_array = $Spotter->countAllArrivalAirportsByAirport($airport); |
62 | 62 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
63 | 63 | print '<script> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | var data = google.visualization.arrayToDataTable([ |
72 | 72 | ["'._("Airport").'", "'._("# of times").'"],'; |
73 | 73 | $airport_data = ''; |
74 | - foreach($airport_airport_array as $airport_item) |
|
74 | + foreach ($airport_airport_array as $airport_item) |
|
75 | 75 | { |
76 | 76 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
77 | 77 | $name = str_replace("'", "", $name); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | print '</thead>'; |
111 | 111 | print '<tbody>'; |
112 | 112 | $i = 1; |
113 | - foreach($airport_airport_array as $airport_item) |
|
113 | + foreach ($airport_airport_array as $airport_item) |
|
114 | 114 | { |
115 | 115 | print '<tr>'; |
116 | 116 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['airport'])) { |
7 | - header('Location: '.$globalURL.'/airport'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/airport'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
11 | 11 | $Spotter = new Spotter(); |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $globalLongitudeMin = '1.0'; //the minimum longitude (east) |
40 | 40 | |
41 | 41 | $globalCenterLatitude = '46.38'; //the latitude center of your coverage area |
42 | -$globalCenterLongitude = '5.29';//the longitude center of your coverage area |
|
42 | +$globalCenterLongitude = '5.29'; //the longitude center of your coverage area |
|
43 | 43 | |
44 | 44 | $globalLiveZoom = '9'; //default zoom on Live Map |
45 | 45 | $globalAirportZoom = '7'; //default zoom to begin to display airports icons |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $globalACARS = FALSE; |
141 | 141 | $globalACARSHost = '0.0.0.0'; // Local IP to listen |
142 | 142 | $globalACARSPort = '9999'; |
143 | -$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive |
|
143 | +$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive |
|
144 | 144 | $globalACARSArchiveKeepMonths = '0'; |
145 | 145 | |
146 | 146 | //APRS configuration (for glidernet) |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | //Retrieve Image from externals sources |
230 | 230 | $globalAircraftImageFetch = TRUE; |
231 | 231 | //Sources for Aircraft image |
232 | -$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources'); |
|
232 | +$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources'); |
|
233 | 233 | // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) |
234 | 234 | // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'exif' => true); |
235 | 235 | // ************************ |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE) |
238 | 238 | $globalSchedulesFetch = TRUE; |
239 | 239 | //Sources for airline schedule if not official airline site |
240 | -$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
240 | +$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
241 | 241 | |
242 | 242 | //Retrieve translation from external sources (set to FALSE for IVAO) |
243 | 243 | $globalTranslationFetch = TRUE; |