|
@@ -55,23 +55,23 @@ discard block |
|
|
block discarded – undo |
|
55
|
55
|
$min = true; |
|
56
|
56
|
$allhistory = false; |
|
57
|
57
|
$filter['source'] = array(); |
|
58
|
|
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
59
|
|
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
60
|
|
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
61
|
|
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
62
|
|
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
63
|
|
-if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
64
|
|
-if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
65
|
|
-if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
66
|
|
-if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
67
|
|
-if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
|
58
|
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
|
59
|
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
|
60
|
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
|
61
|
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
|
62
|
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
|
63
|
+if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
|
64
|
+if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
|
65
|
+if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
|
66
|
+if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
|
67
|
+if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
68
|
68
|
|
|
69
|
69
|
if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
|
70
|
70
|
$min = true; |
|
71
|
71
|
} else $min = false; |
|
72
|
72
|
|
|
73
|
73
|
if (isset($_GET['ident'])) { |
|
74
|
|
- $ident = urldecode(filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING)); |
|
|
74
|
+ $ident = urldecode(filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING)); |
|
75
|
75
|
if ($tracker) { |
|
76
|
76
|
$spotter_array = $TrackerLive->getLastLiveTrackerDataByIdent($ident); |
|
77
|
77
|
} elseif ($marine) { |
|
@@ -85,7 +85,7 @@ discard block |
|
|
block discarded – undo |
|
85
|
85
|
} |
|
86
|
86
|
$allhistory = true; |
|
87
|
87
|
} elseif (isset($_GET['flightaware_id'])) { |
|
88
|
|
- $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
|
88
|
+ $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
89
|
89
|
$spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
|
90
|
90
|
if (empty($spotter_array)) { |
|
91
|
91
|
$from_archive = true; |
|
@@ -93,44 +93,44 @@ discard block |
|
|
block discarded – undo |
|
93
|
93
|
} |
|
94
|
94
|
$allhistory = true; |
|
95
|
95
|
} elseif (isset($_GET['famtrack_id'])) { |
|
96
|
|
- $famtrack_id = urldecode(filter_input(INPUT_GET,'famtrack_id',FILTER_SANITIZE_STRING)); |
|
|
96
|
+ $famtrack_id = urldecode(filter_input(INPUT_GET, 'famtrack_id', FILTER_SANITIZE_STRING)); |
|
97
|
97
|
$spotter_array = $TrackerLive->getLastLiveTrackerDataById($famtrack_id); |
|
98
|
98
|
$allhistory = true; |
|
99
|
99
|
} elseif (isset($_GET['fammarine_id'])) { |
|
100
|
|
- $fammarine_id = urldecode(filter_input(INPUT_GET,'fammarine_id',FILTER_SANITIZE_STRING)); |
|
|
100
|
+ $fammarine_id = urldecode(filter_input(INPUT_GET, 'fammarine_id', FILTER_SANITIZE_STRING)); |
|
101
|
101
|
$spotter_array = $MarineLive->getLastLiveMarineDataById($fammarine_id); |
|
102
|
102
|
$allhistory = true; |
|
103
|
103
|
} elseif (isset($globalMapUseBbox) && $globalMapUseBbox && isset($_GET['coord']) && (!isset($globalMapPopup) || $globalMapPopup || (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true'))) { |
|
104
|
104
|
//} elseif (isset($_GET['coord'])) { |
|
105
|
105
|
$usecoord = true; |
|
106
|
|
- $coord = explode(',',$_GET['coord']); |
|
|
106
|
+ $coord = explode(',', $_GET['coord']); |
|
107
|
107
|
if ($tracker) { |
|
108
|
|
- $spotter_array = $TrackerLive->getLiveTrackerDatabyCoord($coord,$filter); |
|
|
108
|
+ $spotter_array = $TrackerLive->getLiveTrackerDatabyCoord($coord, $filter); |
|
109
|
109
|
} elseif ($marine) { |
|
110
|
|
- $spotter_array = $MarineLive->getLiveMarineDatabyCoord($coord,$filter); |
|
|
110
|
+ $spotter_array = $MarineLive->getLiveMarineDatabyCoord($coord, $filter); |
|
111
|
111
|
} else { |
|
112
|
|
- $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord,$filter); |
|
|
112
|
+ $spotter_array = $SpotterLive->getLiveSpotterDatabyCoord($coord, $filter); |
|
113
|
113
|
} |
|
114
|
114
|
} elseif (isset($globalMapUseBbox) && $globalMapUseBbox && isset($_GET['coord']) && $min) { |
|
115
|
115
|
$usecoord = true; |
|
116
|
|
- $coord = explode(',',$_GET['coord']); |
|
|
116
|
+ $coord = explode(',', $_GET['coord']); |
|
117
|
117
|
if ($tracker) { |
|
118
|
|
- $spotter_array = $TrackerLive->getMinLiveTrackerDatabyCoord($coord,$filter); |
|
|
118
|
+ $spotter_array = $TrackerLive->getMinLiveTrackerDatabyCoord($coord, $filter); |
|
119
|
119
|
} elseif ($marine) { |
|
120
|
|
- $spotter_array = $MarineLive->getMinLiveMarineDatabyCoord($coord,$filter); |
|
|
120
|
+ $spotter_array = $MarineLive->getMinLiveMarineDatabyCoord($coord, $filter); |
|
121
|
121
|
} else { |
|
122
|
|
- $spotter_array = $SpotterLive->getMinLiveSpotterDatabyCoord($coord,$filter); |
|
|
122
|
+ $spotter_array = $SpotterLive->getMinLiveSpotterDatabyCoord($coord, $filter); |
|
123
|
123
|
} |
|
124
|
124
|
} elseif (isset($_GET['archive']) && isset($_GET['begindate']) && isset($_GET['enddate']) && isset($_GET['speed']) && !isset($_GET['tracker']) && !isset($_GET['marine'])) { |
|
125
|
125
|
$from_archive = true; |
|
126
|
126
|
// $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
|
127
|
127
|
// $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
|
128
|
|
- $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
129
|
|
- $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
130
|
|
- $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
131
|
|
- $begindate = date('Y-m-d H:i:s',$begindate); |
|
132
|
|
- $enddate = date('Y-m-d H:i:s',$enddate); |
|
133
|
|
- $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
|
128
|
+ $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
|
129
|
+ $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
|
130
|
+ $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
|
131
|
+ $begindate = date('Y-m-d H:i:s', $begindate); |
|
|
132
|
+ $enddate = date('Y-m-d H:i:s', $enddate); |
|
|
133
|
+ $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
134
|
134
|
} elseif ($min) { |
|
135
|
135
|
if ($tracker) { |
|
136
|
136
|
$spotter_array = $TrackerLive->getMinLiveTrackerData($filter); |
|
@@ -142,25 +142,25 @@ discard block |
|
|
block discarded – undo |
|
142
|
142
|
# $min = true; |
|
143
|
143
|
} else { |
|
144
|
144
|
if ($tracker) { |
|
145
|
|
- $spotter_array = $TrackerLive->getLiveTrackerData('','',$filter); |
|
|
145
|
+ $spotter_array = $TrackerLive->getLiveTrackerData('', '', $filter); |
|
146
|
146
|
} elseif ($marine) { |
|
147
|
|
- $spotter_array = $marineLive->getLiveMarineData('','',$filter); |
|
|
147
|
+ $spotter_array = $marineLive->getLiveMarineData('', '', $filter); |
|
148
|
148
|
} else { |
|
149
|
|
- $spotter_array = $SpotterLive->getLiveSpotterData('','',$filter); |
|
|
149
|
+ $spotter_array = $SpotterLive->getLiveSpotterData('', '', $filter); |
|
150
|
150
|
} |
|
151
|
151
|
} |
|
152
|
152
|
|
|
153
|
153
|
|
|
154
|
154
|
if ($usecoord) { |
|
155
|
155
|
if (isset($_GET['archive'])) { |
|
156
|
|
- $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
|
156
|
+ $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
157
|
157
|
} else { |
|
158
|
158
|
$flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
|
159
|
159
|
} |
|
160
|
160
|
if ($flightcnt == '') $flightcnt = 0; |
|
161
|
161
|
} else $flightcnt = 0; |
|
162
|
162
|
|
|
163
|
|
-$sqltime = round(microtime(true)-$begintime,2); |
|
|
163
|
+$sqltime = round(microtime(true) - $begintime, 2); |
|
164
|
164
|
|
|
165
|
165
|
if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) $usenextlatlon = false; |
|
166
|
166
|
else $usenextlatlon = true; |
|
@@ -177,7 +177,7 @@ discard block |
|
|
block discarded – undo |
|
177
|
177
|
if (!empty($spotter_array) && is_array($spotter_array)) |
|
178
|
178
|
{ |
|
179
|
179
|
$output .= '"features": ['; |
|
180
|
|
- foreach($spotter_array as $spotter_item) |
|
|
180
|
+ foreach ($spotter_array as $spotter_item) |
|
181
|
181
|
{ |
|
182
|
182
|
$j++; |
|
183
|
183
|
date_default_timezone_set('UTC'); |
|
@@ -233,8 +233,8 @@ discard block |
|
|
block discarded – undo |
|
233
|
233
|
*/ |
|
234
|
234
|
//$output .= '"fc": "'.$spotter_item['nb'].'",'; |
|
235
|
235
|
if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
|
236
|
|
- if ($compress) $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
237
|
|
- else $output .= '"callsign": "'.str_replace('\\','',$spotter_item['ident']).'",'; |
|
|
236
|
+ if ($compress) $output .= '"c": "'.str_replace('\\', '', $spotter_item['ident']).'",'; |
|
|
237
|
+ else $output .= '"callsign": "'.str_replace('\\', '', $spotter_item['ident']).'",'; |
|
238
|
238
|
//" |
|
239
|
239
|
} else { |
|
240
|
240
|
if ($compress) $output .= '"c": "NA",'; |
|
@@ -243,7 +243,7 @@ discard block |
|
|
block discarded – undo |
|
243
|
243
|
if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
244
|
244
|
if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
|
245
|
245
|
$output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
|
246
|
|
- $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
|
|
246
|
+ $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ', '_', $spotter_item['aircraft_name'])).'",'; |
|
247
|
247
|
} elseif (isset($spotter_item['aircraft_type'])) { |
|
248
|
248
|
$output .= '"aircraft_name": "NA ('.$spotter_item['aircraft_type'].')",'; |
|
249
|
249
|
} elseif (!$min) { |
|
@@ -384,16 +384,16 @@ discard block |
|
|
block discarded – undo |
|
384
|
384
|
else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
385
|
385
|
|
|
386
|
386
|
if (isset($archivespeed)) { |
|
387
|
|
- $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
|
387
|
+ $nextcoord = $Common->nextcoord($spotter_item['latitude'], $spotter_item['longitude'], $spotter_item['ground_speed'], $spotter_item['heading'], $archivespeed); |
|
388
|
388
|
$output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
389
|
389
|
} elseif ($usenextlatlon) { |
|
390
|
|
- $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
|
390
|
+ $nextcoord = $Common->nextcoord($spotter_item['latitude'], $spotter_item['longitude'], $spotter_item['ground_speed'], $spotter_item['heading']); |
|
391
|
391
|
$output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
|
392
|
392
|
} |
|
393
|
393
|
|
|
394
|
394
|
if (!$min) $output .= '"image": "'.$image.'",'; |
|
395
|
395
|
if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
|
396
|
|
- $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
|
|
396
|
+ $output .= '"image_copyright": "'.str_replace('"', "'", trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '', $spotter_item['image_copyright']))).'",'; |
|
397
|
397
|
} |
|
398
|
398
|
if (isset($spotter_item['image_source_website'])) { |
|
399
|
399
|
$output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
|
@@ -415,7 +415,7 @@ discard block |
|
|
block discarded – undo |
|
415
|
415
|
$output .= '"waypoints": "'.$spotter_item['waypoints'].'",'; |
|
416
|
416
|
} |
|
417
|
417
|
if (isset($spotter_item['acars'])) { |
|
418
|
|
- $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
|
|
418
|
+ $output .= '"acars": "'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br />', $spotter_item['acars']['message'])).'",'; |
|
419
|
419
|
} |
|
420
|
420
|
// type when not aircraft ? |
|
421
|
421
|
if (isset($spotter_item['type'])) { |
|
@@ -493,7 +493,7 @@ discard block |
|
|
block discarded – undo |
|
493
|
493
|
|
|
494
|
494
|
} |
|
495
|
495
|
*/ |
|
496
|
|
- $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
|
|
496
|
+ $history = filter_input(INPUT_GET, 'history', FILTER_SANITIZE_STRING); |
|
497
|
497
|
if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
|
498
|
498
|
|
|
499
|
499
|
if ( |
|
@@ -501,11 +501,11 @@ discard block |
|
|
block discarded – undo |
|
501
|
501
|
|| ((isset($globalMapHistory) && $globalMapHistory) || $allhistory) |
|
502
|
502
|
// || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id'])) |
|
503
|
503
|
// || (isset($history) && $history != '' && $history != 'NA' && $history == $spotter_item['ident']) |
|
504
|
|
- || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
|
504
|
+ || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['flightaware_id'])) |
|
505
|
505
|
|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']) |
|
506
|
|
- || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['fammarine_id'])) |
|
|
506
|
+ || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['fammarine_id'])) |
|
507
|
507
|
|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['fammarine_id']) && $_GET['fammarine_id'] == $spotter_item['fammarine_id']) |
|
508
|
|
- || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['famtrackid'])) |
|
|
508
|
+ || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['famtrackid'])) |
|
509
|
509
|
|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['famtrackid']) && $_GET['famtrackid'] == $spotter_item['famtrackid']) |
|
510
|
510
|
) { |
|
511
|
511
|
if ($tracker) { |
|
@@ -542,9 +542,9 @@ discard block |
|
|
block discarded – undo |
|
542
|
542
|
else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
543
|
543
|
} |
|
544
|
544
|
$output_history .= '['; |
|
545
|
|
- $output_history .= $spotter_history['longitude'].', '; |
|
546
|
|
- $output_history .= $spotter_history['latitude'].', '; |
|
547
|
|
- $output_history .= $spotter_history['altitude']*30.48; |
|
|
545
|
+ $output_history .= $spotter_history['longitude'].', '; |
|
|
546
|
+ $output_history .= $spotter_history['latitude'].', '; |
|
|
547
|
+ $output_history .= $spotter_history['altitude']*30.48; |
|
548
|
548
|
$output_history .= '],'; |
|
549
|
549
|
/* |
|
550
|
550
|
if ($from_archive === false) { |
|
@@ -562,8 +562,8 @@ discard block |
|
|
block discarded – undo |
|
562
|
562
|
else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": ['; |
|
563
|
563
|
} else $d = true; |
|
564
|
564
|
$output_history .= '['; |
|
565
|
|
- $output_history .= $spotter_history['longitude'].', '; |
|
566
|
|
- $output_history .= $spotter_history['latitude']; |
|
|
565
|
+ $output_history .= $spotter_history['longitude'].', '; |
|
|
566
|
+ $output_history .= $spotter_history['latitude']; |
|
567
|
567
|
$output_history .= '],'; |
|
568
|
568
|
/* |
|
569
|
569
|
if ($from_archive === false) { |
|
@@ -579,9 +579,9 @@ discard block |
|
|
block discarded – undo |
|
579
|
579
|
|
|
580
|
580
|
if ($from_archive === false) { |
|
581
|
581
|
$output_historyd = '['; |
|
582
|
|
- $output_historyd .= $spotter_item['longitude'].', '; |
|
583
|
|
- $output_historyd .= $spotter_item['latitude']; |
|
584
|
|
- if (isset($spotter_history['altitude'])) $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
|
582
|
+ $output_historyd .= $spotter_item['longitude'].', '; |
|
|
583
|
+ $output_historyd .= $spotter_item['latitude']; |
|
|
584
|
+ if (isset($spotter_history['altitude'])) $output_historyd .= ','.$spotter_item['altitude']*30.48; |
|
585
|
585
|
$output_historyd .= '],'; |
|
586
|
586
|
//$output_history = $output_historyd.$output_history; |
|
587
|
587
|
$output_history = $output_history.$output_historyd; |
|
@@ -595,7 +595,7 @@ discard block |
|
|
block discarded – undo |
|
595
|
595
|
} |
|
596
|
596
|
} |
|
597
|
597
|
|
|
598
|
|
- if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
|
598
|
+ if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['flightaware_id'])) |
|
599
|
599
|
|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
|
600
|
600
|
&& (isset($spotter_item['departure_airport']) |
|
601
|
601
|
&& $spotter_item['departure_airport'] != 'NA' |
|
@@ -629,7 +629,7 @@ discard block |
|
|
block discarded – undo |
|
629
|
629
|
|
|
630
|
630
|
//if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA' && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
|
631
|
631
|
//if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
|
632
|
|
- if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
|
632
|
+ if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-', '', $history) == str_replace('-', '', $spotter_item['flightaware_id'])) |
|
633
|
633
|
|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
|
634
|
634
|
&& (isset($spotter_item['arrival_airport']) |
|
635
|
635
|
&& $spotter_item['arrival_airport'] != 'NA' |
|
@@ -660,7 +660,7 @@ discard block |
|
|
block discarded – undo |
|
660
|
660
|
$output = substr($output, 0, -1); |
|
661
|
661
|
$output .= ']'; |
|
662
|
662
|
$output .= ',"initial_sqltime": "'.$sqltime.'",'; |
|
663
|
|
- $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
|
|
663
|
+ $output .= '"totaltime": "'.round(microtime(true) - $begintime, 2).'",'; |
|
664
|
664
|
if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
665
|
665
|
$output .= '"fc": "'.$j.'"'; |
|
666
|
666
|
} else { |