@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['airport'])) { |
| 7 | - header('Location: '.$globalURL.'/airport'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/airport'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['airport'])) { |
| 7 | - header('Location: '.$globalURL.'/airport'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/airport'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['airline'])) { |
| 7 | - header('Location: '.$globalURL.'/airline'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/airline'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -23,12 +23,12 @@ |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * Get Accidents data from DB |
|
| 27 | - * @param String $limit Limit |
|
| 28 | - * @param String $type Set type accident or incident |
|
| 29 | - * @param String $date get data for a date |
|
| 30 | - * @return Array Return Accidents data in array |
|
| 31 | - */ |
|
| 26 | + * Get Accidents data from DB |
|
| 27 | + * @param String $limit Limit |
|
| 28 | + * @param String $type Set type accident or incident |
|
| 29 | + * @param String $date get data for a date |
|
| 30 | + * @return Array Return Accidents data in array |
|
| 31 | + */ |
|
| 32 | 32 | public function getAccidentData($limit = '',$type = '',$date = '') { |
| 33 | 33 | global $globalURL, $globalDBdriver; |
| 34 | 34 | $Image = new Image($this->db); |
@@ -390,17 +390,17 @@ discard block |
||
| 390 | 390 | else { |
| 391 | 391 | $planespotter_url_array = explode("_", $spotter_item['image']); |
| 392 | 392 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
| 393 | - $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 393 | + $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 394 | 394 | } |
| 395 | 395 | if (isset($spotter_item['airline_name'])) { |
| 396 | 396 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 397 | 397 | } else { |
| 398 | 398 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 399 | 399 | } |
| 400 | - } else { |
|
| 401 | - if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 402 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 403 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 400 | + } else { |
|
| 401 | + if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 402 | + $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 403 | + } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 404 | 404 | if (isset($spotter_item['airline_name'])) { |
| 405 | 405 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 406 | 406 | } else { |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | } |
| 416 | 416 | } elseif(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed"){ |
| 417 | 417 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
| 418 | - $spotter_item['squawk'] = '-'; |
|
| 418 | + $spotter_item['squawk'] = '-'; |
|
| 419 | 419 | } |
| 420 | 420 | if ($spotter_item['image_thumbnail'] != "") |
| 421 | 421 | { |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | else { |
| 427 | 427 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
| 428 | 428 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
| 429 | - $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 429 | + $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 430 | 430 | } |
| 431 | 431 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 432 | 432 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -438,9 +438,9 @@ discard block |
||
| 438 | 438 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 439 | 439 | } |
| 440 | 440 | } else { |
| 441 | - if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 442 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 443 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 441 | + if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 442 | + $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 443 | + } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 444 | 444 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 445 | 445 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 446 | 446 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | print '</td>'."\n"; |
| 455 | 455 | } else { |
| 456 | 456 | print '<td class="aircraft_thumbnail">'."\n"; |
| 457 | - // print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
|
| 457 | + // print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
|
| 458 | 458 | //} |
| 459 | 459 | if (!isset($spotter_item['airline_name']) && !isset($spotter_item['aircraft_name'])) { |
| 460 | 460 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '._("Not available").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n"; |
@@ -559,13 +559,13 @@ discard block |
||
| 559 | 559 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
| 560 | 560 | } else $distance = ''; |
| 561 | 561 | if ($distance != '') { |
| 562 | - if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 563 | - echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
| 564 | - } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 565 | - echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
| 566 | - } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 567 | - echo '<br/><i>'.$distance.' km</i>'; |
|
| 568 | - } |
|
| 562 | + if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 563 | + echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
| 564 | + } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 565 | + echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
| 566 | + } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 567 | + echo '<br/><i>'.$distance.' km</i>'; |
|
| 568 | + } |
|
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | print '</td>'."\n"; |