@@ -5,7 +5,7 @@ |
||
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | if ($_GET['flightaware_id'] != "") |
| 7 | 7 | { |
| 8 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 8 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 9 | 9 | $spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($flightaware_id); |
| 10 | 10 | |
| 11 | 11 | if ($spotter_id != "") |
@@ -8,11 +8,11 @@ |
||
| 8 | 8 | $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
| 9 | 9 | $spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($flightaware_id); |
| 10 | 10 | |
| 11 | - if ($spotter_id != "") |
|
| 12 | - { |
|
| 13 | - header('Location: '.$globalURL.'/flightid/'.$spotter_id); |
|
| 14 | - } else { |
|
| 11 | + if ($spotter_id != "") |
|
| 12 | + { |
|
| 13 | + header('Location: '.$globalURL.'/flightid/'.$spotter_id); |
|
| 14 | + } else { |
|
| 15 | 15 | header('Location: '.$globalURL); |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | } |
| 18 | 18 | ?> |
| 19 | 19 | \ No newline at end of file |
@@ -7,12 +7,12 @@ discard block |
||
| 7 | 7 | require_once('header.php'); |
| 8 | 8 | |
| 9 | 9 | //calculuation for the pagination |
| 10 | -if(!isset($_GET['limit'])) |
|
| 10 | +if (!isset($_GET['limit'])) |
|
| 11 | 11 | { |
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | print '<div class="table column">'; |
| 36 | 36 | print '<p>'._("This page shows all upcoming flights within the next 3 hours calculated using historical data, based on the number of same flights on the current day of the week & current time. This does not take into account real-time delays and other factors.").'</p>'; |
| 37 | 37 | |
| 38 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 38 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 39 | 39 | if ($sort != '') { |
| 40 | 40 | $spotter_array = $Spotter->getUpcomingFlights($limit_start.",".$absolute_difference, $sort); |
| 41 | 41 | } else { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -6,8 +6,11 @@ |
||
| 6 | 6 | $Spotter = new Spotter(); |
| 7 | 7 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
| 8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
| 9 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 10 | -else $spotter_array = ''; |
|
| 9 | +if (isset($_GET['date'])) { |
|
| 10 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 11 | +} else { |
|
| 12 | + $spotter_array = ''; |
|
| 13 | +} |
|
| 11 | 14 | |
| 12 | 15 | if (!empty($spotter_array)) |
| 13 | 16 | { |
@@ -4,14 +4,14 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | 6 | $Spotter = new Spotter(); |
| 7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 8 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
| 9 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 8 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
| 9 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 10 | 10 | else $spotter_array = ''; |
| 11 | 11 | |
| 12 | 12 | if (!empty($spotter_array)) |
| 13 | 13 | { |
| 14 | - $title = sprintf(_("Most Common Airlines on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 14 | + $title = sprintf(_("Most Common Airlines on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 15 | 15 | |
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
@@ -29,13 +29,13 @@ discard block |
||
| 29 | 29 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 30 | 30 | print '<br />'; |
| 31 | 31 | print '<div class="info column">'; |
| 32 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 32 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 33 | 33 | print '</div>'; |
| 34 | 34 | |
| 35 | 35 | include('date-sub-menu.php'); |
| 36 | 36 | print '<div class="column">'; |
| 37 | 37 | print '<h2>'._("Most Common Airlines").'</h2>'; |
| 38 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 38 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 39 | 39 | |
| 40 | 40 | $airline_array = $Spotter->countAllAirlinesByDate($date); |
| 41 | 41 | if (!empty($airline_array)) |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | print '</thead>'; |
| 53 | 53 | print '<tbody>'; |
| 54 | 54 | $i = 1; |
| 55 | - foreach($airline_array as $airline_item) |
|
| 55 | + foreach ($airline_array as $airline_item) |
|
| 56 | 56 | { |
| 57 | 57 | print '<tr>'; |
| 58 | 58 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,8 +8,11 @@ |
||
| 8 | 8 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
| 9 | 9 | |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 12 | -else $spotter_array = array(); |
|
| 11 | +if (isset($_GET['date'])) { |
|
| 12 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 13 | +} else { |
|
| 14 | + $spotter_array = array(); |
|
| 15 | +} |
|
| 13 | 16 | |
| 14 | 17 | if (!empty($spotter_array)) |
| 15 | 18 | { |
@@ -3,16 +3,16 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
| 6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
| 8 | 8 | |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 10 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 11 | 11 | else $spotter_array = array(); |
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 15 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
| 18 | 18 | print '<form action="'.$globalURL.'/date" method="post" class="form-inline">'; |
@@ -29,13 +29,13 @@ discard block |
||
| 29 | 29 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 30 | 30 | print '<br />'; |
| 31 | 31 | print '<div class="info column">'; |
| 32 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 32 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 33 | 33 | print '</div>'; |
| 34 | 34 | |
| 35 | 35 | include('date-sub-menu.php'); |
| 36 | 36 | print '<div class="column">'; |
| 37 | 37 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
| 38 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 38 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 39 | 39 | |
| 40 | 40 | $airline_array = $Spotter->countAllAirlineCountriesByDate($date); |
| 41 | 41 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 45 | 45 | print 'var series = ['; |
| 46 | 46 | $country_data = ''; |
| 47 | - foreach($airline_array as $airline_item) |
|
| 47 | + foreach ($airline_array as $airline_item) |
|
| 48 | 48 | { |
| 49 | 49 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airport_item['airline_country_count'].'],'; |
| 50 | 50 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | print '</thead>'; |
| 92 | 92 | print '<tbody>'; |
| 93 | 93 | $i = 1; |
| 94 | - foreach($airline_array as $airline_item) |
|
| 94 | + foreach ($airline_array as $airline_item) |
|
| 95 | 95 | { |
| 96 | 96 | print '<tr>'; |
| 97 | 97 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -38,8 +38,12 @@ |
||
| 38 | 38 | if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) { |
| 39 | 39 | include('table-output.php'); |
| 40 | 40 | print '<div class="pagination">'; |
| 41 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 42 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 41 | + if ($limit_previous_1 >= 0) { |
|
| 42 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 43 | + } |
|
| 44 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
| 45 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 46 | + } |
|
| 43 | 47 | print '</div>'; |
| 44 | 48 | } |
| 45 | 49 | print '</div>'; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | $page_url = $globalURL.'/accident-latest'; |
| 10 | 10 | |
| 11 | -if(!isset($_GET['limit'])) |
|
| 11 | +if (!isset($_GET['limit'])) |
|
| 12 | 12 | { |
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | print '<div class="table column">'; |
| 36 | 36 | print '<p>'._("The table below shows the latest Incidents.").'</p>'; |
| 37 | -$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'incident'); |
|
| 37 | +$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'incident'); |
|
| 38 | 38 | //print_r($spotter_array); |
| 39 | 39 | if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) { |
| 40 | 40 | include('table-output.php'); |
@@ -10,10 +10,10 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | $date = date('Y-m-d'); |
| 12 | 12 | } else { |
| 13 | - $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
| 13 | + $date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -if(!isset($_GET['limit'])) |
|
| 16 | +if (!isset($_GET['limit'])) |
|
| 17 | 17 | { |
| 18 | 18 | $limit_start = 0; |
| 19 | 19 | $limit_end = 25; |
@@ -48,12 +48,12 @@ discard block |
||
| 48 | 48 | print '<br />'; |
| 49 | 49 | |
| 50 | 50 | print '<div class="info column">'; |
| 51 | -print '<h1>'.sprintf(_("Incidents from %s"),date("l F j, Y",strtotime($date))).'</h1>'; |
|
| 51 | +print '<h1>'.sprintf(_("Incidents from %s"), date("l F j, Y", strtotime($date))).'</h1>'; |
|
| 52 | 52 | print '</div>'; |
| 53 | 53 | |
| 54 | 54 | print '<div class="table column">'; |
| 55 | -print '<p>'.sprintf(_("The table below shows the Incidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>'; |
|
| 56 | -$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'incident',$date); |
|
| 55 | +print '<p>'.sprintf(_("The table below shows the Incidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>'; |
|
| 56 | +$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'incident', $date); |
|
| 57 | 57 | //print_r($spotter_array); |
| 58 | 58 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
| 59 | 59 | include('table-output.php'); |
@@ -58,8 +58,12 @@ |
||
| 58 | 58 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
| 59 | 59 | include('table-output.php'); |
| 60 | 60 | print '<div class="pagination">'; |
| 61 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 62 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 61 | + if ($limit_previous_1 >= 0) { |
|
| 62 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
| 63 | + } |
|
| 64 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
| 65 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
| 66 | + } |
|
| 63 | 67 | print '</div>'; |
| 64 | 68 | } |
| 65 | 69 | print '</div>'; |
@@ -5,11 +5,11 @@ |
||
| 5 | 5 | |
| 6 | 6 | if ($_POST['aircraft_manufacturer'] != "") |
| 7 | 7 | { |
| 8 | - $aircraft_manufacturer = filter_input(INPUT_POST,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
| 8 | + $aircraft_manufacturer = filter_input(INPUT_POST, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
| 9 | 9 | header('Location: '.$globalURL.'/manufacturer/'.$aircraft_manufacturer); |
| 10 | 10 | } elseif ($_GET['aircraft_manufacturer'] != "") |
| 11 | 11 | { |
| 12 | - $aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
| 12 | + $aircraft_manufacturer = filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
| 13 | 13 | header('Location: '.$globalURL.'/manufacturer/'.$aircraft_manufacturer); |
| 14 | 14 | } else { |
| 15 | 15 | header('Location: '.$globalURL); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | |
| 6 | 6 | if ($_POST['registration'] != "") |
| 7 | 7 | { |
| 8 | - $registration = filter_input(INPUT_POST,'registration',FILTER_SANITIZE_STRING); |
|
| 8 | + $registration = filter_input(INPUT_POST, 'registration', FILTER_SANITIZE_STRING); |
|
| 9 | 9 | header('Location: '.$globalURL.'/registration/'.$registration); |
| 10 | 10 | } else { |
| 11 | 11 | header('Location: '.$globalURL); |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | require_once('../require/settings.php'); |
| 3 | 3 | require_once('../require/class.Language.php'); |
| 4 | 4 | |
| 5 | -setcookie("MapFormat",'2d'); |
|
| 5 | +setcookie("MapFormat", '2d'); |
|
| 6 | 6 | |
| 7 | 7 | // Compressed GeoJson is used if true |
| 8 | 8 | if (!isset($globalJsonCompress)) $compress = true; |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
| 19 | 19 | if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
| 20 | 20 | else $enddate = time(); |
| 21 | - setcookie("archive_begin",$begindate); |
|
| 22 | - setcookie("archive_end",$enddate); |
|
| 23 | - setcookie("archive_update",$lastupd); |
|
| 24 | - setcookie("archive_speed",$archivespeed); |
|
| 21 | + setcookie("archive_begin", $begindate); |
|
| 22 | + setcookie("archive_end", $enddate); |
|
| 23 | + setcookie("archive_update", $lastupd); |
|
| 24 | + setcookie("archive_speed", $archivespeed); |
|
| 25 | 25 | ?> |
| 26 | 26 | document.cookie = 'archive_begin=<?php print $begindate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'; |
| 27 | 27 | document.cookie = 'archive_end=<?php print $enddate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'; |
@@ -92,16 +92,16 @@ discard block |
||
| 92 | 92 | <?php |
| 93 | 93 | } |
| 94 | 94 | if (isset($_GET['ident'])) { |
| 95 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 95 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 96 | 96 | } |
| 97 | 97 | if (isset($_GET['flightaware_id'])) { |
| 98 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
| 98 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
| 99 | 99 | } |
| 100 | 100 | if (isset($_GET['latitude'])) { |
| 101 | - $latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING); |
|
| 101 | + $latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING); |
|
| 102 | 102 | } |
| 103 | 103 | if (isset($_GET['longitude'])) { |
| 104 | - $longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING); |
|
| 104 | + $longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING); |
|
| 105 | 105 | } |
| 106 | 106 | ?> |
| 107 | 107 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | || navigator.userAgent.match(/BlackBerry/i) |
| 137 | 137 | || navigator.userAgent.match(/Windows Phone/i)) |
| 138 | 138 | { |
| 139 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
| 139 | + var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom - 1; else print '8'; ?>; |
|
| 140 | 140 | } else { |
| 141 | 141 | var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
| 142 | 142 | } |
@@ -230,19 +230,19 @@ discard block |
||
| 230 | 230 | map.addLayer(yandexLayer); |
| 231 | 231 | <?php |
| 232 | 232 | } elseif ($MapType == 'Bing-Aerial') { |
| 233 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 233 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
| 234 | 234 | ?> |
| 235 | 235 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
| 236 | 236 | map.addLayer(bingLayer); |
| 237 | 237 | <?php |
| 238 | 238 | } elseif ($MapType == 'Bing-Hybrid') { |
| 239 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 239 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
| 240 | 240 | ?> |
| 241 | 241 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
| 242 | 242 | map.addLayer(bingLayer); |
| 243 | 243 | <?php |
| 244 | 244 | } elseif ($MapType == 'Bing-Road') { |
| 245 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 245 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
| 246 | 246 | ?> |
| 247 | 247 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
| 248 | 248 | map.addLayer(bingLayer); |
@@ -534,10 +534,10 @@ discard block |
||
| 534 | 534 | }; |
| 535 | 535 | archive.update = function (props) { |
| 536 | 536 | if (typeof props != 'undefined') { |
| 537 | - //this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a> <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>'; |
|
| 538 | - this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>'; |
|
| 537 | + //this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a> <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>'; |
|
| 538 | + this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>'; |
|
| 539 | 539 | } else { |
| 540 | - this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'; |
|
| 540 | + this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'; |
|
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | }; |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | <?php |
| 738 | 738 | } else { |
| 739 | 739 | ?> |
| 740 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 740 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 741 | 741 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 742 | 742 | <?php |
| 743 | 743 | } |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | /* |
| 754 | 754 | shadowUrl: iconURLShadowpath, |
| 755 | 755 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
| 756 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
| 756 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
| 757 | 757 | */ |
| 758 | 758 | }) |
| 759 | 759 | }) |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | <?php |
| 787 | 787 | } else { |
| 788 | 788 | ?> |
| 789 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 789 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 790 | 790 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 791 | 791 | <?php |
| 792 | 792 | } |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | <?php |
| 835 | 835 | } else { |
| 836 | 836 | ?> |
| 837 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 837 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
| 838 | 838 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 839 | 839 | <?php |
| 840 | 840 | } |
@@ -1460,23 +1460,23 @@ discard block |
||
| 1460 | 1460 | airs.push(air.value); |
| 1461 | 1461 | } |
| 1462 | 1462 | } |
| 1463 | - document.cookie = 'filter_Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
| 1463 | + document.cookie = 'filter_Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
| 1464 | 1464 | } |
| 1465 | 1465 | function airlinestype(selectObj) { |
| 1466 | 1466 | var idx = selectObj.selectedIndex; |
| 1467 | 1467 | var airtype = selectObj.options[idx].value; |
| 1468 | - document.cookie = 'filter_airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
| 1468 | + document.cookie = 'filter_airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
| 1469 | 1469 | } |
| 1470 | 1470 | function alliance(selectObj) { |
| 1471 | 1471 | var idx = selectObj.selectedIndex; |
| 1472 | 1472 | var alliance = selectObj.options[idx].value; |
| 1473 | - document.cookie = 'filter_alliance='+alliance+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
| 1473 | + document.cookie = 'filter_alliance='+alliance+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
| 1474 | 1474 | } |
| 1475 | 1475 | |
| 1476 | 1476 | function identfilter() { |
| 1477 | 1477 | var ident = $('#identfilter').val(); |
| 1478 | 1478 | console.log('Filter with '+ident); |
| 1479 | - document.cookie = 'filter_ident='+ident+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
| 1479 | + document.cookie = 'filter_ident='+ident+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
| 1480 | 1480 | } |
| 1481 | 1481 | function removefilters() { |
| 1482 | 1482 | // Get an array of all cookie names (the regex matches what we don't want) |
@@ -1498,7 +1498,7 @@ discard block |
||
| 1498 | 1498 | } |
| 1499 | 1499 | } |
| 1500 | 1500 | //document.cookie = 'Sources='+sources.join()+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 1501 | - document.cookie = 'filter_Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
| 1501 | + document.cookie = 'filter_Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
| 1502 | 1502 | } |
| 1503 | 1503 | |
| 1504 | 1504 | function show3D() { |
@@ -1521,23 +1521,23 @@ discard block |
||
| 1521 | 1521 | |
| 1522 | 1522 | function clickVATSIM(cb) { |
| 1523 | 1523 | //document.cookie = 'ShowVATSIM='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 1524 | - document.cookie = 'filter_ShowVATSIM='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
| 1524 | + document.cookie = 'filter_ShowVATSIM='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
| 1525 | 1525 | } |
| 1526 | 1526 | function clickIVAO(cb) { |
| 1527 | 1527 | //document.cookie = 'ShowIVAO='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 1528 | - document.cookie = 'filter_ShowIVAO='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
| 1528 | + document.cookie = 'filter_ShowIVAO='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
| 1529 | 1529 | } |
| 1530 | 1530 | function clickphpVMS(cb) { |
| 1531 | 1531 | //document.cookie = 'ShowVMS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 1532 | - document.cookie = 'filter_ShowVMS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
| 1532 | + document.cookie = 'filter_ShowVMS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
| 1533 | 1533 | } |
| 1534 | 1534 | function clickSBS1(cb) { |
| 1535 | 1535 | //document.cookie = 'ShowSBS1='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 1536 | - document.cookie = 'filter_ShowSBS1='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
| 1536 | + document.cookie = 'filter_ShowSBS1='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
| 1537 | 1537 | } |
| 1538 | 1538 | function clickAPRS(cb) { |
| 1539 | 1539 | //document.cookie = 'ShowAPRS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
| 1540 | - document.cookie = 'filter_ShowAPRS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
| 1540 | + document.cookie = 'filter_ShowAPRS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
| 1541 | 1541 | } |
| 1542 | 1542 | function clickFlightPopup(cb) { |
| 1543 | 1543 | document.cookie = 'flightpopup='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | setcookie("MapFormat",'2d'); |
| 6 | 6 | |
| 7 | 7 | // Compressed GeoJson is used if true |
| 8 | -if (!isset($globalJsonCompress)) $compress = true; |
|
| 9 | -else $compress = $globalJsonCompress; |
|
| 8 | +if (!isset($globalJsonCompress)) { |
|
| 9 | + $compress = true; |
|
| 10 | +} else { |
|
| 11 | + $compress = $globalJsonCompress; |
|
| 12 | +} |
|
| 10 | 13 | if (isset($_GET['archive'])) { |
| 11 | 14 | //$archiveupdatetime = 50; |
| 12 | 15 | $archiveupdatetime = $globalMapRefresh; |
@@ -16,8 +19,11 @@ discard block |
||
| 16 | 19 | //$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10)); |
| 17 | 20 | //$lastupd = 20; |
| 18 | 21 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
| 19 | - if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
|
| 20 | - else $enddate = time(); |
|
| 22 | + if (isset($_GET['enddate']) && $_GET['enddate'] != '') { |
|
| 23 | + $enddate = $_GET['enddate']; |
|
| 24 | + } else { |
|
| 25 | + $enddate = time(); |
|
| 26 | + } |
|
| 21 | 27 | setcookie("archive_begin",$begindate); |
| 22 | 28 | setcookie("archive_end",$enddate); |
| 23 | 29 | setcookie("archive_update",$lastupd); |
@@ -123,7 +129,17 @@ discard block |
||
| 123 | 129 | } |
| 124 | 130 | |
| 125 | 131 | //create the map |
| 126 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
| 132 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
| 133 | + print $latitude; |
|
| 134 | +} else { |
|
| 135 | + print $globalCenterLatitude; |
|
| 136 | +} |
|
| 137 | +?>,<?php if (isset($longitude)) { |
|
| 138 | + print $longitude; |
|
| 139 | +} else { |
|
| 140 | + print $globalCenterLongitude; |
|
| 141 | +} |
|
| 142 | +?>], zoom); |
|
| 127 | 143 | <?php |
| 128 | 144 | } else { |
| 129 | 145 | ?> |
@@ -136,9 +152,19 @@ discard block |
||
| 136 | 152 | || navigator.userAgent.match(/BlackBerry/i) |
| 137 | 153 | || navigator.userAgent.match(/Windows Phone/i)) |
| 138 | 154 | { |
| 139 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
| 155 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
| 156 | + print $globalLiveZoom-1; |
|
| 157 | +} else { |
|
| 158 | + print '8'; |
|
| 159 | +} |
|
| 160 | +?>; |
|
| 140 | 161 | } else { |
| 141 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
|
| 162 | + var zoom = <?php if (isset($globalLiveZoom)) { |
|
| 163 | + print $globalLiveZoom; |
|
| 164 | +} else { |
|
| 165 | + print '9'; |
|
| 166 | +} |
|
| 167 | +?>; |
|
| 142 | 168 | } |
| 143 | 169 | |
| 144 | 170 | //create the map |
@@ -163,16 +189,27 @@ discard block |
||
| 163 | 189 | bounds = L.latLngBounds(southWest,northEast); |
| 164 | 190 | //a few title layers |
| 165 | 191 | <?php |
| 166 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
| 167 | - else $MapType = $globalMapProvider; |
|
| 192 | + if (isset($_COOKIE['MapType'])) { |
|
| 193 | + $MapType = $_COOKIE['MapType']; |
|
| 194 | + } else { |
|
| 195 | + $MapType = $globalMapProvider; |
|
| 196 | + } |
|
| 168 | 197 | |
| 169 | 198 | if ($MapType == 'Mapbox') { |
| 170 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
| 171 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 172 | -?> |
|
| 199 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
| 200 | + $MapBoxId = $globalMapboxId; |
|
| 201 | + } else { |
|
| 202 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
| 203 | + } |
|
| 204 | + ?> |
|
| 173 | 205 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 174 | 206 | maxZoom: 18, |
| 175 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 207 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 208 | + print 'false'; |
|
| 209 | +} else { |
|
| 210 | + print 'true'; |
|
| 211 | +} |
|
| 212 | +?>, |
|
| 176 | 213 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
| 177 | 214 | '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + |
| 178 | 215 | 'Imagery © <a href="http://mapbox.com">Mapbox</a>', |
@@ -184,7 +221,12 @@ discard block |
||
| 184 | 221 | ?> |
| 185 | 222 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 186 | 223 | maxZoom: 18, |
| 187 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 224 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 225 | + print 'false'; |
|
| 226 | +} else { |
|
| 227 | + print 'true'; |
|
| 228 | +} |
|
| 229 | +?>, |
|
| 188 | 230 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
| 189 | 231 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
| 190 | 232 | }).addTo(map); |
@@ -230,20 +272,26 @@ discard block |
||
| 230 | 272 | map.addLayer(yandexLayer); |
| 231 | 273 | <?php |
| 232 | 274 | } elseif ($MapType == 'Bing-Aerial') { |
| 233 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 234 | -?> |
|
| 275 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 276 | + setcookie('MapType','OpenStreetMap'); |
|
| 277 | + } |
|
| 278 | + ?> |
|
| 235 | 279 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
| 236 | 280 | map.addLayer(bingLayer); |
| 237 | 281 | <?php |
| 238 | 282 | } elseif ($MapType == 'Bing-Hybrid') { |
| 239 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 240 | -?> |
|
| 283 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 284 | + setcookie('MapType','OpenStreetMap'); |
|
| 285 | + } |
|
| 286 | + ?> |
|
| 241 | 287 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
| 242 | 288 | map.addLayer(bingLayer); |
| 243 | 289 | <?php |
| 244 | 290 | } elseif ($MapType == 'Bing-Road') { |
| 245 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
| 246 | -?> |
|
| 291 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
| 292 | + setcookie('MapType','OpenStreetMap'); |
|
| 293 | + } |
|
| 294 | + ?> |
|
| 247 | 295 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
| 248 | 296 | map.addLayer(bingLayer); |
| 249 | 297 | <?php |
@@ -291,7 +339,12 @@ discard block |
||
| 291 | 339 | } |
| 292 | 340 | } elseif ($globalBounding == 'circle') { |
| 293 | 341 | ?> |
| 294 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
| 342 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
| 343 | + print $globalBoundingCircleSize; |
|
| 344 | +} else { |
|
| 345 | + print '70000'; |
|
| 346 | +} |
|
| 347 | +?>,{ |
|
| 295 | 348 | color: '#92C7D1', |
| 296 | 349 | fillColor: '#92C7D1', |
| 297 | 350 | fillOpacity: 0.3, |
@@ -350,8 +403,11 @@ discard block |
||
| 350 | 403 | |
| 351 | 404 | function update_airportsLayer() { |
| 352 | 405 | <?php |
| 353 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
| 354 | - else $getZoom = '7'; |
|
| 406 | + if (isset($_COOKIE['AirportZoom'])) { |
|
| 407 | + $getZoom = $_COOKIE['AirportZoom']; |
|
| 408 | + } else { |
|
| 409 | + $getZoom = '7'; |
|
| 410 | + } |
|
| 355 | 411 | ?> |
| 356 | 412 | //if (map.getZoom() <= <?php print $getZoom; ?>) { |
| 357 | 413 | if (typeof airportsLayer != 'undefined') { |
@@ -687,9 +743,13 @@ discard block |
||
| 687 | 743 | if (callsign != ""){ markerLabel += callsign; } |
| 688 | 744 | if (departure_airport_code != "" && arrival_airport_code != "" && departure_airport_code != "NA" && arrival_airport_code != "NA"){ markerLabel += ' ( '+departure_airport_code+' - '+arrival_airport_code+' )'; } |
| 689 | 745 | <?php |
| 690 | - if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
| 691 | - elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
| 692 | - else $IconColor = '1a3151'; |
|
| 746 | + if (isset($_COOKIE['IconColor'])) { |
|
| 747 | + $IconColor = $_COOKIE['IconColor']; |
|
| 748 | + } elseif (isset($globalAircraftIconColor)) { |
|
| 749 | + $IconColor = $globalAircraftIconColor; |
|
| 750 | + } else { |
|
| 751 | + $IconColor = '1a3151'; |
|
| 752 | + } |
|
| 693 | 753 | if (!isset($ident) && !isset($flightaware_id)) { |
| 694 | 754 | ?> |
| 695 | 755 | info_update(feature.properties.fc); |
@@ -737,7 +797,12 @@ discard block |
||
| 737 | 797 | <?php |
| 738 | 798 | } else { |
| 739 | 799 | ?> |
| 740 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 800 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 801 | + print $archiveupdatetime*1000; |
|
| 802 | +} else { |
|
| 803 | + print $globalMapRefresh*1000+20000; |
|
| 804 | +} |
|
| 805 | +?>+feature.properties.sqt*1000); |
|
| 741 | 806 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 742 | 807 | <?php |
| 743 | 808 | } |
@@ -786,7 +851,12 @@ discard block |
||
| 786 | 851 | <?php |
| 787 | 852 | } else { |
| 788 | 853 | ?> |
| 789 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 854 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 855 | + print $archiveupdatetime*1000; |
|
| 856 | +} else { |
|
| 857 | + print $globalMapRefresh*1000+20000; |
|
| 858 | +} |
|
| 859 | +?>+feature.properties.sqt*1000); |
|
| 790 | 860 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 791 | 861 | <?php |
| 792 | 862 | } |
@@ -834,7 +904,12 @@ discard block |
||
| 834 | 904 | <?php |
| 835 | 905 | } else { |
| 836 | 906 | ?> |
| 837 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
| 907 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
| 908 | + print $archiveupdatetime*1000; |
|
| 909 | +} else { |
|
| 910 | + print $globalMapRefresh*1000+20000; |
|
| 911 | +} |
|
| 912 | +?>+feature.properties.sqt*1000); |
|
| 838 | 913 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
| 839 | 914 | <?php |
| 840 | 915 | } |
@@ -1177,14 +1252,24 @@ discard block |
||
| 1177 | 1252 | if (isset($_GET['archive'])) { |
| 1178 | 1253 | ?> |
| 1179 | 1254 | //then load it again every 30 seconds |
| 1180 | -// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>); |
|
| 1255 | +// var reload = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 1256 | + print ($globalMapRefresh*1000)/2; |
|
| 1257 | +} else { |
|
| 1258 | + print '15000'; |
|
| 1259 | +} |
|
| 1260 | +?>); |
|
| 1181 | 1261 | reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php print $archiveupdatetime*1000; ?>); |
| 1182 | 1262 | <?php |
| 1183 | 1263 | } else { |
| 1184 | 1264 | ?> |
| 1185 | 1265 | //then load it again every 30 seconds |
| 1186 | 1266 | reloadPage = setInterval( |
| 1187 | - function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 1267 | + function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
| 1268 | + print $globalMapRefresh*1000; |
|
| 1269 | +} else { |
|
| 1270 | + print '30000'; |
|
| 1271 | +} |
|
| 1272 | +?>); |
|
| 1188 | 1273 | var currentdate = new Date(); |
| 1189 | 1274 | var currentyear = new Date().getFullYear(); |
| 1190 | 1275 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -1196,7 +1281,12 @@ discard block |
||
| 1196 | 1281 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
| 1197 | 1282 | ?> |
| 1198 | 1283 | update_polarLayer(); |
| 1199 | -setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 1284 | +setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 1285 | + print $globalMapRefresh*1000*2; |
|
| 1286 | +} else { |
|
| 1287 | + print '60000'; |
|
| 1288 | +} |
|
| 1289 | +?>); |
|
| 1200 | 1290 | <?php |
| 1201 | 1291 | } |
| 1202 | 1292 | ?> |
@@ -1212,7 +1302,12 @@ discard block |
||
| 1212 | 1302 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
| 1213 | 1303 | ?> |
| 1214 | 1304 | update_atcLayer(); |
| 1215 | -setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 1305 | +setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 1306 | + print $globalMapRefresh*1000*2; |
|
| 1307 | +} else { |
|
| 1308 | + print '60000'; |
|
| 1309 | +} |
|
| 1310 | +?>); |
|
| 1216 | 1311 | <?php |
| 1217 | 1312 | } |
| 1218 | 1313 | ?> |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | <?php |
| 353 | 353 | if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
| 354 | 354 | else $getZoom = '7'; |
| 355 | - ?> |
|
| 355 | + ?> |
|
| 356 | 356 | //if (map.getZoom() <= <?php print $getZoom; ?>) { |
| 357 | 357 | if (typeof airportsLayer != 'undefined') { |
| 358 | 358 | if (map.hasLayer(airportsLayer) == true) { |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | update_locationsLayer(); |
| 513 | 513 | |
| 514 | 514 | <?php |
| 515 | - if (!isset($ident) && !isset($flightaware_id)) { |
|
| 515 | + if (!isset($ident) && !isset($flightaware_id)) { |
|
| 516 | 516 | ?> |
| 517 | 517 | |
| 518 | 518 | function info_update (props) { |
@@ -520,11 +520,11 @@ discard block |
||
| 520 | 520 | } |
| 521 | 521 | |
| 522 | 522 | <?php |
| 523 | - } |
|
| 523 | + } |
|
| 524 | 524 | ?> |
| 525 | 525 | |
| 526 | 526 | <?php |
| 527 | - if (isset($_GET['archive'])) { |
|
| 527 | + if (isset($_GET['archive'])) { |
|
| 528 | 528 | ?> |
| 529 | 529 | var archive = L.control(); |
| 530 | 530 | archive.onAdd = function (map) { |
@@ -543,12 +543,12 @@ discard block |
||
| 543 | 543 | }; |
| 544 | 544 | archive.addTo(map); |
| 545 | 545 | <?php |
| 546 | - } |
|
| 546 | + } |
|
| 547 | 547 | ?> |
| 548 | 548 | |
| 549 | 549 | |
| 550 | 550 | <?php |
| 551 | - //if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'false') || (isset($globalMapPopup) && !$globalMapPopup)) { |
|
| 551 | + //if ((isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'false') || (isset($globalMapPopup) && !$globalMapPopup)) { |
|
| 552 | 552 | ?> |
| 553 | 553 | |
| 554 | 554 | $(".showdetails").on("click",".close",function(){ |
@@ -1041,15 +1041,15 @@ discard block |
||
| 1041 | 1041 | if (map.getZoom() > 7) { |
| 1042 | 1042 | var style = { |
| 1043 | 1043 | <?php |
| 1044 | - if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1044 | + if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1045 | 1045 | ?> |
| 1046 | 1046 | "color": "#1a3151", |
| 1047 | 1047 | <?php |
| 1048 | - } else { |
|
| 1048 | + } else { |
|
| 1049 | 1049 | ?> |
| 1050 | 1050 | "color": getAltitudeColor(altitude), |
| 1051 | 1051 | <?php |
| 1052 | - } |
|
| 1052 | + } |
|
| 1053 | 1053 | ?> |
| 1054 | 1054 | "weight": 3, |
| 1055 | 1055 | "opacity": 1 |
@@ -1059,15 +1059,15 @@ discard block |
||
| 1059 | 1059 | } else { |
| 1060 | 1060 | var style = { |
| 1061 | 1061 | <?php |
| 1062 | - if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1062 | + if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1063 | 1063 | ?> |
| 1064 | 1064 | "color": "#1a3151", |
| 1065 | 1065 | <?php |
| 1066 | - } else { |
|
| 1066 | + } else { |
|
| 1067 | 1067 | ?> |
| 1068 | 1068 | "color": getAltitudeColor(altitude), |
| 1069 | 1069 | <?php |
| 1070 | - } |
|
| 1070 | + } |
|
| 1071 | 1071 | ?> |
| 1072 | 1072 | "weight": 2, |
| 1073 | 1073 | "opacity": 1 |
@@ -1079,15 +1079,15 @@ discard block |
||
| 1079 | 1079 | if (map.getZoom() > 7) { |
| 1080 | 1080 | var style = { |
| 1081 | 1081 | <?php |
| 1082 | - if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1082 | + if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1083 | 1083 | ?> |
| 1084 | 1084 | "color": "#1a3151", |
| 1085 | 1085 | <?php |
| 1086 | - } else { |
|
| 1086 | + } else { |
|
| 1087 | 1087 | ?> |
| 1088 | 1088 | "color": getAltitudeColor(altitude), |
| 1089 | 1089 | <?php |
| 1090 | - } |
|
| 1090 | + } |
|
| 1091 | 1091 | ?> |
| 1092 | 1092 | "weight": 3, |
| 1093 | 1093 | "opacity": 0.6 |
@@ -1097,15 +1097,15 @@ discard block |
||
| 1097 | 1097 | } else { |
| 1098 | 1098 | var style = { |
| 1099 | 1099 | <?php |
| 1100 | - if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1100 | + if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
|
| 1101 | 1101 | ?> |
| 1102 | 1102 | "color": "#1a3151", |
| 1103 | 1103 | <?php |
| 1104 | - } else { |
|
| 1104 | + } else { |
|
| 1105 | 1105 | ?> |
| 1106 | 1106 | "color": getAltitudeColor(altitude), |
| 1107 | 1107 | <?php |
| 1108 | - } |
|
| 1108 | + } |
|
| 1109 | 1109 | ?> |
| 1110 | 1110 | "weight": 2, |
| 1111 | 1111 | "opacity": 0.6 |
@@ -1115,21 +1115,21 @@ discard block |
||
| 1115 | 1115 | } |
| 1116 | 1116 | } |
| 1117 | 1117 | <?php |
| 1118 | - } else { |
|
| 1119 | - ?> |
|
| 1118 | + } else { |
|
| 1119 | + ?> |
|
| 1120 | 1120 | if (map.getZoom() > 7) { |
| 1121 | 1121 | var style = { |
| 1122 | 1122 | <?php |
| 1123 | 1123 | if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
| 1124 | - ?> |
|
| 1124 | + ?> |
|
| 1125 | 1125 | "color": "#1a3151", |
| 1126 | 1126 | <?php |
| 1127 | 1127 | } else { |
| 1128 | - ?> |
|
| 1128 | + ?> |
|
| 1129 | 1129 | "color": getAltitudeColor(altitude), |
| 1130 | 1130 | <?php |
| 1131 | 1131 | } |
| 1132 | - ?> |
|
| 1132 | + ?> |
|
| 1133 | 1133 | "weight": 3, |
| 1134 | 1134 | "opacity": 0.6 |
| 1135 | 1135 | }; |
@@ -1139,15 +1139,15 @@ discard block |
||
| 1139 | 1139 | var style = { |
| 1140 | 1140 | <?php |
| 1141 | 1141 | if (isset($globalMapAltitudeColor) && !$globalMapAltitudeColor) { |
| 1142 | - ?> |
|
| 1142 | + ?> |
|
| 1143 | 1143 | "color": "#1a3151", |
| 1144 | 1144 | <?php |
| 1145 | 1145 | } else { |
| 1146 | - ?> |
|
| 1146 | + ?> |
|
| 1147 | 1147 | "color": getAltitudeColor(altitude), |
| 1148 | 1148 | <?php |
| 1149 | 1149 | } |
| 1150 | - ?> |
|
| 1150 | + ?> |
|
| 1151 | 1151 | "weight": 2, |
| 1152 | 1152 | "opacity": 0.6 |
| 1153 | 1153 | }; |
@@ -1155,7 +1155,7 @@ discard block |
||
| 1155 | 1155 | layer_data.addLayer(layer); |
| 1156 | 1156 | } |
| 1157 | 1157 | <?php |
| 1158 | - } |
|
| 1158 | + } |
|
| 1159 | 1159 | ?> |
| 1160 | 1160 | } |
| 1161 | 1161 | } |
@@ -1220,10 +1220,10 @@ discard block |
||
| 1220 | 1220 | |
| 1221 | 1221 | |
| 1222 | 1222 | <?php |
| 1223 | - // Add support for custom json via $globalMapJson |
|
| 1224 | - if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
| 1223 | + // Add support for custom json via $globalMapJson |
|
| 1224 | + if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
| 1225 | 1225 | foreach ($globalMapJson as $json) { |
| 1226 | - if (isset($json['url'])) { |
|
| 1226 | + if (isset($json['url'])) { |
|
| 1227 | 1227 | ?> |
| 1228 | 1228 | update_genLayer('<?php print $json['url']; ?>'); |
| 1229 | 1229 | <?php |
@@ -1232,9 +1232,9 @@ discard block |
||
| 1232 | 1232 | setInterval(function(){update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>); |
| 1233 | 1233 | <?php |
| 1234 | 1234 | } |
| 1235 | - } |
|
| 1235 | + } |
|
| 1236 | + } |
|
| 1236 | 1237 | } |
| 1237 | - } |
|
| 1238 | 1238 | |
| 1239 | 1239 | ?> |
| 1240 | 1240 | |