@@ -18,7 +18,9 @@ discard block |
||
| 18 | 18 | public function __construct($dbc = null) { |
| 19 | 19 | $Connection = new Connection($dbc); |
| 20 | 20 | $this->db = $Connection->db; |
| 21 | - if ($this->db === null) die('Error: No DB connection. (Source)'); |
|
| 21 | + if ($this->db === null) { |
|
| 22 | + die('Error: No DB connection. (Source)'); |
|
| 23 | + } |
|
| 22 | 24 | } |
| 23 | 25 | |
| 24 | 26 | public function getAllLocationInfo() { |
@@ -83,7 +85,9 @@ discard block |
||
| 83 | 85 | $query .= " AND source_location.latitude BETWEEN ".$minlat." AND ".$maxlat." AND source_location.longitude BETWEEN ".$minlong." AND ".$maxlong." AND source_location.latitude <> 0 AND source_location.longitude <> 0"; |
| 84 | 86 | } |
| 85 | 87 | $query .= " ORDER BY last_seen DESC"; |
| 86 | - if ($limit) $query .= " LIMIT 1000"; |
|
| 88 | + if ($limit) { |
|
| 89 | + $query .= " LIMIT 1000"; |
|
| 90 | + } |
|
| 87 | 91 | $query_values = array(':type' => $type); |
| 88 | 92 | try { |
| 89 | 93 | $sth = $this->db->prepare($query); |
@@ -122,7 +126,9 @@ discard block |
||
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '', $description = '') { |
| 125 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
| 129 | + if ($last_seen == '') { |
|
| 130 | + $last_seen = date('Y-m-d H:i:s'); |
|
| 131 | + } |
|
| 126 | 132 | $query = "INSERT INTO source_location (name,latitude,longitude,altitude,country,city,logo,source,type,source_id,last_seen,location_id,description) VALUES (:name,:latitude,:longitude,:altitude,:country,:city,:logo,:source,:type,:source_id,:last_seen,:location_id,:description)"; |
| 127 | 133 | $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
| 128 | 134 | try { |
@@ -134,7 +140,9 @@ discard block |
||
| 134 | 140 | } |
| 135 | 141 | |
| 136 | 142 | public function updateLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0,$location_id = 0,$last_seen = '',$description = '') { |
| 137 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
| 143 | + if ($last_seen == '') { |
|
| 144 | + $last_seen = date('Y-m-d H:i:s'); |
|
| 145 | + } |
|
| 138 | 146 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, source_id = :source_id, last_seen = :last_seen,location_id = :location_id, description = :description WHERE name = :name AND source = :source"; |
| 139 | 147 | $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':source_id' => $source_id,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
| 140 | 148 | try { |
@@ -157,7 +165,9 @@ discard block |
||
| 157 | 165 | } |
| 158 | 166 | |
| 159 | 167 | public function updateLocationByLocationID($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png',$type = '',$source_id = 0, $location_id,$last_seen = '',$description = '') { |
| 160 | - if ($last_seen == '') $last_seen = date('Y-m-d H:i:s'); |
|
| 168 | + if ($last_seen == '') { |
|
| 169 | + $last_seen = date('Y-m-d H:i:s'); |
|
| 170 | + } |
|
| 161 | 171 | $query = "UPDATE source_location SET latitude = :latitude,longitude = :longitude,altitude = :altitude,country = :country,city = :city,logo = :logo,type = :type, last_seen = :last_seen, description = :description WHERE location_id = :location_id AND source = :source AND source_id = :source_id"; |
| 162 | 172 | $query_values = array(':source_id' => $source_id,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source,':type' => $type,':last_seen' => $last_seen,':location_id' => $location_id,':description' => $description); |
| 163 | 173 | try { |
@@ -24,7 +24,9 @@ discard block |
||
| 24 | 24 | public function __construct($dbc = null) { |
| 25 | 25 | $Connection = new Connection($dbc); |
| 26 | 26 | $this->db = $Connection->db(); |
| 27 | - if ($this->db === null) die('Error: No DB connection.'); |
|
| 27 | + if ($this->db === null) { |
|
| 28 | + die('Error: No DB connection.'); |
|
| 29 | + } |
|
| 28 | 30 | } |
| 29 | 31 | |
| 30 | 32 | /** |
@@ -139,7 +141,9 @@ discard block |
||
| 139 | 141 | $sth->closeCursor(); |
| 140 | 142 | if (is_array($row) && count($row) > 0) { |
| 141 | 143 | return $row; |
| 142 | - } else return array(); |
|
| 144 | + } else { |
|
| 145 | + return array(); |
|
| 146 | + } |
|
| 143 | 147 | } |
| 144 | 148 | |
| 145 | 149 | /* |
@@ -180,7 +184,9 @@ discard block |
||
| 180 | 184 | $Common = new Common(); |
| 181 | 185 | $check_date = new Datetime($date); |
| 182 | 186 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 183 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 187 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 188 | + return array(); |
|
| 189 | + } |
|
| 184 | 190 | $url = "http://www.airfrance.fr/cgi-bin/AF/FR/fr/local/resainfovol/infovols/detailsVolJson.do?codeCompagnie[0]=".$carrier."&numeroVol[0]=".$numvol."&dayFlightDate=".$check_date->format('d')."&yearMonthFlightDate=".$check_date->format('Ym'); |
| 185 | 191 | $json = $Common->getData($url); |
| 186 | 192 | var_dump($json); |
@@ -207,7 +213,9 @@ discard block |
||
| 207 | 213 | */ |
| 208 | 214 | |
| 209 | 215 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_airfrance'); |
| 210 | - } else return array(); |
|
| 216 | + } else { |
|
| 217 | + return array(); |
|
| 218 | + } |
|
| 211 | 219 | } |
| 212 | 220 | |
| 213 | 221 | /** |
@@ -222,7 +230,9 @@ discard block |
||
| 222 | 230 | date_default_timezone_set($globalTimezone); |
| 223 | 231 | $check_date = new Datetime($date); |
| 224 | 232 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 225 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 233 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 234 | + return array(); |
|
| 235 | + } |
|
| 226 | 236 | $url = "http://www.easyjet.com/ft/api/flights?date=".$check_date->format('Y-m-d')."&fn=".$callsign; |
| 227 | 237 | $json = $Common->getData($url); |
| 228 | 238 | $parsed_json = json_decode($json); |
@@ -235,7 +245,9 @@ discard block |
||
| 235 | 245 | $arrivalTime = $parsed_json->{'flights'}[0]->{'dates'}->{'fsta'}; |
| 236 | 246 | |
| 237 | 247 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_easyjet'); |
| 238 | - } else return array(); |
|
| 248 | + } else { |
|
| 249 | + return array(); |
|
| 250 | + } |
|
| 239 | 251 | } |
| 240 | 252 | |
| 241 | 253 | /** |
@@ -246,7 +258,9 @@ discard block |
||
| 246 | 258 | private function getRyanair($callsign) { |
| 247 | 259 | $Common = new Common(); |
| 248 | 260 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 249 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 261 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 262 | + return array(); |
|
| 263 | + } |
|
| 250 | 264 | $url = "http://www.ryanair.com/fr/api/2/flight-info/0/50/"; |
| 251 | 265 | $post = '{"flight":"'.$numvol.'","minDepartureTime":"00:00","maxDepartureTime":"23:59"}'; |
| 252 | 266 | $headers = array('Content-Type: application/json','Content-Length: ' . strlen($post)); |
@@ -260,8 +274,12 @@ discard block |
||
| 260 | 274 | $departureTime = $parsed_json->{'flightInfo'}[0]->{'departureTime'}; |
| 261 | 275 | $arrivalTime = $parsed_json->{'flightInfo'}[0]->{'arrivalTime'}; |
| 262 | 276 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime, 'Source' => 'website_ryanair'); |
| 263 | - } else return array(); |
|
| 264 | - } else return array(); |
|
| 277 | + } else { |
|
| 278 | + return array(); |
|
| 279 | + } |
|
| 280 | + } else { |
|
| 281 | + return array(); |
|
| 282 | + } |
|
| 265 | 283 | } |
| 266 | 284 | |
| 267 | 285 | /** |
@@ -272,7 +290,9 @@ discard block |
||
| 272 | 290 | private function getSwiss($callsign) { |
| 273 | 291 | $Common = new Common(); |
| 274 | 292 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 275 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 293 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 294 | + return array(); |
|
| 295 | + } |
|
| 276 | 296 | $url = "http://www.world-of-swiss.com/fr/routenetwork.json"; |
| 277 | 297 | $json = $Common->getData($url); |
| 278 | 298 | $parsed_json = json_decode($json); |
@@ -292,8 +312,12 @@ discard block |
||
| 292 | 312 | } |
| 293 | 313 | if (isset($DepartureAirportIata) && isset($ArrivalAirportIata)) { |
| 294 | 314 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_swiss'); |
| 295 | - } else return array(); |
|
| 296 | - } else return array(); |
|
| 315 | + } else { |
|
| 316 | + return array(); |
|
| 317 | + } |
|
| 318 | + } else { |
|
| 319 | + return array(); |
|
| 320 | + } |
|
| 297 | 321 | } |
| 298 | 322 | |
| 299 | 323 | /** |
@@ -307,12 +331,18 @@ discard block |
||
| 307 | 331 | $Common = new Common(); |
| 308 | 332 | $check_date = new Datetime($date); |
| 309 | 333 | $numvol = sprintf('%04d',preg_replace('/^[A-Z]*/','',$callsign)); |
| 310 | - if (!filter_var(preg_replace('/^[A-Z]*/','',$callsign),FILTER_VALIDATE_INT)) return array(); |
|
| 311 | - if ($globalBritishAirwaysKey == '') return array(); |
|
| 334 | + if (!filter_var(preg_replace('/^[A-Z]*/','',$callsign),FILTER_VALIDATE_INT)) { |
|
| 335 | + return array(); |
|
| 336 | + } |
|
| 337 | + if ($globalBritishAirwaysKey == '') { |
|
| 338 | + return array(); |
|
| 339 | + } |
|
| 312 | 340 | $url = "https://api.ba.com/rest-v1/v1/flights;flightNumber=".$numvol.";scheduledDepartureDate=".$check_date->format('Y-m-d').".json"; |
| 313 | 341 | $headers = array('Client-Key: '.$globalBritishAirwaysKey); |
| 314 | 342 | $json = $Common->getData($url,'get','',$headers); |
| 315 | - if ($json == '') return array(); |
|
| 343 | + if ($json == '') { |
|
| 344 | + return array(); |
|
| 345 | + } |
|
| 316 | 346 | $parsed_json = json_decode($json); |
| 317 | 347 | $flights = $parsed_json->{'FlightsResponse'}; |
| 318 | 348 | if (count($flights) > 0) { |
@@ -321,7 +351,9 @@ discard block |
||
| 321 | 351 | $departureTime = date('H:i',strtotime($parsed_json->{'FlightsResponse'}->{'Flight'}->{'Sector'}->{'ScheduledDepartureDateTime'})); |
| 322 | 352 | $arrivalTime = date('H:i',strtotime($parsed_json->{'FlightsResponse'}->{'Flight'}->{'Sector'}->{'ScheduledArrivalDateTime'})); |
| 323 | 353 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_britishairways'); |
| 324 | - } else return array(); |
|
| 354 | + } else { |
|
| 355 | + return array(); |
|
| 356 | + } |
|
| 325 | 357 | } |
| 326 | 358 | |
| 327 | 359 | /** |
@@ -335,19 +367,27 @@ discard block |
||
| 335 | 367 | $Common = new Common(); |
| 336 | 368 | $check_date = new Datetime($date); |
| 337 | 369 | $numvol = sprintf('%04d',preg_replace('/^[A-Z]*/','',$callsign)); |
| 338 | - if (!filter_var(preg_replace('/^[A-Z]*/','',$callsign),FILTER_VALIDATE_INT)) return array(); |
|
| 339 | - if (!isset($globalLufthansaKey) || $globalLufthansaKey == '' || !isset($globalLufthansaKey['key']) || $globalLufthansaKey['key'] == '') return array(); |
|
| 370 | + if (!filter_var(preg_replace('/^[A-Z]*/','',$callsign),FILTER_VALIDATE_INT)) { |
|
| 371 | + return array(); |
|
| 372 | + } |
|
| 373 | + if (!isset($globalLufthansaKey) || $globalLufthansaKey == '' || !isset($globalLufthansaKey['key']) || $globalLufthansaKey['key'] == '') { |
|
| 374 | + return array(); |
|
| 375 | + } |
|
| 340 | 376 | $url = "https://api.lufthansa.com/v1/oauth/token"; |
| 341 | 377 | $post = array('client_id' => $globalLufthansaKey['key'],'client_secret' => $globalLufthansaKey['secret'],'grant_type' => 'client_credentials'); |
| 342 | 378 | $data = $Common->getData($url,'post',$post); |
| 343 | 379 | $parsed_data = json_decode($data); |
| 344 | - if (!isset($parsed_data->{'access_token'})) return array(); |
|
| 380 | + if (!isset($parsed_data->{'access_token'})) { |
|
| 381 | + return array(); |
|
| 382 | + } |
|
| 345 | 383 | $token = $parsed_data->{'access_token'}; |
| 346 | 384 | |
| 347 | 385 | $url = "https://api.lufthansa.com/v1/operations/flightstatus/LH".$numvol."/".$check_date->format('Y-m-d'); |
| 348 | 386 | $headers = array('Authorization: Bearer '.$token,'Accept: application/json'); |
| 349 | 387 | $json = $Common->getData($url,'get','',$headers); |
| 350 | - if ($json == '') return array(); |
|
| 388 | + if ($json == '') { |
|
| 389 | + return array(); |
|
| 390 | + } |
|
| 351 | 391 | $parsed_json = json_decode($json); |
| 352 | 392 | if (isset($parsed_json->{'FlightStatusResource'}) && count($parsed_json->{'FlightStatusResource'}) > 0) { |
| 353 | 393 | $DepartureAirportIata = $parsed_json->{'FlightStatusResource'}->{'Flights'}->{'Flight'}->{'Departure'}->{'AirportCode'}; |
@@ -355,7 +395,9 @@ discard block |
||
| 355 | 395 | $ArrivalAirportIata = $parsed_json->{'FlightStatusResource'}->{'Flights'}->{'Flight'}->{'Arrival'}->{'AirportCode'}; |
| 356 | 396 | $arrivalTime = date('H:i',strtotime($parsed_json->{'FlightStatusResource'}->{'Flights'}->{'Flight'}->{'Arrival'}->{'ScheduledTimeLocal'}->{'DateTime'})); |
| 357 | 397 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_lufthansa'); |
| 358 | - } else return array(); |
|
| 398 | + } else { |
|
| 399 | + return array(); |
|
| 400 | + } |
|
| 359 | 401 | } |
| 360 | 402 | |
| 361 | 403 | /** |
@@ -369,14 +411,20 @@ discard block |
||
| 369 | 411 | $Common = new Common(); |
| 370 | 412 | $check_date = new Datetime($date); |
| 371 | 413 | $numvol = sprintf('%04d',preg_replace('/^[A-Z]*/','',$callsign)); |
| 372 | - if (!filter_var(preg_replace('/^[A-Z]*/','',$callsign),FILTER_VALIDATE_INT)) return array(); |
|
| 373 | - if ($globalTransaviaKey == '') return array(); |
|
| 414 | + if (!filter_var(preg_replace('/^[A-Z]*/','',$callsign),FILTER_VALIDATE_INT)) { |
|
| 415 | + return array(); |
|
| 416 | + } |
|
| 417 | + if ($globalTransaviaKey == '') { |
|
| 418 | + return array(); |
|
| 419 | + } |
|
| 374 | 420 | $url = "https://tst.api.transavia.com/v1/flightstatus/departuredate/".$check_date->format('Ymd').'/flightnumber/HV'.$numvol; |
| 375 | 421 | //$url = "https://api.transavia.com/v1/flightstatus/departuredate/".$check_date->format('Ymd').'/flightnumber/HV'.$numvol; |
| 376 | 422 | $headers = array('apikey: '.$globalTransaviaKey); |
| 377 | 423 | $json = $Common->getData($url,'get','',$headers); |
| 378 | 424 | //echo 'result : '.$json; |
| 379 | - if ($json == '') return array(); |
|
| 425 | + if ($json == '') { |
|
| 426 | + return array(); |
|
| 427 | + } |
|
| 380 | 428 | $parsed_json = json_decode($json); |
| 381 | 429 | |
| 382 | 430 | if (isset($parsed_json->{'data'}[0])) { |
@@ -385,7 +433,9 @@ discard block |
||
| 385 | 433 | $ArrivalAirportIata = $parsed_json->{'data'}[0]->{'flight'}->{'arrivalAirport'}->{'locationCode'}; |
| 386 | 434 | $arrivalTime = date('H:i',strtotime($parsed_json->{'data'}[0]->{'flight'}->{'arrivalDateTime'})); |
| 387 | 435 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_transavia'); |
| 388 | - } else return array(); |
|
| 436 | + } else { |
|
| 437 | + return array(); |
|
| 438 | + } |
|
| 389 | 439 | } |
| 390 | 440 | |
| 391 | 441 | /** |
@@ -396,7 +446,9 @@ discard block |
||
| 396 | 446 | public function getTunisair($callsign) { |
| 397 | 447 | $Common = new Common(); |
| 398 | 448 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 399 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 449 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 450 | + return array(); |
|
| 451 | + } |
|
| 400 | 452 | $url = "http://www.tunisair.com/site/publish/module/Volj/fr/Flight_List.asp"; |
| 401 | 453 | $data = $Common->getData($url); |
| 402 | 454 | $table = $Common->table2array($data); |
@@ -417,7 +469,9 @@ discard block |
||
| 417 | 469 | $Common = new Common(); |
| 418 | 470 | $check_date = new Datetime($date); |
| 419 | 471 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 420 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 472 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 473 | + return array(); |
|
| 474 | + } |
|
| 421 | 475 | $final_date = str_replace('/','%2F',$check_date->format('d/m/Y')); |
| 422 | 476 | $url = "http://www.vueling.com/Base/BaseProxy/RenderMacro/?macroalias=FlightStatusResult&searchBy=bycode&date=".$final_date."&flightNumber=".$numvol."&idioma=en-GB"; |
| 423 | 477 | $data = $Common->getData($url); |
@@ -427,8 +481,11 @@ discard block |
||
| 427 | 481 | $DepartureAirportIata = str_replace('flightOri=','',$result[0]); |
| 428 | 482 | preg_match('/flightDest=[A-Z]{3}/',$data,$result); |
| 429 | 483 | $ArrivalAirportIata = str_replace('flightDest=','',$result[0]); |
| 430 | - if ($DepartureAirportIata != '' && $ArrivalAirportIata != '') return array('DepartureAirportIATA' => $DepartureAirportIata,'ArrivalAirportIATA' => $ArrivalAirportIata,'Source' => 'website_vueling'); |
|
| 431 | - else return array(); |
|
| 484 | + if ($DepartureAirportIata != '' && $ArrivalAirportIata != '') { |
|
| 485 | + return array('DepartureAirportIATA' => $DepartureAirportIata,'ArrivalAirportIATA' => $ArrivalAirportIata,'Source' => 'website_vueling'); |
|
| 486 | + } else { |
|
| 487 | + return array(); |
|
| 488 | + } |
|
| 432 | 489 | } |
| 433 | 490 | return array(); |
| 434 | 491 | } |
@@ -443,7 +500,9 @@ discard block |
||
| 443 | 500 | $Common = new Common(); |
| 444 | 501 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 445 | 502 | $check_date = new Datetime($date); |
| 446 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 503 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 504 | + return array(); |
|
| 505 | + } |
|
| 447 | 506 | $url = "https://www.iberia.com/web/flightDetail.do"; |
| 448 | 507 | $post = array('numvuelo' => $numvol,'fecha' => $check_date->format('Ymd'),'airlineID' => 'IB'); |
| 449 | 508 | $data = $Common->getData($url,'post',$post); |
@@ -460,7 +519,9 @@ discard block |
||
| 460 | 519 | $arrivalTime = trim(str_replace(' lunes','',str_replace(' ','',$flight[5][1]))); |
| 461 | 520 | if ($arrivalTime == 'Hora estimada de llegada') { |
| 462 | 521 | $arrivalTime = substr(trim(str_replace(' lunes','',str_replace(' ','',$flight[5][2]))),0,5); |
| 463 | - } else $arrivalTime = substr($arrivalTime,0,5); |
|
| 522 | + } else { |
|
| 523 | + $arrivalTime = substr($arrivalTime,0,5); |
|
| 524 | + } |
|
| 464 | 525 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_iberia'); |
| 465 | 526 | } |
| 466 | 527 | } |
@@ -478,7 +539,9 @@ discard block |
||
| 478 | 539 | $Common = new Common(); |
| 479 | 540 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 480 | 541 | $check_date = new Datetime($date); |
| 481 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 542 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 543 | + return array(); |
|
| 544 | + } |
|
| 482 | 545 | $url = "http://www.staralliance.com/flifoQueryAction.do?myAirline=&airlineCode=".$carrier."&flightNo=".$numvol."&day=".$check_date->format('d')."&month=".$check_date->format('m')."&year=".$check_date->format('Y')."&departuredate=".$check_date->format('d-M-Y'); |
| 483 | 546 | $data = $Common->getData($url); |
| 484 | 547 | if ($data != '') { |
@@ -494,7 +557,9 @@ discard block |
||
| 494 | 557 | $departureTime = substr(trim(str_replace('Scheduled: ','',$flight[29][0])),0,5); |
| 495 | 558 | $arrivalTime = substr(trim(str_replace('Scheduled: ','',$flight[29][1])),0,5); |
| 496 | 559 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_staralliance'); |
| 497 | - } else return array(); |
|
| 560 | + } else { |
|
| 561 | + return array(); |
|
| 562 | + } |
|
| 498 | 563 | } |
| 499 | 564 | |
| 500 | 565 | |
@@ -514,7 +579,9 @@ discard block |
||
| 514 | 579 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 515 | 580 | $check_date = new Datetime($date); |
| 516 | 581 | $url= "http://booking.alitalia.com/FlightStatus/fr_fr/FlightInfo?Brand=az&NumeroVolo=".$numvol."&DataCompleta=".$check_date->format('d/m/Y'); |
| 517 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 582 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 583 | + return array(); |
|
| 584 | + } |
|
| 518 | 585 | $data = $Common->getData($url); |
| 519 | 586 | if ($data != '') { |
| 520 | 587 | $table = $Common->text2array($data); |
@@ -538,7 +605,9 @@ discard block |
||
| 538 | 605 | $check_date = new Datetime($date); |
| 539 | 606 | $url= "http://www.brusselsairlines.com/api/flightstatus/getresults?from=NA&to=NA&date=".$check_date->format('d/m/Y')."&hour=NA&lookup=flightnumber&flightnumber=".$numvol."&publicationID=302"; |
| 540 | 607 | //http://www.brusselsairlines.com/fr-fr/informations-pratiques/statut-de-votre-vol/resultat.aspx?flightnumber=".$numvol."&date=".$check_date->format('d/m/Y')."&lookup=flightnumber"; |
| 541 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 608 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 609 | + return array(); |
|
| 610 | + } |
|
| 542 | 611 | $data = $Common->getData($url); |
| 543 | 612 | if ($data != '') { |
| 544 | 613 | //echo $data; |
@@ -628,7 +697,9 @@ discard block |
||
| 628 | 697 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 629 | 698 | $url= "http://www.flytap.com/France/fr/PlanifierEtReserver/Outils/DepartsEtArrivees"; |
| 630 | 699 | //$check_date = new Datetime($date); |
| 631 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 700 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 701 | + return array(); |
|
| 702 | + } |
|
| 632 | 703 | $post = array('arrivalsdepartures_content' => 'number','arrivalsdepartures_tp' => $numvol,'arrivalsdepartures_trk' => 'ARR','arrivalsdepartures_date_trk' => '1','aptCode' => '','arrivalsdepartures' => 'DEP','arrivalsdepartures_date' => '1','aptCodeFrom' => '','aptCodeTo' => '','arrivalsdepartures2' => 'DEP','arrivalsdepartures_date2' => '1'); |
| 633 | 704 | $data = $Common->getData($url,'post',$post); |
| 634 | 705 | if ($data != '') { |
@@ -660,11 +731,15 @@ discard block |
||
| 660 | 731 | $airline_icao = substr($callsign, 0, 3); |
| 661 | 732 | } |
| 662 | 733 | } |
| 663 | - if ($airline_icao == '') return array(); |
|
| 734 | + if ($airline_icao == '') { |
|
| 735 | + return array(); |
|
| 736 | + } |
|
| 664 | 737 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 665 | 738 | $url= "http://info.flightmapper.net/flight/".$airline_icao.'_'.$numvol; |
| 666 | 739 | //$check_date = new Datetime($date); |
| 667 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 740 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 741 | + return array(); |
|
| 742 | + } |
|
| 668 | 743 | $data = $Common->getData($url); |
| 669 | 744 | if ($data != '') { |
| 670 | 745 | $table = $Common->table2array($data); |
@@ -757,10 +832,16 @@ discard block |
||
| 757 | 832 | if ($data != '') { |
| 758 | 833 | $table = $Common->table2array($data); |
| 759 | 834 | if (isset($table[11][1])) { |
| 760 | - if (is_numeric(substr($table[11][1],0,1))) $departureTime = substr($table[11][1],0,5); |
|
| 761 | - else $departureTime = ''; |
|
| 762 | - if (is_numeric(substr($table[17][1],0,1))) $arrivalTime = substr($table[17][1],0,5); |
|
| 763 | - else $arrivalTime = ''; |
|
| 835 | + if (is_numeric(substr($table[11][1],0,1))) { |
|
| 836 | + $departureTime = substr($table[11][1],0,5); |
|
| 837 | + } else { |
|
| 838 | + $departureTime = ''; |
|
| 839 | + } |
|
| 840 | + if (is_numeric(substr($table[17][1],0,1))) { |
|
| 841 | + $arrivalTime = substr($table[17][1],0,5); |
|
| 842 | + } else { |
|
| 843 | + $arrivalTime = ''; |
|
| 844 | + } |
|
| 764 | 845 | $DepartureAirportIata = substr($table[13][1],0,3); |
| 765 | 846 | $ArrivalAirportIata = substr($table[15][1],0,3); |
| 766 | 847 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_costtotravel'); |
@@ -777,16 +858,22 @@ discard block |
||
| 777 | 858 | */ |
| 778 | 859 | private function getAirCanada($callsign,$date = 'NOW') { |
| 779 | 860 | $Common = new Common(); |
| 780 | - if (class_exists("DomDocument") === FALSE) return array(); |
|
| 861 | + if (class_exists("DomDocument") === FALSE) { |
|
| 862 | + return array(); |
|
| 863 | + } |
|
| 781 | 864 | date_default_timezone_set('UTC'); |
| 782 | 865 | $check_date = new Datetime($date); |
| 783 | 866 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 784 | 867 | $url= "http://services.aircanada.com/portal/rest/getFlightsByFlightNumber?forceTimetable=true&flightNumber=".$numvol."&carrierCode=AC&date=".$check_date->format('m-d-Y')."&app_key=AE919FDCC80311DF9BABC975DFD72085&cache=74249"; |
| 785 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 868 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 869 | + return array(); |
|
| 870 | + } |
|
| 786 | 871 | $data = $Common->getData($url); |
| 787 | 872 | $dom = new DomDocument(); |
| 788 | 873 | $dom->loadXML($data); |
| 789 | - if ($dom->getElementsByTagName('DepartureStationInfo')->length == 0) return array(); |
|
| 874 | + if ($dom->getElementsByTagName('DepartureStationInfo')->length == 0) { |
|
| 875 | + return array(); |
|
| 876 | + } |
|
| 790 | 877 | $departure = $dom->getElementsByTagName('DepartureStationInfo')->item(0); |
| 791 | 878 | if (isset($departure->getElementsByTagName('Airport')->item(0)->firstChild->nodeValue)) { |
| 792 | 879 | $DepartureAirportIata = $departure->getElementsByTagName('Airport')->item(0)->firstChild->nodeValue; |
@@ -795,7 +882,9 @@ discard block |
||
| 795 | 882 | $ArrivalAirportIata = $arrival->getElementsByTagName('Airport')->item(0)->firstChild->nodeValue; |
| 796 | 883 | $arrivalTime = date('H:i',strtotime($arrival->getElementsByTagName('ScheduledTime')->item(0)->firstChild->nodeValue)); |
| 797 | 884 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_aircanada'); |
| 798 | - } else return array(); |
|
| 885 | + } else { |
|
| 886 | + return array(); |
|
| 887 | + } |
|
| 799 | 888 | } |
| 800 | 889 | |
| 801 | 890 | /** |
@@ -809,7 +898,9 @@ discard block |
||
| 809 | 898 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 810 | 899 | $check_date = new Datetime($date); |
| 811 | 900 | $url= "https://cat.sabresonicweb.com/SSWVN/meridia?posid=VNVN&page=flifoFlightInfoDetailsMessage_learn&action=flightInfoDetails&airline=VN&language=fr&depDay=".$check_date->format('j')."&depMonth=".strtoupper($check_date->format('M'))."&=&flight=".$numvol."&"; |
| 812 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 901 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 902 | + return array(); |
|
| 903 | + } |
|
| 813 | 904 | $data = $Common->getData($url); |
| 814 | 905 | if ($data != '') { |
| 815 | 906 | $table = $Common->table2array($data); |
@@ -838,7 +929,9 @@ discard block |
||
| 838 | 929 | $numvol = preg_replace('/^[A-Z]*/','',$callsign); |
| 839 | 930 | $check_date = new Datetime($date); |
| 840 | 931 | $url= "http://www.airberlin.com/en-US/site/aims.php"; |
| 841 | - if (!filter_var($numvol,FILTER_VALIDATE_INT)) return array(); |
|
| 932 | + if (!filter_var($numvol,FILTER_VALIDATE_INT)) { |
|
| 933 | + return array(); |
|
| 934 | + } |
|
| 842 | 935 | $post = array('type' => 'departure','searchFlightNo' => '1','requestsent' => 'true', 'flightno' => $numvol,'date' => $check_date->format('Y-m-d'),'carrier' => $carrier); |
| 843 | 936 | $data = $Common->getData($url,'post',$post); |
| 844 | 937 | //echo $data; |
@@ -848,11 +941,19 @@ discard block |
||
| 848 | 941 | if ($data != '') { |
| 849 | 942 | $table = $Common->table2array($data); |
| 850 | 943 | $flight = $table; |
| 851 | - if (isset($flight[5][4])) $departureTime = $flight[5][4]; |
|
| 852 | - else $departureTime = ''; |
|
| 853 | - if (isset($flight[5][2])) $departureAirport = $flight[5][2]; |
|
| 854 | - else $departureAirport = ''; |
|
| 855 | - } else return array(); |
|
| 944 | + if (isset($flight[5][4])) { |
|
| 945 | + $departureTime = $flight[5][4]; |
|
| 946 | + } else { |
|
| 947 | + $departureTime = ''; |
|
| 948 | + } |
|
| 949 | + if (isset($flight[5][2])) { |
|
| 950 | + $departureAirport = $flight[5][2]; |
|
| 951 | + } else { |
|
| 952 | + $departureAirport = ''; |
|
| 953 | + } |
|
| 954 | + } else { |
|
| 955 | + return array(); |
|
| 956 | + } |
|
| 856 | 957 | $post = array('type' => 'arrival','searchFlightNo' => '1','requestsent' => 'true', 'flightno' => $numvol,'date' => $check_date->format('Y-m-d'),'carrier' => 'AB'); |
| 857 | 958 | $data = $Common->getData($url,'post',$post); |
| 858 | 959 | if ($data != '') { |
@@ -865,10 +966,14 @@ discard block |
||
| 865 | 966 | $arrivalTime = ''; |
| 866 | 967 | $arrivalAirport = ''; |
| 867 | 968 | } |
| 868 | - } else return array(); |
|
| 969 | + } else { |
|
| 970 | + return array(); |
|
| 971 | + } |
|
| 869 | 972 | $url = 'http://www.airberlin.com/en-US/site/json/suggestAirport.php?searchfor=departures&searchflightid=0&departures%5B%5D=&suggestsource%5B0%5D=activeairports&withcountries=0&withoutroutings=0&promotion%5Bid%5D=&promotion%5Btype%5D=&routesource%5B0%5D=airberlin&routesource%5B1%5D=partner'; |
| 870 | 973 | $json = $Common->getData($url); |
| 871 | - if ($json == '') return array(); |
|
| 974 | + if ($json == '') { |
|
| 975 | + return array(); |
|
| 976 | + } |
|
| 872 | 977 | $parsed_json = json_decode($json); |
| 873 | 978 | $airports = $parsed_json->{'suggestList'}; |
| 874 | 979 | if (count($airports) > 0) { |
@@ -883,7 +988,9 @@ discard block |
||
| 883 | 988 | } |
| 884 | 989 | if (isset($DepartureAirportIata)) { |
| 885 | 990 | return array('DepartureAirportIATA' => $DepartureAirportIata,'DepartureTime' => $departureTime,'ArrivalAirportIATA' => $ArrivalAirportIata,'ArrivalTime' => $arrivalTime,'Source' => 'website_airberlin'); |
| 886 | - } else return array(); |
|
| 991 | + } else { |
|
| 992 | + return array(); |
|
| 993 | + } |
|
| 887 | 994 | } |
| 888 | 995 | |
| 889 | 996 | /* |
@@ -895,7 +1002,9 @@ discard block |
||
| 895 | 1002 | public function fetchSchedule($ident,$date = 'NOW') { |
| 896 | 1003 | global $globalSchedulesSources, $globalSchedulesFetch, $globalOffline, $globalFlightAwareUsername; |
| 897 | 1004 | //$Common = new Common(); |
| 898 | - if ($globalSchedulesFetch === FALSE || (isset($globalOffline) && $globalOffline === TRUE)) return array(); |
|
| 1005 | + if ($globalSchedulesFetch === FALSE || (isset($globalOffline) && $globalOffline === TRUE)) { |
|
| 1006 | + return array(); |
|
| 1007 | + } |
|
| 899 | 1008 | $airline_icao = ''; |
| 900 | 1009 | if (!is_numeric(substr($ident, 0, 3))) |
| 901 | 1010 | { |
@@ -1130,18 +1239,27 @@ discard block |
||
| 1130 | 1239 | if (strlen($airline_icao) == 3) { |
| 1131 | 1240 | $Spotter = new Spotter($this->db); |
| 1132 | 1241 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
| 1133 | - if (isset($airline_info[0]['iata'])) $airline_icao = $airline_info[0]['iata']; |
|
| 1242 | + if (isset($airline_info[0]['iata'])) { |
|
| 1243 | + $airline_icao = $airline_info[0]['iata']; |
|
| 1244 | + } |
|
| 1134 | 1245 | } |
| 1135 | 1246 | // Randomly use a generic function to get hours |
| 1136 | 1247 | if (strlen($airline_icao) == 2) { |
| 1137 | - if (!isset($globalSchedulesSources)) $globalSchedulesSources = array('flightmapper','costtotravel','flightaware'); |
|
| 1248 | + if (!isset($globalSchedulesSources)) { |
|
| 1249 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightaware'); |
|
| 1250 | + } |
|
| 1138 | 1251 | if (count($globalSchedulesSources) > 0) { |
| 1139 | 1252 | $rand = mt_rand(0,count($globalSchedulesSources)-1); |
| 1140 | 1253 | $source = $globalSchedulesSources[$rand]; |
| 1141 | - if ($source == 'flightmapper') return $this->getFlightMapper($ident); |
|
| 1142 | - elseif ($source == 'costtotravel') return $this->getCostToTravel($ident); |
|
| 1254 | + if ($source == 'flightmapper') { |
|
| 1255 | + return $this->getFlightMapper($ident); |
|
| 1256 | + } elseif ($source == 'costtotravel') { |
|
| 1257 | + return $this->getCostToTravel($ident); |
|
| 1258 | + } |
|
| 1143 | 1259 | //elseif ($source == 'flightradar24') return $this->getFlightRadar24($ident,$date); |
| 1144 | - elseif ($source == 'flightaware' && $globalFlightAwareUsername != '') return $this->getFlightAware($ident); |
|
| 1260 | + elseif ($source == 'flightaware' && $globalFlightAwareUsername != '') { |
|
| 1261 | + return $this->getFlightAware($ident); |
|
| 1262 | + } |
|
| 1145 | 1263 | } |
| 1146 | 1264 | } |
| 1147 | 1265 | } |
@@ -57,21 +57,30 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | document.cookie = 'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 59 | 59 | <?php |
| 60 | - if (isset($_COOKIE['MapType3D'])) $MapType = $_COOKIE['MapType3D']; |
|
| 61 | - else $MapType = $globalMapProvider; |
|
| 62 | -// unset($_COOKIE['MapType']); |
|
| 60 | + if (isset($_COOKIE['MapType3D'])) { |
|
| 61 | + $MapType = $_COOKIE['MapType3D']; |
|
| 62 | + } else { |
|
| 63 | + $MapType = $globalMapProvider; |
|
| 64 | + } |
|
| 65 | + // unset($_COOKIE['MapType']); |
|
| 63 | 66 | |
| 64 | 67 | if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline' && $MapType != 'ArcGIS-Streetmap' && $MapType != 'ArcGIS-Satellite' && $MapType != 'NatGeo-Street') { |
| 65 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial'; |
|
| 66 | - else $MapType = 'OpenStreetMap'; |
|
| 68 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
| 69 | + $MapType = 'Bing-Aerial'; |
|
| 70 | + } else { |
|
| 71 | + $MapType = 'OpenStreetMap'; |
|
| 72 | + } |
|
| 67 | 73 | } |
| 68 | 74 | if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) { |
| 69 | 75 | $MapType = 'OpenStreetMap'; |
| 70 | 76 | } |
| 71 | 77 | if ($MapType == 'Mapbox') { |
| 72 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
| 73 | - else $MapBoxId = $_COOKIE['MapType3DId']; |
|
| 74 | -?> |
|
| 78 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
| 79 | + $MapBoxId = $globalMapboxId; |
|
| 80 | + } else { |
|
| 81 | + $MapBoxId = $_COOKIE['MapType3DId']; |
|
| 82 | + } |
|
| 83 | + ?> |
|
| 75 | 84 | var imProv = Cesium.MapboxImageryProvider({ |
| 76 | 85 | credit: 'Map data © OpenStreetMap contributors, ' + |
| 77 | 86 | 'CC-BY-SA, ' + |
@@ -153,13 +162,23 @@ discard block |
||
| 153 | 162 | credit : 'Imagery courtesy Natural Earth' |
| 154 | 163 | }); |
| 155 | 164 | <?php |
| 156 | - } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
| 165 | + } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
| 157 | 166 | $customid = $MapType; |
| 158 | 167 | ?> |
| 159 | 168 | var imProv = Cesium.createOpenStreetMapImageryProvider({ |
| 160 | 169 | url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>', |
| 161 | - maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>, |
|
| 162 | - minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 170 | + maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 171 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 172 | +} else { |
|
| 173 | + print '99'; |
|
| 174 | +} |
|
| 175 | +?>, |
|
| 176 | + minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 177 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 178 | +} else { |
|
| 179 | + print '0'; |
|
| 180 | +} |
|
| 181 | +?>, |
|
| 163 | 182 | credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 164 | 183 | }); |
| 165 | 184 | <?php |
@@ -449,7 +468,12 @@ discard block |
||
| 449 | 468 | imageryProvider : imProv, |
| 450 | 469 | timeline : archive, |
| 451 | 470 | animation : false, |
| 452 | - shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) print 'false'; else print 'true'; ?>, |
|
| 471 | + shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) { |
|
| 472 | + print 'false'; |
|
| 473 | +} else { |
|
| 474 | + print 'true'; |
|
| 475 | +} |
|
| 476 | +?>, |
|
| 453 | 477 | infoBox : false, |
| 454 | 478 | navigationHelpButton : false, |
| 455 | 479 | geocoder : false, |
@@ -464,8 +488,11 @@ discard block |
||
| 464 | 488 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
| 465 | 489 | if (isset($_COOKIE['lastcentercoord'])) { |
| 466 | 490 | $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
| 467 | - if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
|
| 468 | - else $zoom = $lastcentercoord[3]; |
|
| 491 | + if (!isset($lastcentercoord[3])) { |
|
| 492 | + $zoom = $lastcentercoord[2]*1000000.0; |
|
| 493 | + } else { |
|
| 494 | + $zoom = $lastcentercoord[3]; |
|
| 495 | + } |
|
| 469 | 496 | $viewcenterlatitude = $lastcentercoord[0]; |
| 470 | 497 | $viewcenterlongitude = $lastcentercoord[1]; |
| 471 | 498 | } else { |
@@ -597,7 +624,12 @@ discard block |
||
| 597 | 624 | ?> |
| 598 | 625 | |
| 599 | 626 | update_locationsLayer(); |
| 600 | -setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 627 | +setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 628 | + print $globalMapRefresh*1000*2; |
|
| 629 | +} else { |
|
| 630 | + print '60000'; |
|
| 631 | +} |
|
| 632 | +?>); |
|
| 601 | 633 | |
| 602 | 634 | var currentposition; |
| 603 | 635 | viewer.camera.moveEnd.addEventListener(function() { |
@@ -755,5 +787,10 @@ discard block |
||
| 755 | 787 | } |
| 756 | 788 | } |
| 757 | 789 | } |
| 758 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 790 | + ,<?php if (isset($globalMapRefresh)) { |
|
| 791 | + print $globalMapRefresh*1000; |
|
| 792 | +} else { |
|
| 793 | + print '30000'; |
|
| 794 | +} |
|
| 795 | +?>); |
|
| 759 | 796 | } |
@@ -57,7 +57,10 @@ discard block |
||
| 57 | 57 | <?php |
| 58 | 58 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
| 59 | 59 | ?> |
| 60 | -<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
|
| 60 | +<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) { |
|
| 61 | + print '?tsk='.$tsk; |
|
| 62 | +} |
|
| 63 | +?>"></script> |
|
| 61 | 64 | <script src="<?php echo $globalURL; ?>/js/meuusjs.1.0.3.min.js"></script> |
| 62 | 65 | <script src="<?php echo $globalURL; ?>/js/map.3d.weather.js"></script> |
| 63 | 66 | <?php |
@@ -137,10 +140,22 @@ discard block |
||
| 137 | 140 | <h1>Weather</h1> |
| 138 | 141 | <ul> |
| 139 | 142 | |
| 140 | - <li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') print 'checked'; ?> /><?php echo _("Weather Winds"); ?></label></div></li> |
|
| 141 | - <li><div class="checkbox"><label><input type="checkbox" name="wave" value="1" onclick="clickWave(this);" <?php if (isset($_COOKIE['weather_wave']) && $_COOKIE['weather_wave'] == 'true') print 'checked'; ?> /><?php echo _("Ocean surface currents"); ?></label></div></li> |
|
| 142 | - <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') print 'checked'; ?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 143 | - <!-- <li><div class="checkbox"><label><input type="checkbox" name="backwave" value="1" onclick="clickBackWave(this);" <?php if (isset($_COOKIE['weather_backwave']) && $_COOKIE['weather_backwave'] == 'true') print 'checked'; ?> /><?php echo _("Weather Waves height background"); ?></label></div></li> --> |
|
| 143 | + <li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') { |
|
| 144 | + print 'checked'; |
|
| 145 | +} |
|
| 146 | +?> /><?php echo _("Weather Winds"); ?></label></div></li> |
|
| 147 | + <li><div class="checkbox"><label><input type="checkbox" name="wave" value="1" onclick="clickWave(this);" <?php if (isset($_COOKIE['weather_wave']) && $_COOKIE['weather_wave'] == 'true') { |
|
| 148 | + print 'checked'; |
|
| 149 | +} |
|
| 150 | +?> /><?php echo _("Ocean surface currents"); ?></label></div></li> |
|
| 151 | + <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') { |
|
| 152 | + print 'checked'; |
|
| 153 | +} |
|
| 154 | +?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 155 | + <!-- <li><div class="checkbox"><label><input type="checkbox" name="backwave" value="1" onclick="clickBackWave(this);" <?php if (isset($_COOKIE['weather_backwave']) && $_COOKIE['weather_backwave'] == 'true') { |
|
| 156 | + print 'checked'; |
|
| 157 | +} |
|
| 158 | +?> /><?php echo _("Weather Waves height background"); ?></label></div></li> --> |
|
| 144 | 159 | |
| 145 | 160 | <?php |
| 146 | 161 | if (isset($globalOpenWeatherMapKey) && $globalOpenWeatherMapKey != '') { |
@@ -162,12 +177,18 @@ discard block |
||
| 162 | 177 | <?php |
| 163 | 178 | if (isset($globalMETAR) && isset($globalMETARcycle) && $globalMETAR && $globalMETARcycle) { |
| 164 | 179 | ?> |
| 165 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweather" value="1" onclick="clickDisplayWeather(this)" <?php if ((isset($_COOKIE['show_Weather']) && $_COOKIE['show_Weather'] == 'true') || (!isset($_COOKIE['show_Weather']) && (isset($globalMapWeather) && $globalMapWeather === TRUE))) print 'checked'; ?> ><?php echo _("Display 3D weather"); ?></label></div></li> |
|
| 180 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweather" value="1" onclick="clickDisplayWeather(this)" <?php if ((isset($_COOKIE['show_Weather']) && $_COOKIE['show_Weather'] == 'true') || (!isset($_COOKIE['show_Weather']) && (isset($globalMapWeather) && $globalMapWeather === TRUE))) { |
|
| 181 | + print 'checked'; |
|
| 182 | +} |
|
| 183 | +?> ><?php echo _("Display 3D weather"); ?></label></div></li> |
|
| 166 | 184 | <!-- <li><div class="checkbox"><label><input type="checkbox" name="displayrain" value="1" onclick="clickDisplayRain(this)" ><?php echo _("Display rain on 3D map"); ?></label></div></li>--> |
| 167 | 185 | <?php |
| 168 | 186 | } |
| 169 | 187 | ?> |
| 170 | - <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') print 'checked'; ?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 188 | + <li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') { |
|
| 189 | + print 'checked'; |
|
| 190 | +} |
|
| 191 | +?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li> |
|
| 171 | 192 | </ul> |
| 172 | 193 | <?php |
| 173 | 194 | } |
@@ -183,13 +204,22 @@ discard block |
||
| 183 | 204 | <?php |
| 184 | 205 | if (!isset($globalAircraft) || $globalAircraft) { |
| 185 | 206 | ?> |
| 186 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
| 187 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
| 207 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
| 208 | + print 'checked'; |
|
| 209 | +} |
|
| 210 | +?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
| 211 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
| 212 | + print 'checked'; |
|
| 213 | +} |
|
| 214 | +?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
| 188 | 215 | <?php |
| 189 | 216 | } |
| 190 | 217 | if (isset($globalMarine) && $globalMarine) { |
| 191 | 218 | ?> |
| 192 | - <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') print 'checked'; ?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 219 | + <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') { |
|
| 220 | + print 'checked'; |
|
| 221 | +} |
|
| 222 | +?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 193 | 223 | <?php |
| 194 | 224 | } |
| 195 | 225 | ?> |
@@ -204,13 +234,22 @@ discard block |
||
| 204 | 234 | <?php |
| 205 | 235 | if (!isset($globalAircraft) || $globalAircraft) { |
| 206 | 236 | ?> |
| 207 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
| 208 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
| 237 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
| 238 | + print 'checked'; |
|
| 239 | +} |
|
| 240 | +?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
| 241 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
| 242 | + print 'checked'; |
|
| 243 | +} |
|
| 244 | +?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
| 209 | 245 | <?php |
| 210 | 246 | } |
| 211 | 247 | if (isset($globalMarine) && $globalMarine) { |
| 212 | 248 | ?> |
| 213 | - <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') print 'checked'; ?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 249 | + <li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') { |
|
| 250 | + print 'checked'; |
|
| 251 | +} |
|
| 252 | +?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li> |
|
| 214 | 253 | <?php |
| 215 | 254 | } |
| 216 | 255 | ?> |
@@ -225,14 +264,32 @@ discard block |
||
| 225 | 264 | <h1>NOTAM</h1> |
| 226 | 265 | <form> |
| 227 | 266 | <ul> |
| 228 | - <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') print 'checked'; ?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
| 267 | + <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') { |
|
| 268 | + print 'checked'; |
|
| 269 | +} |
|
| 270 | +?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
| 229 | 271 | <li><?php echo _("NOTAM scope:"); ?> |
| 230 | 272 | <select class="selectpicker" onchange="notamscope(this);"> |
| 231 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
| 232 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
| 233 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
| 234 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
| 235 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
| 273 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
| 274 | + print ' selected'; |
|
| 275 | +} |
|
| 276 | +?>>All</option> |
|
| 277 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
| 278 | + print ' selected'; |
|
| 279 | +} |
|
| 280 | +?>>Airport/Enroute warning</option> |
|
| 281 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
| 282 | + print ' selected'; |
|
| 283 | +} |
|
| 284 | +?>>Airport warning</option> |
|
| 285 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
| 286 | + print ' selected'; |
|
| 287 | +} |
|
| 288 | +?>>Navigation warning</option> |
|
| 289 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
| 290 | + print ' selected'; |
|
| 291 | +} |
|
| 292 | +?>>Enroute warning</option> |
|
| 236 | 293 | </select |
| 237 | 294 | </li> |
| 238 | 295 | </ul> |
@@ -260,7 +317,10 @@ discard block |
||
| 260 | 317 | <div class="form-group"> |
| 261 | 318 | <label><?php echo _("From:"); ?></label> |
| 262 | 319 | <div class='input-group date' id='datetimepicker1'> |
| 263 | - <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
| 320 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
| 321 | + print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; |
|
| 322 | +} |
|
| 323 | +?>" required /> |
|
| 264 | 324 | <span class="input-group-addon"> |
| 265 | 325 | <span class="glyphicon glyphicon-calendar"></span> |
| 266 | 326 | </span> |
@@ -269,7 +329,10 @@ discard block |
||
| 269 | 329 | <div class="form-group"> |
| 270 | 330 | <label><?php echo _("To:"); ?></label> |
| 271 | 331 | <div class='input-group date' id='datetimepicker2'> |
| 272 | - <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" /> |
|
| 332 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') { |
|
| 333 | + print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; |
|
| 334 | +} |
|
| 335 | +?>" /> |
|
| 273 | 336 | <span class="input-group-addon"> |
| 274 | 337 | <span class="glyphicon glyphicon-calendar"></span> |
| 275 | 338 | </span> |
@@ -301,8 +364,20 @@ discard block |
||
| 301 | 364 | </script> |
| 302 | 365 | <li><?php echo _("Playback speed:"); ?> |
| 303 | 366 | <div class="range"> |
| 304 | - <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
| 305 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
| 367 | + <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
| 368 | + print $_POST['archivespeed']; |
|
| 369 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
| 370 | + print $_COOKIE['archive_speed']; |
|
| 371 | +} else { |
|
| 372 | + print '1'; |
|
| 373 | +} |
|
| 374 | +?>"> |
|
| 375 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
| 376 | + print $_COOKIE['archive_speed']; |
|
| 377 | +} else { |
|
| 378 | + print '1'; |
|
| 379 | +} |
|
| 380 | +?></output> |
|
| 306 | 381 | </div> |
| 307 | 382 | </li> |
| 308 | 383 | <?php |
@@ -331,14 +406,20 @@ discard block |
||
| 331 | 406 | <li><?php echo _("Type of Map:"); ?> |
| 332 | 407 | <?php |
| 333 | 408 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
| 334 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
| 335 | - else $MapType = $_COOKIE['MapType']; |
|
| 409 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
| 410 | + $MapType = $globalMapProvider; |
|
| 411 | + } else { |
|
| 412 | + $MapType = $_COOKIE['MapType']; |
|
| 413 | + } |
|
| 336 | 414 | ?> |
| 337 | 415 | <select class="selectpicker" onchange="mapType(this);"> |
| 338 | 416 | <?php |
| 339 | 417 | } else { |
| 340 | - if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') $MapType = $globalMapProvider; |
|
| 341 | - else $MapType = $_COOKIE['MapType3D']; |
|
| 418 | + if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') { |
|
| 419 | + $MapType = $globalMapProvider; |
|
| 420 | + } else { |
|
| 421 | + $MapType = $_COOKIE['MapType3D']; |
|
| 422 | + } |
|
| 342 | 423 | ?> |
| 343 | 424 | <select class="selectpicker" onchange="mapType3D(this);"> |
| 344 | 425 | <?php |
@@ -347,24 +428,48 @@ discard block |
||
| 347 | 428 | <?php |
| 348 | 429 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
| 349 | 430 | ?> |
| 350 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
| 431 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 432 | + print ' selected'; |
|
| 433 | +} |
|
| 434 | +?>>Natural Earth (local)</option> |
|
| 351 | 435 | <?php |
| 352 | 436 | } else { |
| 353 | 437 | if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
| 354 | 438 | ?> |
| 355 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
| 439 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 440 | + print ' selected'; |
|
| 441 | +} |
|
| 442 | +?>>Natural Earth (local)</option> |
|
| 356 | 443 | <?php |
| 357 | 444 | } |
| 358 | 445 | ?> |
| 359 | - <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
|
| 360 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
|
| 361 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') print ' selected'; ?>>ArcGIS Ocean</option> |
|
| 446 | + <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') { |
|
| 447 | + print ' selected'; |
|
| 448 | +} |
|
| 449 | +?>>ArcGIS Streetmap</option> |
|
| 450 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') { |
|
| 451 | + print ' selected'; |
|
| 452 | +} |
|
| 453 | +?>>ArcGIS Satellite</option> |
|
| 454 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') { |
|
| 455 | + print ' selected'; |
|
| 456 | +} |
|
| 457 | +?>>ArcGIS Ocean</option> |
|
| 362 | 458 | <?php |
| 363 | 459 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
| 364 | 460 | ?> |
| 365 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
| 366 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
| 367 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
| 461 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
| 462 | + print ' selected'; |
|
| 463 | +} |
|
| 464 | +?>>Bing-Aerial</option> |
|
| 465 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
| 466 | + print ' selected'; |
|
| 467 | +} |
|
| 468 | +?>>Bing-Hybrid</option> |
|
| 469 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
| 470 | + print ' selected'; |
|
| 471 | +} |
|
| 472 | +?>>Bing-Road</option> |
|
| 368 | 473 | <?php |
| 369 | 474 | } |
| 370 | 475 | ?> |
@@ -374,59 +479,143 @@ discard block |
||
| 374 | 479 | <?php |
| 375 | 480 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
| 376 | 481 | ?> |
| 377 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
| 378 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
| 379 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
| 482 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
| 483 | + print ' selected'; |
|
| 484 | +} |
|
| 485 | +?>>Here-Aerial</option> |
|
| 486 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
| 487 | + print ' selected'; |
|
| 488 | +} |
|
| 489 | +?>>Here-Hybrid</option> |
|
| 490 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
| 491 | + print ' selected'; |
|
| 492 | +} |
|
| 493 | +?>>Here-Road</option> |
|
| 380 | 494 | <?php |
| 381 | 495 | } |
| 382 | 496 | ?> |
| 383 | 497 | <?php |
| 384 | 498 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
| 385 | 499 | ?> |
| 386 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
| 387 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
| 388 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
| 389 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
| 500 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
| 501 | + print ' selected'; |
|
| 502 | +} |
|
| 503 | +?>>Google Roadmap</option> |
|
| 504 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
| 505 | + print ' selected'; |
|
| 506 | +} |
|
| 507 | +?>>Google Satellite</option> |
|
| 508 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
| 509 | + print ' selected'; |
|
| 510 | +} |
|
| 511 | +?>>Google Hybrid</option> |
|
| 512 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
| 513 | + print ' selected'; |
|
| 514 | +} |
|
| 515 | +?>>Google Terrain</option> |
|
| 390 | 516 | <?php |
| 391 | 517 | } |
| 392 | 518 | ?> |
| 393 | 519 | <?php |
| 394 | 520 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
| 395 | 521 | ?> |
| 396 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
| 397 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
| 398 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
| 522 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
| 523 | + print ' selected'; |
|
| 524 | +} |
|
| 525 | +?>>MapQuest-OSM</option> |
|
| 526 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
| 527 | + print ' selected'; |
|
| 528 | +} |
|
| 529 | +?>>MapQuest-Aerial</option> |
|
| 530 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
| 531 | + print ' selected'; |
|
| 532 | +} |
|
| 533 | +?>>MapQuest-Hybrid</option> |
|
| 399 | 534 | <?php |
| 400 | 535 | } |
| 401 | 536 | ?> |
| 402 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
| 403 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
|
| 537 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
| 538 | + print ' selected'; |
|
| 539 | +} |
|
| 540 | +?>>Yandex</option> |
|
| 541 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
| 542 | + print ' selected'; |
|
| 543 | +} |
|
| 544 | +?>>Natural Earth</option> |
|
| 404 | 545 | <?php |
| 405 | 546 | } |
| 406 | 547 | ?> |
| 407 | - <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
|
| 548 | + <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') { |
|
| 549 | + print ' selected'; |
|
| 550 | +} |
|
| 551 | +?>>National Geographic Street</option> |
|
| 408 | 552 | <?php |
| 409 | 553 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
| 410 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
| 411 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 554 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
| 555 | + $MapBoxId = 'default'; |
|
| 556 | + } else { |
|
| 557 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 558 | + } |
|
| 412 | 559 | ?> |
| 413 | - <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
|
| 414 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
| 415 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
| 416 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
| 417 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
| 418 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
| 419 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
| 420 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
| 421 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
| 422 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
| 423 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
| 424 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
| 425 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
| 560 | + <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') { |
|
| 561 | + print ' selected'; |
|
| 562 | +} |
|
| 563 | +?>>Mapbox GL</option> |
|
| 564 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
| 565 | + print ' selected'; |
|
| 566 | +} |
|
| 567 | +?>>Mapbox default</option> |
|
| 568 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
| 569 | + print ' selected'; |
|
| 570 | +} |
|
| 571 | +?>>Mapbox streets</option> |
|
| 572 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
| 573 | + print ' selected'; |
|
| 574 | +} |
|
| 575 | +?>>Mapbox light</option> |
|
| 576 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
| 577 | + print ' selected'; |
|
| 578 | +} |
|
| 579 | +?>>Mapbox dark</option> |
|
| 580 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
| 581 | + print ' selected'; |
|
| 582 | +} |
|
| 583 | +?>>Mapbox satellite</option> |
|
| 584 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
| 585 | + print ' selected'; |
|
| 586 | +} |
|
| 587 | +?>>Mapbox streets-satellite</option> |
|
| 588 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
| 589 | + print ' selected'; |
|
| 590 | +} |
|
| 591 | +?>>Mapbox streets-basic</option> |
|
| 592 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
| 593 | + print ' selected'; |
|
| 594 | +} |
|
| 595 | +?>>Mapbox comic</option> |
|
| 596 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
| 597 | + print ' selected'; |
|
| 598 | +} |
|
| 599 | +?>>Mapbox outdoors</option> |
|
| 600 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
| 601 | + print ' selected'; |
|
| 602 | +} |
|
| 603 | +?>>Mapbox pencil</option> |
|
| 604 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
| 605 | + print ' selected'; |
|
| 606 | +} |
|
| 607 | +?>>Mapbox pirates</option> |
|
| 608 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
| 609 | + print ' selected'; |
|
| 610 | +} |
|
| 611 | +?>>Mapbox emerald</option> |
|
| 426 | 612 | <?php |
| 427 | 613 | } |
| 428 | 614 | ?> |
| 429 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
| 615 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
| 616 | + print ' selected'; |
|
| 617 | +} |
|
| 618 | +?>>OpenStreetMap</option> |
|
| 430 | 619 | <?php |
| 431 | 620 | } |
| 432 | 621 | ?> |
@@ -437,10 +626,22 @@ discard block |
||
| 437 | 626 | ?> |
| 438 | 627 | <li><?php echo _("Type of Terrain:"); ?> |
| 439 | 628 | <select class="selectpicker" onchange="terrainType(this);"> |
| 440 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
| 441 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
| 442 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
| 443 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
| 629 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
| 630 | + print ' selected'; |
|
| 631 | +} |
|
| 632 | +?>>stk terrain</option> |
|
| 633 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
| 634 | + print ' selected'; |
|
| 635 | +} |
|
| 636 | +?>>ellipsoid</option> |
|
| 637 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
| 638 | + print ' selected'; |
|
| 639 | +} |
|
| 640 | +?>>vr terrain</option> |
|
| 641 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
| 642 | + print ' selected'; |
|
| 643 | +} |
|
| 644 | +?>>ArticDEM</option> |
|
| 444 | 645 | </select> |
| 445 | 646 | </li> |
| 446 | 647 | <?php |
@@ -450,59 +651,116 @@ discard block |
||
| 450 | 651 | <?php |
| 451 | 652 | if (isset($globalMap3D) && $globalMap3D) { |
| 452 | 653 | ?> |
| 453 | - <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') print 'checked'; ?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li> |
|
| 654 | + <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') { |
|
| 655 | + print 'checked'; |
|
| 656 | +} |
|
| 657 | +?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li> |
|
| 454 | 658 | <?php |
| 455 | 659 | } |
| 456 | 660 | ?> |
| 457 | 661 | <?php |
| 458 | 662 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
| 459 | 663 | ?> |
| 460 | - <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
| 664 | + <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') { |
|
| 665 | + print 'checked'; |
|
| 666 | +} |
|
| 667 | +?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
| 461 | 668 | |
| 462 | 669 | <?php |
| 463 | 670 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 464 | 671 | ?> |
| 465 | - <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
| 466 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 467 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 468 | - <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
| 469 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 672 | + <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
| 673 | + print 'checked'; |
|
| 674 | +} |
|
| 675 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
| 676 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
| 677 | + print 'checked'; |
|
| 678 | +} |
|
| 679 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
| 680 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) { |
|
| 681 | + print 'checked'; |
|
| 682 | +} |
|
| 683 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
| 684 | + <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) { |
|
| 685 | + print 'checked'; |
|
| 686 | +} |
|
| 687 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
| 688 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
| 689 | + print 'checked'; |
|
| 690 | +} |
|
| 691 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
| 470 | 692 | <?php |
| 471 | 693 | } elseif (!isset($globalTracker) || $globalTracker === TRUE) { |
| 472 | 694 | ?> |
| 473 | - <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) print 'checked'; ?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
| 695 | + <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) { |
|
| 696 | + print 'checked'; |
|
| 697 | +} |
|
| 698 | +?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
| 474 | 699 | <?php |
| 475 | 700 | } |
| 476 | 701 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
| 477 | 702 | ?> |
| 478 | - <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
| 703 | + <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
| 704 | + print 'checked'; |
|
| 705 | +} |
|
| 706 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
| 479 | 707 | <?php |
| 480 | 708 | } |
| 481 | 709 | } |
| 482 | 710 | ?> |
| 483 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 484 | - <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
| 485 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
| 486 | - <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
| 711 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) { |
|
| 712 | + print 'checked'; |
|
| 713 | +} |
|
| 714 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
| 715 | + <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
|
| 716 | + print 'checked'; |
|
| 717 | +} |
|
| 718 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
| 719 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
| 720 | + print 'checked'; |
|
| 721 | +} |
|
| 722 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
| 723 | + <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
| 724 | + print 'checked'; |
|
| 725 | +} |
|
| 726 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
| 487 | 727 | <?php |
| 488 | 728 | if (isset($globalFires) && $globalFires) { |
| 489 | 729 | ?> |
| 490 | - <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
| 730 | + <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
| 731 | + print 'checked'; |
|
| 732 | +} |
|
| 733 | +?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
| 491 | 734 | <?php |
| 492 | 735 | } |
| 493 | 736 | if (isset($globalMap3D) && $globalMap3D) { |
| 494 | 737 | ?> |
| 495 | - <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') || (!isset($_COOKIE['singlemodel']) && isset($globalMap3DSelected) && $globalMap3DSelected)) print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
| 738 | + <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') || (!isset($_COOKIE['singlemodel']) && isset($globalMap3DSelected) && $globalMap3DSelected)) { |
|
| 739 | + print 'checked'; |
|
| 740 | +} |
|
| 741 | +?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
| 496 | 742 | <?php |
| 497 | 743 | } |
| 498 | 744 | ?> |
| 499 | 745 | <?php |
| 500 | 746 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
| 501 | 747 | ?> |
| 502 | - <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 503 | - <li><div class="checkbox"><label><input type="checkbox" name="shadows" value="1" onclick="clickShadows(this)" <?php if ((!isset($_COOKIE['map3dnoshadows']) && (!isset($globalMap3DShadows) || $globalMap3DShadows)) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'false')) print 'checked'; ?> ><?php echo _("Use shadows"); ?></label></div></li> |
|
| 504 | - <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
| 505 | - <li><div class="checkbox"><label><input type="checkbox" name="updaterealtime" value="1" onclick="clickUpdateRealtime(this)" <?php if ((isset($_COOKIE['updaterealtime']) && $_COOKIE['updaterealtime'] == 'true') || !isset($_COOKIE['updaterealtime'])) print 'checked'; ?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li> |
|
| 748 | + <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) { |
|
| 749 | + print 'checked'; |
|
| 750 | +} |
|
| 751 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
| 752 | + <li><div class="checkbox"><label><input type="checkbox" name="shadows" value="1" onclick="clickShadows(this)" <?php if ((!isset($_COOKIE['map3dnoshadows']) && (!isset($globalMap3DShadows) || $globalMap3DShadows)) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'false')) { |
|
| 753 | + print 'checked'; |
|
| 754 | +} |
|
| 755 | +?> ><?php echo _("Use shadows"); ?></label></div></li> |
|
| 756 | + <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) { |
|
| 757 | + print 'checked'; |
|
| 758 | +} |
|
| 759 | +?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
| 760 | + <li><div class="checkbox"><label><input type="checkbox" name="updaterealtime" value="1" onclick="clickUpdateRealtime(this)" <?php if ((isset($_COOKIE['updaterealtime']) && $_COOKIE['updaterealtime'] == 'true') || !isset($_COOKIE['updaterealtime'])) { |
|
| 761 | + print 'checked'; |
|
| 762 | +} |
|
| 763 | +?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li> |
|
| 506 | 764 | <?php |
| 507 | 765 | } |
| 508 | 766 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -515,17 +773,25 @@ discard block |
||
| 515 | 773 | if (function_exists('array_column')) { |
| 516 | 774 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
| 517 | 775 | ?> |
| 518 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 776 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 777 | + print 'checked'; |
|
| 778 | +} |
|
| 779 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 519 | 780 | <?php |
| 520 | 781 | } |
| 521 | 782 | } elseif (isset($globalSources)) { |
| 522 | 783 | $dispolar = false; |
| 523 | 784 | foreach ($globalSources as $testsource) { |
| 524 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
| 785 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
| 786 | + $dispolar = true; |
|
| 787 | + } |
|
| 525 | 788 | } |
| 526 | 789 | if ($dispolar) { |
| 527 | 790 | ?> |
| 528 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 791 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
| 792 | + print 'checked'; |
|
| 793 | +} |
|
| 794 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
| 529 | 795 | <?php |
| 530 | 796 | } |
| 531 | 797 | } |
@@ -538,11 +804,21 @@ discard block |
||
| 538 | 804 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 539 | 805 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 540 | 806 | ?> |
| 541 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 807 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
| 808 | + print 'checked'; |
|
| 809 | +} |
|
| 810 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
| 542 | 811 | <?php |
| 543 | 812 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
| 544 | 813 | ?> |
| 545 | - <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"></li> |
|
| 814 | + <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 815 | + print $_COOKIE['IconColor']; |
|
| 816 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 817 | + print $globalAircraftIconColor; |
|
| 818 | +} else { |
|
| 819 | + print '1a3151'; |
|
| 820 | +} |
|
| 821 | +?>"></li> |
|
| 546 | 822 | <?php |
| 547 | 823 | } |
| 548 | 824 | } |
@@ -553,7 +829,14 @@ discard block |
||
| 553 | 829 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 554 | 830 | ?> |
| 555 | 831 | <li><?php echo _("Marine icon color:"); ?> |
| 556 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
|
| 832 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 833 | + print $_COOKIE['MarineIconColor']; |
|
| 834 | +} elseif (isset($globalMarineIconColor)) { |
|
| 835 | + print $globalMarineIconColor; |
|
| 836 | +} else { |
|
| 837 | + print '1a3151'; |
|
| 838 | +} |
|
| 839 | +?>"> |
|
| 557 | 840 | </li> |
| 558 | 841 | <?php |
| 559 | 842 | } |
@@ -564,7 +847,14 @@ discard block |
||
| 564 | 847 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 565 | 848 | ?> |
| 566 | 849 | <li><?php echo _("Tracker icon color:"); ?> |
| 567 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>"> |
|
| 850 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 851 | + print $_COOKIE['TrackerIconColor']; |
|
| 852 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 853 | + print $globalTrackerIconColor; |
|
| 854 | +} else { |
|
| 855 | + print '1a3151'; |
|
| 856 | +} |
|
| 857 | +?>"> |
|
| 568 | 858 | </li> |
| 569 | 859 | <?php |
| 570 | 860 | } |
@@ -575,8 +865,22 @@ discard block |
||
| 575 | 865 | ?> |
| 576 | 866 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
| 577 | 867 | <div class="range"> |
| 578 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
| 579 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
| 868 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 869 | + print $_COOKIE['AirportZoom']; |
|
| 870 | +} elseif (isset($globalAirportZoom)) { |
|
| 871 | + print $globalAirportZoom; |
|
| 872 | +} else { |
|
| 873 | + print '7'; |
|
| 874 | +} |
|
| 875 | +?>"> |
|
| 876 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
| 877 | + print $_COOKIE['AirportZoom']; |
|
| 878 | +} elseif (isset($globalAirportZoom)) { |
|
| 879 | + print $globalAirportZoom; |
|
| 880 | +} else { |
|
| 881 | + print '7'; |
|
| 882 | +} |
|
| 883 | +?></output> |
|
| 580 | 884 | </div> |
| 581 | 885 | </li> |
| 582 | 886 | <?php |
@@ -587,17 +891,40 @@ discard block |
||
| 587 | 891 | ?> |
| 588 | 892 | <li><?php echo _("Set scaling factor for rendering resolution:"); ?> |
| 589 | 893 | <div class="range"> |
| 590 | - <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?>"> |
|
| 591 | - <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?></output> |
|
| 894 | + <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) { |
|
| 895 | + print $_COOKIE['resolutionScale']; |
|
| 896 | +} else { |
|
| 897 | + print '1'; |
|
| 898 | +} |
|
| 899 | +?>"> |
|
| 900 | + <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) { |
|
| 901 | + print $_COOKIE['resolutionScale']; |
|
| 902 | +} else { |
|
| 903 | + print '1'; |
|
| 904 | +} |
|
| 905 | +?></output> |
|
| 592 | 906 | </div> |
| 593 | 907 | </li> |
| 594 | 908 | <?php |
| 595 | 909 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
| 596 | 910 | ?> |
| 597 | - <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') print 'checked'; ?> > <?php echo _("Use airlines liveries"); ?></li> |
|
| 598 | - <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> > <?php echo _("Force Aircraft color"); ?> |
|
| 911 | + <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') { |
|
| 912 | + print 'checked'; |
|
| 913 | +} |
|
| 914 | +?> > <?php echo _("Use airlines liveries"); ?></li> |
|
| 915 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
| 916 | + print 'checked'; |
|
| 917 | +} |
|
| 918 | +?> > <?php echo _("Force Aircraft color"); ?> |
|
| 599 | 919 | <!--<li><?php echo _("Aircraft icon color:"); ?>--> |
| 600 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print 'ff0000'; ?>"> |
|
| 920 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
| 921 | + print $_COOKIE['IconColor']; |
|
| 922 | +} elseif (isset($globalAircraftIconColor)) { |
|
| 923 | + print $globalAircraftIconColor; |
|
| 924 | +} else { |
|
| 925 | + print 'ff0000'; |
|
| 926 | +} |
|
| 927 | +?>"> |
|
| 601 | 928 | </li> |
| 602 | 929 | <?php |
| 603 | 930 | } |
@@ -605,9 +932,19 @@ discard block |
||
| 605 | 932 | <?php |
| 606 | 933 | if (isset($globalMarine) && $globalMarine === TRUE) { |
| 607 | 934 | ?> |
| 608 | - <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?> |
|
| 935 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
| 936 | + print 'checked'; |
|
| 937 | +} |
|
| 938 | +?> ><?php echo _("Force Marine color"); ?> |
|
| 609 | 939 | <!--<li><?php echo _("Marine icon color:"); ?>--> |
| 610 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>"> |
|
| 940 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
| 941 | + print $_COOKIE['MarineIconColor']; |
|
| 942 | +} elseif (isset($globalMarineIconColor)) { |
|
| 943 | + print $globalMarineIconColor; |
|
| 944 | +} else { |
|
| 945 | + print 'ff0000'; |
|
| 946 | +} |
|
| 947 | +?>"> |
|
| 611 | 948 | </li> |
| 612 | 949 | <?php |
| 613 | 950 | } |
@@ -615,9 +952,19 @@ discard block |
||
| 615 | 952 | <?php |
| 616 | 953 | if (isset($globalTracker) && $globalTracker === TRUE) { |
| 617 | 954 | ?> |
| 618 | - <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?> |
|
| 955 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
| 956 | + print 'checked'; |
|
| 957 | +} |
|
| 958 | +?> ><?php echo _("Force Tracker color"); ?> |
|
| 619 | 959 | <!--<li><?php echo _("Tracker icon color:"); ?>--> |
| 620 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print 'ff0000'; ?>"> |
|
| 960 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
| 961 | + print $_COOKIE['TrackerIconColor']; |
|
| 962 | +} elseif (isset($globalTrackerIconColor)) { |
|
| 963 | + print $globalTrackerIconColor; |
|
| 964 | +} else { |
|
| 965 | + print 'ff0000'; |
|
| 966 | +} |
|
| 967 | +?>"> |
|
| 621 | 968 | </li> |
| 622 | 969 | <?php |
| 623 | 970 | } |
@@ -625,29 +972,62 @@ discard block |
||
| 625 | 972 | ?> |
| 626 | 973 | <li><?php echo _("Distance unit:"); ?> |
| 627 | 974 | <select class="selectpicker" onchange="unitdistance(this);"> |
| 628 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
| 629 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
| 630 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
| 975 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 976 | + echo ' selected'; |
|
| 977 | +} |
|
| 978 | +?>>km</option> |
|
| 979 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 980 | + echo ' selected'; |
|
| 981 | +} |
|
| 982 | +?>>nm</option> |
|
| 983 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 984 | + echo ' selected'; |
|
| 985 | +} |
|
| 986 | +?>>mi</option> |
|
| 631 | 987 | </select> |
| 632 | 988 | </li> |
| 633 | 989 | <li><?php echo _("Altitude unit:"); ?> |
| 634 | 990 | <select class="selectpicker" onchange="unitaltitude(this);"> |
| 635 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
| 636 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
| 991 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
| 992 | + echo ' selected'; |
|
| 993 | +} |
|
| 994 | +?>>m</option> |
|
| 995 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
| 996 | + echo ' selected'; |
|
| 997 | +} |
|
| 998 | +?>>feet</option> |
|
| 637 | 999 | </select> |
| 638 | 1000 | </li> |
| 639 | 1001 | <li><?php echo _("Speed unit:"); ?> |
| 640 | 1002 | <select class="selectpicker" onchange="unitspeed(this);"> |
| 641 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
| 642 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
| 643 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
| 1003 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
| 1004 | + echo ' selected'; |
|
| 1005 | +} |
|
| 1006 | +?>>km/h</option> |
|
| 1007 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
| 1008 | + echo ' selected'; |
|
| 1009 | +} |
|
| 1010 | +?>>mph</option> |
|
| 1011 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
| 1012 | + echo ' selected'; |
|
| 1013 | +} |
|
| 1014 | +?>>knots</option> |
|
| 644 | 1015 | </select> |
| 645 | 1016 | </li> |
| 646 | 1017 | <li><?php echo _("Coordinate unit:"); ?> |
| 647 | 1018 | <select class="selectpicker" onchange="unitcoordinate(this);"> |
| 648 | - <option value="dd"<?php if ((!isset($_COOKIE['unitcoordinate']) && (!isset($globalUnitCoordinate) || (isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dd'))) || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dd')) echo ' selected'; ?>>DD</option> |
|
| 649 | - <option value="dms"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) echo ' selected'; ?>>DMS</option> |
|
| 650 | - <option value="dm"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) echo ' selected'; ?>>DM</option> |
|
| 1019 | + <option value="dd"<?php if ((!isset($_COOKIE['unitcoordinate']) && (!isset($globalUnitCoordinate) || (isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dd'))) || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dd')) { |
|
| 1020 | + echo ' selected'; |
|
| 1021 | +} |
|
| 1022 | +?>>DD</option> |
|
| 1023 | + <option value="dms"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) { |
|
| 1024 | + echo ' selected'; |
|
| 1025 | +} |
|
| 1026 | +?>>DMS</option> |
|
| 1027 | + <option value="dm"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) { |
|
| 1028 | + echo ' selected'; |
|
| 1029 | +} |
|
| 1030 | +?>>DM</option> |
|
| 651 | 1031 | </select> |
| 652 | 1032 | </li> |
| 653 | 1033 | |
@@ -665,9 +1045,18 @@ discard block |
||
| 665 | 1045 | <?php |
| 666 | 1046 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
| 667 | 1047 | ?> |
| 668 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 669 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 670 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 1048 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) { |
|
| 1049 | + print 'checked'; |
|
| 1050 | +} |
|
| 1051 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
| 1052 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) { |
|
| 1053 | + print 'checked'; |
|
| 1054 | +} |
|
| 1055 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
| 1056 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) { |
|
| 1057 | + print 'checked'; |
|
| 1058 | +} |
|
| 1059 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
| 671 | 1060 | <?php |
| 672 | 1061 | } |
| 673 | 1062 | ?> |
@@ -675,12 +1064,21 @@ discard block |
||
| 675 | 1064 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
| 676 | 1065 | ?> |
| 677 | 1066 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
| 678 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 1067 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) { |
|
| 1068 | + print 'checked'; |
|
| 1069 | +} |
|
| 1070 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
| 679 | 1071 | <?php } ?> |
| 680 | 1072 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
| 681 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') || !isset($_COOKIE['filter_ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 1073 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') || !isset($_COOKIE['filter_ShowAPRS'])) { |
|
| 1074 | + print 'checked'; |
|
| 1075 | +} |
|
| 1076 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
| 682 | 1077 | <?php } ?> |
| 683 | - <li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') print 'checked'; ?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li> |
|
| 1078 | + <li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') { |
|
| 1079 | + print 'checked'; |
|
| 1080 | +} |
|
| 1081 | +?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li> |
|
| 684 | 1082 | <?php |
| 685 | 1083 | } |
| 686 | 1084 | ?> |
@@ -696,7 +1094,9 @@ discard block |
||
| 696 | 1094 | } |
| 697 | 1095 | foreach($allairlinenames as $airline) { |
| 698 | 1096 | $airline_name = $airline['airline_name']; |
| 699 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
| 1097 | + if (strlen($airline_name) > 30) { |
|
| 1098 | + $airline_name = substr($airline_name,0,30).'...'; |
|
| 1099 | + } |
|
| 700 | 1100 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
| 701 | 1101 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
| 702 | 1102 | } else { |
@@ -714,7 +1114,10 @@ discard block |
||
| 714 | 1114 | <li><?php echo _("Display alliance:"); ?> |
| 715 | 1115 | <br/> |
| 716 | 1116 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
| 717 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 1117 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
| 1118 | + echo ' selected'; |
|
| 1119 | +} |
|
| 1120 | +?>><?php echo _("All"); ?></option> |
|
| 718 | 1121 | <?php |
| 719 | 1122 | foreach($allalliancenames as $alliance) { |
| 720 | 1123 | $alliance_name = $alliance['alliance']; |
@@ -773,10 +1176,22 @@ discard block |
||
| 773 | 1176 | ?> |
| 774 | 1177 | <li><?php echo _("Display airlines of type:"); ?><br/> |
| 775 | 1178 | <select class="selectpicker" onchange="airlinestype(this);"> |
| 776 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
| 777 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
| 778 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
| 779 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
| 1179 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
| 1180 | + echo ' selected'; |
|
| 1181 | +} |
|
| 1182 | +?>><?php echo _("All"); ?></option> |
|
| 1183 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
| 1184 | + echo ' selected'; |
|
| 1185 | +} |
|
| 1186 | +?>><?php echo _("Passenger"); ?></option> |
|
| 1187 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
| 1188 | + echo ' selected'; |
|
| 1189 | +} |
|
| 1190 | +?>><?php echo _("Cargo"); ?></option> |
|
| 1191 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
| 1192 | + echo ' selected'; |
|
| 1193 | +} |
|
| 1194 | +?>><?php echo _("Military"); ?></option> |
|
| 780 | 1195 | </select> |
| 781 | 1196 | </li> |
| 782 | 1197 | <?php |
@@ -790,7 +1205,10 @@ discard block |
||
| 790 | 1205 | ?> |
| 791 | 1206 | <li> |
| 792 | 1207 | <?php echo _("Display vessels with MMSI:"); ?> |
| 793 | - <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
|
| 1208 | + <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) { |
|
| 1209 | + print $_COOKIE['filter_mmsi']; |
|
| 1210 | +} |
|
| 1211 | +?>" /> |
|
| 794 | 1212 | </li> |
| 795 | 1213 | <?php |
| 796 | 1214 | if (isset($globalVM) && $globalVM) { |
@@ -821,7 +1239,10 @@ discard block |
||
| 821 | 1239 | ?> |
| 822 | 1240 | <li> |
| 823 | 1241 | <?php echo _("Display with ident:"); ?> |
| 824 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
| 1242 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
| 1243 | + print $_COOKIE['filter_ident']; |
|
| 1244 | +} |
|
| 1245 | +?>" /> |
|
| 825 | 1246 | </li> |
| 826 | 1247 | </ul> |
| 827 | 1248 | </form> |
@@ -837,7 +1258,10 @@ discard block |
||
| 837 | 1258 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
| 838 | 1259 | <form> |
| 839 | 1260 | <ul> |
| 840 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 1261 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) { |
|
| 1262 | + print 'checked'; |
|
| 1263 | +} |
|
| 1264 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
| 841 | 1265 | <li><?php echo _("Type:"); ?> |
| 842 | 1266 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
| 843 | 1267 | <?php |
@@ -845,25 +1269,45 @@ discard block |
||
| 845 | 1269 | $types = $Satellite->get_tle_types(); |
| 846 | 1270 | foreach ($types as $type) { |
| 847 | 1271 | $type_name = $type['tle_type']; |
| 848 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
| 849 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
| 850 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
| 851 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
| 852 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
| 853 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
| 854 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 855 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
| 856 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
| 857 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
| 858 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
| 859 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
| 860 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
| 861 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
| 862 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
| 863 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
| 864 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
| 865 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
| 866 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
| 1272 | + if ($type_name == 'musson') { |
|
| 1273 | + $type_name = 'Russian LEO Navigation'; |
|
| 1274 | + } else if ($type_name == 'nnss') { |
|
| 1275 | + $type_name = 'Navi Navigation Satellite System'; |
|
| 1276 | + } else if ($type_name == 'sbas') { |
|
| 1277 | + $type_name = 'Satellite-Based Augmentation System'; |
|
| 1278 | + } else if ($type_name == 'glo-ops') { |
|
| 1279 | + $type_name = 'Glonass Operational'; |
|
| 1280 | + } else if ($type_name == 'gps-ops') { |
|
| 1281 | + $type_name = 'GPS Operational'; |
|
| 1282 | + } else if ($type_name == 'argos') { |
|
| 1283 | + $type_name = 'ARGOS Data Collection System'; |
|
| 1284 | + } else if ($type_name == 'tdrss') { |
|
| 1285 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
| 1286 | + } else if ($type_name == 'sarsat') { |
|
| 1287 | + $type_name = 'Search & Rescue'; |
|
| 1288 | + } else if ($type_name == 'dmc') { |
|
| 1289 | + $type_name = 'Disaster Monitoring'; |
|
| 1290 | + } else if ($type_name == 'resource') { |
|
| 1291 | + $type_name = 'Earth Resources'; |
|
| 1292 | + } else if ($type_name == 'stations') { |
|
| 1293 | + $type_name = 'Space Stations'; |
|
| 1294 | + } else if ($type_name == 'geo') { |
|
| 1295 | + $type_name = 'Geostationary'; |
|
| 1296 | + } else if ($type_name == 'amateur') { |
|
| 1297 | + $type_name = 'Amateur Radio'; |
|
| 1298 | + } else if ($type_name == 'x-comm') { |
|
| 1299 | + $type_name = 'Experimental'; |
|
| 1300 | + } else if ($type_name == 'other-comm') { |
|
| 1301 | + $type_name = 'Other Comm'; |
|
| 1302 | + } else if ($type_name == 'science') { |
|
| 1303 | + $type_name = 'Space & Earth Science'; |
|
| 1304 | + } else if ($type_name == 'military') { |
|
| 1305 | + $type_name = 'Miscellaneous Military'; |
|
| 1306 | + } else if ($type_name == 'radar') { |
|
| 1307 | + $type_name = 'Radar Calibration'; |
|
| 1308 | + } else if ($type_name == 'tle-new') { |
|
| 1309 | + $type_name = 'Last 30 days launches'; |
|
| 1310 | + } |
|
| 867 | 1311 | |
| 868 | 1312 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
| 869 | 1313 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |