@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $limit_start = 0; |
| 15 | 15 | $limit_end = 25; |
| 16 | 16 | $absolute_difference = 25; |
| 17 | - } else { |
|
| 17 | + } else { |
|
| 18 | 18 | $limit_explode = explode(",", $_GET['limit']); |
| 19 | 19 | $limit_start = $limit_explode[0]; |
| 20 | 20 | $limit_end = $limit_explode[1]; |
@@ -11,7 +11,9 @@ |
||
| 11 | 11 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
| 12 | 12 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
| 13 | 13 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
| 14 | -} else $spotter_array = array(); |
|
| 14 | +} else { |
|
| 15 | + $spotter_array = array(); |
|
| 16 | +} |
|
| 15 | 17 | |
| 16 | 18 | if (!empty($spotter_array)) |
| 17 | 19 | { |
@@ -18,21 +18,40 @@ discard block |
||
| 18 | 18 | } |
| 19 | 19 | header('Content-Type: text/javascript'); |
| 20 | 20 | |
| 21 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 22 | -else $compress = $globalJsonCompress; |
|
| 21 | +if (!isset($globalJsonCompress)) { |
|
| 22 | + $compress = true; |
|
| 23 | +} else { |
|
| 24 | + $compress = $globalJsonCompress; |
|
| 25 | +} |
|
| 23 | 26 | |
| 24 | 27 | $from_archive = false; |
| 25 | 28 | $min = false; |
| 26 | 29 | $allhistory = false; |
| 27 | 30 | $filter['source'] = array(); |
| 28 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 29 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 30 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 31 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
| 32 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 33 | -if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') $filter['airlines'] = explode(',',$_COOKIE['Airlines']); |
|
| 34 | -if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') $filter['source_aprs'] = explode(',',$_COOKIE['Sources']); |
|
| 35 | -if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') $filter['airlinestype'] = $_COOKIE['airlinestype']; |
|
| 31 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') { |
|
| 32 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
| 33 | +} |
|
| 34 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') { |
|
| 35 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
| 36 | +} |
|
| 37 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') { |
|
| 38 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
| 39 | +} |
|
| 40 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') { |
|
| 41 | + $filter['source'] = array_merge($filter['source'],array('sbs')); |
|
| 42 | +} |
|
| 43 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') { |
|
| 44 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
| 45 | +} |
|
| 46 | +if (isset($_COOKIE['Airlines']) && $_COOKIE['Airlines'] != '') { |
|
| 47 | + $filter['airlines'] = explode(',',$_COOKIE['Airlines']); |
|
| 48 | +} |
|
| 49 | +if (isset($_COOKIE['Sources']) && $_COOKIE['Sources'] != '') { |
|
| 50 | + $filter['source_aprs'] = explode(',',$_COOKIE['Sources']); |
|
| 51 | +} |
|
| 52 | +if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] != 'all') { |
|
| 53 | + $filter['airlinestype'] = $_COOKIE['airlinestype']; |
|
| 54 | +} |
|
| 36 | 55 | |
| 37 | 56 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
| 38 | 57 | $min = true; |
@@ -83,8 +102,12 @@ discard block |
||
| 83 | 102 | } else { |
| 84 | 103 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
| 85 | 104 | } |
| 86 | - if ($flightcnt == '') $flightcnt = 0; |
|
| 87 | -} else $flightcnt = 0; |
|
| 105 | + if ($flightcnt == '') { |
|
| 106 | + $flightcnt = 0; |
|
| 107 | + } |
|
| 108 | + } else { |
|
| 109 | + $flightcnt = 0; |
|
| 110 | +} |
|
| 88 | 111 | |
| 89 | 112 | $sqltime = round(microtime(true)-$begintime,2); |
| 90 | 113 | |
@@ -92,8 +115,11 @@ discard block |
||
| 92 | 115 | |
| 93 | 116 | $output = '{'; |
| 94 | 117 | $output .= '"type": "FeatureCollection",'; |
| 95 | - if ($min) $output .= '"minimal": "true",'; |
|
| 96 | - else $output .= '"minimal": "false",'; |
|
| 118 | + if ($min) { |
|
| 119 | + $output .= '"minimal": "true",'; |
|
| 120 | + } else { |
|
| 121 | + $output .= '"minimal": "false",'; |
|
| 122 | + } |
|
| 97 | 123 | $output .= '"fc": "'.$flightcnt.'",'; |
| 98 | 124 | $output .= '"sqt": "'.$sqltime.'",'; |
| 99 | 125 | |
@@ -162,11 +188,16 @@ discard block |
||
| 162 | 188 | //$output .= '"fc": "'.$flightcnt.'",'; |
| 163 | 189 | //$output .= '"sqt": "'.$sqltime.'",'; |
| 164 | 190 | $output .= '"properties": {'; |
| 165 | - if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 166 | - else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 191 | + if ($compress) { |
|
| 192 | + $output .= '"fi": "'.$spotter_item['flightaware_id'].'",'; |
|
| 193 | + } else { |
|
| 194 | + $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",'; |
|
| 195 | + } |
|
| 167 | 196 | $output .= '"fc": "'.$flightcnt.'",'; |
| 168 | 197 | $output .= '"sqt": "'.$sqltime.'",'; |
| 169 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 198 | + if (isset($begindate)) { |
|
| 199 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 200 | + } |
|
| 170 | 201 | |
| 171 | 202 | /* |
| 172 | 203 | if ($min) $output .= '"minimal": "true",'; |
@@ -174,13 +205,21 @@ discard block |
||
| 174 | 205 | */ |
| 175 | 206 | //$output .= '"fc": "'.$spotter_item['nb'].'",'; |
| 176 | 207 | if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') { |
| 177 | - if ($compress) $output .= '"c": "'.$spotter_item['ident'].'",'; |
|
| 178 | - else $output .= '"callsign": "'.$spotter_item['ident'].'",'; |
|
| 208 | + if ($compress) { |
|
| 209 | + $output .= '"c": "'.$spotter_item['ident'].'",'; |
|
| 210 | + } else { |
|
| 211 | + $output .= '"callsign": "'.$spotter_item['ident'].'",'; |
|
| 212 | + } |
|
| 179 | 213 | } else { |
| 180 | - if ($compress) $output .= '"c": "NA",'; |
|
| 181 | - else $output .= '"callsign": "NA",'; |
|
| 214 | + if ($compress) { |
|
| 215 | + $output .= '"c": "NA",'; |
|
| 216 | + } else { |
|
| 217 | + $output .= '"callsign": "NA",'; |
|
| 218 | + } |
|
| 219 | + } |
|
| 220 | + if (isset($spotter_item['registration'])) { |
|
| 221 | + $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 182 | 222 | } |
| 183 | - if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",'; |
|
| 184 | 223 | if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) { |
| 185 | 224 | $output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",'; |
| 186 | 225 | $output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",'; |
@@ -193,19 +232,29 @@ discard block |
||
| 193 | 232 | $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
| 194 | 233 | } |
| 195 | 234 | if (!isset($spotter_item['aircraft_shadow'])) { |
| 196 | - if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = ''; |
|
| 197 | - else { |
|
| 235 | + if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') { |
|
| 236 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 237 | + } else { |
|
| 198 | 238 | $aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']); |
| 199 | - if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 200 | - else $spotter_item['aircraft_shadow'] = ''; |
|
| 239 | + if (count($aircraft_info) > 0) { |
|
| 240 | + $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow']; |
|
| 241 | + } else { |
|
| 242 | + $spotter_item['aircraft_shadow'] = ''; |
|
| 243 | + } |
|
| 201 | 244 | } |
| 202 | 245 | } |
| 203 | 246 | if ($spotter_item['aircraft_shadow'] == '') { |
| 204 | - if ($compress) $output .= '"as": "default.png",'; |
|
| 205 | - else $output .= '"aircraft_shadow": "default.png",'; |
|
| 247 | + if ($compress) { |
|
| 248 | + $output .= '"as": "default.png",'; |
|
| 249 | + } else { |
|
| 250 | + $output .= '"aircraft_shadow": "default.png",'; |
|
| 251 | + } |
|
| 206 | 252 | } else { |
| 207 | - if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 208 | - else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 253 | + if ($compress) { |
|
| 254 | + $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 255 | + } else { |
|
| 256 | + $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
|
| 257 | + } |
|
| 209 | 258 | } |
| 210 | 259 | if (isset($spotter_item['airline_name'])) { |
| 211 | 260 | $output .= '"airline_name": "'.$spotter_item['airline_name'].'",'; |
@@ -213,8 +262,11 @@ discard block |
||
| 213 | 262 | $output .= '"airline_name": "NA",'; |
| 214 | 263 | } |
| 215 | 264 | if (isset($spotter_item['departure_airport'])) { |
| 216 | - if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 217 | - else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 265 | + if ($compress) { |
|
| 266 | + $output .= '"dac": "'.$spotter_item['departure_airport'].'",'; |
|
| 267 | + } else { |
|
| 268 | + $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",'; |
|
| 269 | + } |
|
| 218 | 270 | } |
| 219 | 271 | if (isset($spotter_item['departure_airport_city'])) { |
| 220 | 272 | $output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",'; |
@@ -226,8 +278,11 @@ discard block |
||
| 226 | 278 | $output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",'; |
| 227 | 279 | } |
| 228 | 280 | if (isset($spotter_item['arrival_airport'])) { |
| 229 | - if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 230 | - else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 281 | + if ($compress) { |
|
| 282 | + $output .= '"aac": "'.$spotter_item['arrival_airport'].'",'; |
|
| 283 | + } else { |
|
| 284 | + $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",'; |
|
| 285 | + } |
|
| 231 | 286 | } |
| 232 | 287 | if (isset($spotter_item['arrival_airport_city'])) { |
| 233 | 288 | $output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",'; |
@@ -245,18 +300,29 @@ discard block |
||
| 245 | 300 | $output .= '"ground_speed": "'.$spotter_item['ground_speed'].'",'; |
| 246 | 301 | } |
| 247 | 302 | |
| 248 | - if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 249 | - else $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 250 | - if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",'; |
|
| 251 | - else $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
| 303 | + if ($compress) { |
|
| 304 | + $output .= '"a": "'.$spotter_item['altitude'].'",'; |
|
| 305 | + } else { |
|
| 306 | + $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
|
| 307 | + } |
|
| 308 | + if ($compress) { |
|
| 309 | + $output .= '"h": "'.$spotter_item['heading'].'",'; |
|
| 310 | + } else { |
|
| 311 | + $output .= '"heading": "'.$spotter_item['heading'].'",'; |
|
| 312 | + } |
|
| 252 | 313 | |
| 253 | - if (isset($archivespeed)) $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
| 254 | - else $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
| 314 | + if (isset($archivespeed)) { |
|
| 315 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed); |
|
| 316 | + } else { |
|
| 317 | + $nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading']); |
|
| 318 | + } |
|
| 255 | 319 | //$output .= '"nextlatitude": "'.$nextcoord['latitude'].'",'; |
| 256 | 320 | //$output .= '"nextlongitude": "'.$nextcoord['longitude'].'",'; |
| 257 | 321 | $output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],'; |
| 258 | 322 | |
| 259 | - if (!$min) $output .= '"image": "'.$image.'",'; |
|
| 323 | + if (!$min) { |
|
| 324 | + $output .= '"image": "'.$image.'",'; |
|
| 325 | + } |
|
| 260 | 326 | if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') { |
| 261 | 327 | $output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",'; |
| 262 | 328 | } |
@@ -264,8 +330,11 @@ discard block |
||
| 264 | 330 | $output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",'; |
| 265 | 331 | } |
| 266 | 332 | if (isset($spotter_item['squawk'])) { |
| 267 | - if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 268 | - else $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 333 | + if ($compress) { |
|
| 334 | + $output .= '"sq": "'.$spotter_item['squawk'].'",'; |
|
| 335 | + } else { |
|
| 336 | + $output .= '"squawk": "'.$spotter_item['squawk'].'",'; |
|
| 337 | + } |
|
| 269 | 338 | } |
| 270 | 339 | if (isset($spotter_item['squawk_usage'])) { |
| 271 | 340 | $output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",'; |
@@ -283,8 +352,11 @@ discard block |
||
| 283 | 352 | $output .= '"acars": "'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"), '<br />',$spotter_item['acars']['message'])).'",'; |
| 284 | 353 | } |
| 285 | 354 | // FIXME : type when not aircraft ? |
| 286 | - if ($compress) $output .= '"t": "aircraft"'; |
|
| 287 | - else $output .= '"type": "aircraft"'; |
|
| 355 | + if ($compress) { |
|
| 356 | + $output .= '"t": "aircraft"'; |
|
| 357 | + } else { |
|
| 358 | + $output .= '"type": "aircraft"'; |
|
| 359 | + } |
|
| 288 | 360 | $output .= '},'; |
| 289 | 361 | $output .= '"geometry": {'; |
| 290 | 362 | $output .= '"type": "Point",'; |
@@ -339,7 +411,9 @@ discard block |
||
| 339 | 411 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id'])))) { |
| 340 | 412 | //if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) || (isset($_GET['history']) && $_GET['history'] != '' && $_GET['history'] != 'NA' && ($_GET['history'] == $spotter_item['ident'] || $_GET['history'] == $spotter_item['flightaware_id']))) || (isset($_GET['history']) && $_GET['history'] == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
| 341 | 413 | $history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING); |
| 342 | - if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
|
| 414 | + if ($history == '' && isset($_COOKIE['history'])) { |
|
| 415 | + $history = $_COOKIE['history']; |
|
| 416 | + } |
|
| 343 | 417 | if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || (!isset($_COOKIE['flightpath']) && (!isset($globalMapHistory) || $globalMapHistory || $allhistory) |
| 344 | 418 | || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id']))) |
| 345 | 419 | || (isset($history) && $history == '' && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) { |
@@ -364,8 +438,11 @@ discard block |
||
| 364 | 438 | $output_history .= ']}},'; |
| 365 | 439 | $output .= $output_history; |
| 366 | 440 | } |
| 367 | - if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 368 | - else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 441 | + if ($compress) { |
|
| 442 | + $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 443 | + } else { |
|
| 444 | + $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": ['; |
|
| 445 | + } |
|
| 369 | 446 | } |
| 370 | 447 | $output_history .= '['; |
| 371 | 448 | $output_history .= $spotter_history['longitude'].', '; |
@@ -414,7 +491,9 @@ discard block |
||
| 414 | 491 | $output .= ']'; |
| 415 | 492 | $output .= ',"initial_sqltime": "'.$sqltime.'",'; |
| 416 | 493 | $output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",'; |
| 417 | - if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",'; |
|
| 494 | + if (isset($begindate)) { |
|
| 495 | + $output .= '"archive_date": "'.$begindate.'",'; |
|
| 496 | + } |
|
| 418 | 497 | $output .= '"fc": "'.$j.'"'; |
| 419 | 498 | } else { |
| 420 | 499 | $output .= '"features": '; |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 41 | 41 | { |
| 42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 43 | - } |
|
| 44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 45 | 44 | { |
| 46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 47 | 46 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -41,7 +41,9 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | if (isset($globalTimezone)) { |
| 43 | 43 | date_default_timezone_set($globalTimezone); |
| 44 | - } else date_default_timezone_set('UTC'); |
|
| 44 | + } else { |
|
| 45 | + date_default_timezone_set('UTC'); |
|
| 46 | + } |
|
| 45 | 47 | print '<tr>'; |
| 46 | 48 | if (isset($_GET['image']) && $_GET['image'] == "true") |
| 47 | 49 | { |
@@ -98,10 +100,14 @@ discard block |
||
| 98 | 100 | print '</div>'; |
| 99 | 101 | print '<div class="other2">'; |
| 100 | 102 | print '<span><i class="fa fa-arrow-up"></i> '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country']; |
| 101 | - if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') print ' ('.$spotter_item['departure_airport_time'].')'; |
|
| 103 | + if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') { |
|
| 104 | + print ' ('.$spotter_item['departure_airport_time'].')'; |
|
| 105 | + } |
|
| 102 | 106 | print '</span>'; |
| 103 | 107 | print '<span><i class="fa fa-arrow-down"></i> '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country']; |
| 104 | - if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
| 108 | + if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') { |
|
| 109 | + print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
| 110 | + } |
|
| 105 | 111 | print '</span>'; |
| 106 | 112 | print '</div>'; |
| 107 | 113 | print '<div class="other3">'; |
@@ -51,7 +51,9 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if (isset($globalTimezone)) { |
| 53 | 53 | date_default_timezone_set($globalTimezone); |
| 54 | - } else date_default_timezone_set('UTC'); |
|
| 54 | + } else { |
|
| 55 | + date_default_timezone_set('UTC'); |
|
| 56 | + } |
|
| 55 | 57 | |
| 56 | 58 | //date_default_timezone_set('UTC'); |
| 57 | 59 | if (is_array($all_data) && count($all_data) > 0) { |
@@ -300,9 +302,13 @@ discard block |
||
| 300 | 302 | print '<div>'; |
| 301 | 303 | if (isset($spotter_item['pilot_id']) && $spotter_item['pilot_id'] != "") |
| 302 | 304 | { |
| 303 | - if ($spotter_item['format_source'] == 'whazzup') print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 304 | - elseif ($spotter_item['format_source'] == 'vatsimtxt') print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 305 | - else print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
| 305 | + if ($spotter_item['format_source'] == 'whazzup') { |
|
| 306 | + print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 307 | + } elseif ($spotter_item['format_source'] == 'vatsimtxt') { |
|
| 308 | + print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; |
|
| 309 | + } else { |
|
| 310 | + print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
| 311 | + } |
|
| 306 | 312 | } else { |
| 307 | 313 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != "") |
| 308 | 314 | { |
@@ -38,8 +38,12 @@ |
||
| 38 | 38 | if (!empty($spotter_array)) { |
| 39 | 39 | include('table-output.php'); |
| 40 | 40 | print '<div class="pagination">'; |
| 41 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'/'.$_GET['sort'].'">«'._("Previous Page").'</a>'; |
|
| 42 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'/'.$_GET['sort'].'">'._("Next Page").'»</a>'; |
|
| 41 | + if ($limit_previous_1 >= 0) { |
|
| 42 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'/'.$_GET['sort'].'">«'._("Previous Page").'</a>'; |
|
| 43 | + } |
|
| 44 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
| 45 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'/'.$_GET['sort'].'">'._("Next Page").'»</a>'; |
|
| 46 | + } |
|
| 43 | 47 | print '</div>'; |
| 44 | 48 | } |
| 45 | 49 | print '</div>'; |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 41 | 41 | { |
| 42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 43 | - } |
|
| 44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 45 | 44 | { |
| 46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 47 | 46 | } |