@@ -60,24 +60,24 @@ discard block |
||
60 | 60 | $min = false; |
61 | 61 | $allhistory = false; |
62 | 62 | $filter['source'] = array(); |
63 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
64 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
65 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
66 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
67 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
68 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
69 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
70 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
71 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
72 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
73 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
63 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
64 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
65 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
66 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
67 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
68 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
69 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
70 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
71 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
72 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
73 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
74 | 74 | |
75 | 75 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
76 | 76 | $min = true; |
77 | 77 | } else $min = false; |
78 | 78 | |
79 | 79 | if (isset($_GET['ident'])) { |
80 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
80 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
81 | 81 | $from_archive = true; |
82 | 82 | if ($tracker) { |
83 | 83 | $spotter_array = $TrackerArchive->getLastArchiveTrackerDataByIdent($ident); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $allhistory = true; |
92 | 92 | } |
93 | 93 | elseif (isset($_GET['flightaware_id'])) { |
94 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
94 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
95 | 95 | $from_archive = true; |
96 | 96 | if ($tracker) { |
97 | 97 | $spotter_array = $TrackerArchive->getLastArchiveTrackerDataById($flightaware_id); |
@@ -106,23 +106,23 @@ discard block |
||
106 | 106 | } |
107 | 107 | elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed'])) { |
108 | 108 | $from_archive = true; |
109 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
109 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
110 | 110 | if (isset($globalAircraftMaxUpdate)) $begindate = $begindate - $globalAircraftMaxUpdate; |
111 | 111 | else $begindate = $begindate - 3000; |
112 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
113 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
112 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
113 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
114 | 114 | if ($begindate != '' && $enddate != '') { |
115 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
116 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
115 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
116 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
117 | 117 | //$spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
118 | 118 | if ($tracker) { |
119 | - $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate,$enddate,$filter); |
|
119 | + $spotter_array = $TrackerArchive->getMinLiveTrackerData($begindate, $enddate, $filter); |
|
120 | 120 | } |
121 | 121 | elseif ($marine) { |
122 | - $spotter_array = $MarineArchive->getMinLiveMarineData($begindate,$enddate,$filter); |
|
122 | + $spotter_array = $MarineArchive->getMinLiveMarineData($begindate, $enddate, $filter); |
|
123 | 123 | } |
124 | 124 | else { |
125 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
125 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | if ($flightcnt == '') $flightcnt = 0; |
134 | 134 | } else $flightcnt = 0; |
135 | 135 | |
136 | -$sqltime = round(microtime(true)-$begintime,2); |
|
136 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
137 | 137 | |
138 | 138 | $pfi = ''; |
139 | 139 | //var_dump($spotter_array); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $begin = true; |
149 | 149 | if (!empty($spotter_array) && is_array($spotter_array)) { |
150 | 150 | $output .= '"features": ['; |
151 | - foreach($spotter_array as $spotter_item) { |
|
151 | + foreach ($spotter_array as $spotter_item) { |
|
152 | 152 | $j++; |
153 | 153 | date_default_timezone_set('UTC'); |
154 | 154 | if ($tracker) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if ($begin) { |
173 | 173 | if ($j > 1) { |
174 | 174 | if (isset($output_time)) { |
175 | - $output_time = substr($output_time, 0, -1); |
|
175 | + $output_time = substr($output_time, 0, -1); |
|
176 | 176 | $output .= '"time": ['.$output_time.']'; |
177 | 177 | } |
178 | 178 | $output .= '},'; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $output .= '"type": "LineString",'; |
182 | 182 | $output .= '"coordinates": ['; |
183 | 183 | if (isset($output_history)) { |
184 | - $output_history = substr($output_history, 0, -1); |
|
184 | + $output_history = substr($output_history, 0, -1); |
|
185 | 185 | $output .= $output_history; |
186 | 186 | } |
187 | 187 | $output .= ']}},'; |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | |
346 | 346 | if ($j > 1) { |
347 | 347 | if (isset($output_time)) { |
348 | - $output_time = substr($output_time, 0, -1); |
|
348 | + $output_time = substr($output_time, 0, -1); |
|
349 | 349 | $output .= '"time": ['.$output_time.']'; |
350 | 350 | } |
351 | 351 | $output .= '},'; |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $output .= '"type": "LineString",'; |
355 | 355 | $output .= '"coordinates": ['; |
356 | 356 | if (isset($output_history)) { |
357 | - $output_history = substr($output_history, 0, -1); |
|
357 | + $output_history = substr($output_history, 0, -1); |
|
358 | 358 | $output .= $output_history; |
359 | 359 | } |
360 | 360 | $output .= ']'; |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | $output = substr($output, 0, -1); |
366 | 366 | $output .= ']'; |
367 | 367 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
368 | - $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
|
368 | + $output .= '"totaltime": "'.round(microtime(true) - $begintime, 2).'",'; |
|
369 | 369 | if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
370 | 370 | $output .= '"fc": "'.$flightcnt.'"'; |
371 | 371 | } else { |