@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
55 | 55 | |
56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | function drawChart() { |
63 | 63 | var data = google.visualization.arrayToDataTable([ |
64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
65 | - $country_data = ''; |
|
65 | + $country_data = ''; |
|
66 | 66 | foreach($airport_country_array as $airport_item) |
67 | 67 | { |
68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | |
56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | var data = google.visualization.arrayToDataTable([ |
64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
65 | 65 | $country_data = ''; |
66 | - foreach($airport_country_array as $airport_item) |
|
66 | + foreach ($airport_country_array as $airport_item) |
|
67 | 67 | { |
68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
69 | 69 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | print '</thead>'; |
98 | 98 | print '<tbody>'; |
99 | 99 | $i = 1; |
100 | - foreach($airport_country_array as $airport_item) |
|
100 | + foreach ($airport_country_array as $airport_item) |
|
101 | 101 | { |
102 | 102 | print '<tr>'; |
103 | 103 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | <footer class="container"> |
4 | 4 | <?php |
5 | - if (isset($sql_time)) { |
|
5 | + if (isset($sql_time)) { |
|
6 | 6 | ?> |
7 | 7 | <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
8 | 8 | <br /> |
9 | 9 | <?php |
10 | - } |
|
10 | + } |
|
11 | 11 | ?> |
12 | 12 | <span>Developed in Barrie by <a href="http://www.mariotrunz.com" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
13 | 13 | </footer> |
@@ -4,7 +4,7 @@ |
||
4 | 4 | <?php |
5 | 5 | if (isset($sql_time)) { |
6 | 6 | ?> |
7 | - <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
|
7 | + <i><?php echo _("Page generated in").' '.round($sql_time + $page_time, 2); ?>s (<?php print round($page_time, 2); ?>ms PHP - <?php print round($sql_time, 2); ?>ms SQL)</i> |
|
8 | 8 | <br /> |
9 | 9 | <?php |
10 | 10 | } |
@@ -9,7 +9,10 @@ |
||
9 | 9 | <?php |
10 | 10 | } |
11 | 11 | ?> |
12 | - <span>Developed in Barrie by <a href="http://www.mariotrunz.com" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
12 | + <span>Developed in Barrie by <a href="http://www.mariotrunz.com" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) { |
|
13 | + print $globalURL; |
|
14 | +} |
|
15 | +?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
13 | 16 | </footer> |
14 | 17 | |
15 | 18 | <div class="notifications bottom-left"></div> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | $page_url = $globalURL.'/tools-acars'; |
10 | 10 | |
11 | -$message = filter_input(INPUT_POST,'acars_message',FILTER_SANITIZE_STRING); |
|
11 | +$message = filter_input(INPUT_POST, 'acars_message', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | print '<div class="info column">'; |
14 | 14 | print '<h1>'._("Parse ACARS messages").'</h1>'; |
@@ -21,7 +21,9 @@ |
||
21 | 21 | print '<fieldset class="form-group">'; |
22 | 22 | print '<label for="acars_message">'._("ACARS Message").'</label>'; |
23 | 23 | print '<textarea class="form-control" name="acars_message" id="acars_message" rows="5">'; |
24 | -if ($message != '') print $message; |
|
24 | +if ($message != '') { |
|
25 | + print $message; |
|
26 | +} |
|
25 | 27 | print '</textarea>'; |
26 | 28 | print '</fieldset>'; |
27 | 29 | print '<button type="submit" class="btn btn-primary">Submit</button>'; |
@@ -4,12 +4,12 @@ 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 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
8 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
9 | 9 | |
10 | 10 | if (!empty($spotter_array)) |
11 | 11 | { |
12 | - $title = sprintf(_("Most Common Departure Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | + $title = sprintf(_("Most Common Departure Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | 13 | |
14 | 14 | require_once('header.php'); |
15 | 15 | print '<div class="select-item">'; |
@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | print '</div>'; |
22 | 22 | |
23 | 23 | print '<div class="info column">'; |
24 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
24 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
25 | 25 | print '</div>'; |
26 | 26 | |
27 | 27 | include('date-sub-menu.php'); |
28 | 28 | print '<div class="column">'; |
29 | 29 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
30 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
30 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
31 | 31 | |
32 | 32 | $airport_airport_array = $Spotter->countAllDepartureAirportsByDate($_GET['date']); |
33 | 33 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ["'._("Airport").'", "'._("# of times").'"],'; |
44 | 44 | |
45 | 45 | $airport_data = ''; |
46 | - foreach($airport_airport_array as $airport_item) |
|
46 | + foreach ($airport_airport_array as $airport_item) |
|
47 | 47 | { |
48 | 48 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
49 | 49 | $name = str_replace("'", "", $name); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | print '</thead>'; |
83 | 83 | print '<tbody>'; |
84 | 84 | $i = 1; |
85 | - foreach($airport_airport_array as $airport_item) |
|
85 | + foreach ($airport_airport_array as $airport_item) |
|
86 | 86 | { |
87 | 87 | print '<tr>'; |
88 | 88 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airline'])) { |
6 | - header('Location: '.$globalURL.'/airline'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airline'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | function drawChart() { |
70 | 70 | var data = google.visualization.arrayToDataTable([ |
71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
72 | - $country_data = ''; |
|
72 | + $country_data = ''; |
|
73 | 73 | foreach($airport_country_array as $airport_item) |
74 | 74 | { |
75 | 75 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airline'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
20 | 20 | print '<option></option>'; |
21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
22 | - foreach($airline_names as $airline_name) |
|
22 | + foreach ($airline_names as $airline_name) |
|
23 | 23 | { |
24 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
24 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
25 | 25 | { |
26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | include('airline-sub-menu.php'); |
60 | 60 | print '<div class="column">'; |
61 | 61 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
62 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
62 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
63 | 63 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirline($airline); |
64 | 64 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
65 | 65 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | var data = google.visualization.arrayToDataTable([ |
71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
72 | 72 | $country_data = ''; |
73 | - foreach($airport_country_array as $airport_item) |
|
73 | + foreach ($airport_country_array as $airport_item) |
|
74 | 74 | { |
75 | 75 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
76 | 76 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | print '</thead>'; |
105 | 105 | print '<tbody>'; |
106 | 106 | $i = 1; |
107 | - foreach($airport_country_array as $airport_item) |
|
107 | + foreach ($airport_country_array as $airport_item) |
|
108 | 108 | { |
109 | 109 | print '<tr>'; |
110 | 110 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -40,8 +40,7 @@ |
||
40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
41 | 41 | { |
42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
43 | - } |
|
44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
45 | 44 | { |
46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
47 | 46 | } |
@@ -4,55 +4,55 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | if (isset($_GET['start_date'])) { |
7 | - //for the date manipulation into the query |
|
8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
9 | - $start_date = $_GET['start_date'].":00"; |
|
10 | - $end_date = $_GET['end_date'].":00"; |
|
11 | - $sql_date = $start_date.",".$end_date; |
|
12 | - } else if($_GET['start_date'] != ""){ |
|
13 | - $start_date = $_GET['start_date'].":00"; |
|
14 | - $sql_date = $start_date; |
|
15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
16 | - $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
17 | - $sql_date = $end_date; |
|
18 | - } else $sql_date = ''; |
|
7 | + //for the date manipulation into the query |
|
8 | + if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
9 | + $start_date = $_GET['start_date'].":00"; |
|
10 | + $end_date = $_GET['end_date'].":00"; |
|
11 | + $sql_date = $start_date.",".$end_date; |
|
12 | + } else if($_GET['start_date'] != ""){ |
|
13 | + $start_date = $_GET['start_date'].":00"; |
|
14 | + $sql_date = $start_date; |
|
15 | + } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
16 | + $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
17 | + $sql_date = $end_date; |
|
18 | + } else $sql_date = ''; |
|
19 | 19 | } else $sql_date = ''; |
20 | 20 | |
21 | 21 | if (isset($_GET['highest_altitude'])) { |
22 | - //for altitude manipulation |
|
23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
24 | - $end_altitude = $_GET['highest_altitude']; |
|
25 | - $start_altitude = $_GET['lowest_altitude']; |
|
26 | - $sql_altitude = $start_altitude.",".$end_altitude; |
|
27 | - } else if($_GET['highest_altitude'] != ""){ |
|
28 | - $end_altitude = $_GET['highest_altitude']; |
|
29 | - $sql_altitude = $end_altitude; |
|
30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
31 | - $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
32 | - $sql_altitude = $start_altitude; |
|
33 | - } else $sql_altitude = ''; |
|
22 | + //for altitude manipulation |
|
23 | + if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
24 | + $end_altitude = $_GET['highest_altitude']; |
|
25 | + $start_altitude = $_GET['lowest_altitude']; |
|
26 | + $sql_altitude = $start_altitude.",".$end_altitude; |
|
27 | + } else if($_GET['highest_altitude'] != ""){ |
|
28 | + $end_altitude = $_GET['highest_altitude']; |
|
29 | + $sql_altitude = $end_altitude; |
|
30 | + } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
31 | + $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
32 | + $sql_altitude = $start_altitude; |
|
33 | + } else $sql_altitude = ''; |
|
34 | 34 | } else $sql_altitude = ''; |
35 | 35 | |
36 | 36 | //calculuation for the pagination |
37 | 37 | if(!isset($_GET['limit'])) |
38 | 38 | { |
39 | - if (!isset($_GET['number_results'])) |
|
40 | - { |
|
41 | - $limit_start = 0; |
|
42 | - $limit_end = 25; |
|
43 | - $absolute_difference = 25; |
|
44 | - } else { |
|
45 | - if ($_GET['number_results'] > 1000){ |
|
46 | - $_GET['number_results'] = 1000; |
|
47 | - } |
|
48 | - $limit_start = 0; |
|
49 | - $limit_end = $_GET['number_results']; |
|
50 | - $absolute_difference = $_GET['number_results']; |
|
51 | - } |
|
39 | + if (!isset($_GET['number_results'])) |
|
40 | + { |
|
41 | + $limit_start = 0; |
|
42 | + $limit_end = 25; |
|
43 | + $absolute_difference = 25; |
|
44 | + } else { |
|
45 | + if ($_GET['number_results'] > 1000){ |
|
46 | + $_GET['number_results'] = 1000; |
|
47 | + } |
|
48 | + $limit_start = 0; |
|
49 | + $limit_end = $_GET['number_results']; |
|
50 | + $absolute_difference = $_GET['number_results']; |
|
51 | + } |
|
52 | 52 | } else { |
53 | - $limit_explode = explode(",", $_GET['limit']); |
|
54 | - $limit_start = $limit_explode[0]; |
|
55 | - $limit_end = $limit_explode[1]; |
|
53 | + $limit_explode = explode(",", $_GET['limit']); |
|
54 | + $limit_start = $limit_explode[0]; |
|
55 | + $limit_end = $limit_explode[1]; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | $absolute_difference = abs($limit_start - $limit_end); |
@@ -89,56 +89,56 @@ discard block |
||
89 | 89 | |
90 | 90 | $output = '<?xml version="1.0" encoding="UTF-8" ?>'; |
91 | 91 | $output .= '<flightairmap>'; |
92 | - $output .= '<title>'.$globalName.' XML Feed</title>'; |
|
93 | - $output .= '<link>http://'.$_SERVER['HTTP_HOST'].$globalURL.'</link>'; |
|
94 | - $output .= '<aircrafts>'; |
|
92 | + $output .= '<title>'.$globalName.' XML Feed</title>'; |
|
93 | + $output .= '<link>http://'.$_SERVER['HTTP_HOST'].$globalURL.'</link>'; |
|
94 | + $output .= '<aircrafts>'; |
|
95 | 95 | |
96 | - if (!empty($spotter_array)) |
|
96 | + if (!empty($spotter_array)) |
|
97 | 97 | { |
98 | - foreach($spotter_array as $spotter_item) |
|
99 | - { |
|
98 | + foreach($spotter_array as $spotter_item) |
|
99 | + { |
|
100 | 100 | |
101 | - $output .= '<aircraft>'; |
|
102 | - $output .= '<id>'.$spotter_item['spotter_id'].'</id>'; |
|
103 | - $output .= '<ident>'.$spotter_item['ident'].'</ident>'; |
|
104 | - $output .= '<registration>'.$spotter_item['registration'].'</registration>'; |
|
105 | - $output .= '<aircraft_icao>'.$spotter_item['aircraft_type'].'</aircraft_icao>'; |
|
106 | - $output .= '<aircraft_name>'.$spotter_item['aircraft_name'].'</aircraft_name>'; |
|
107 | - $output .= '<aircraft_manufacturer>'.$spotter_item['aircraft_manufacturer'].'</aircraft_manufacturer>'; |
|
108 | - $output .= '<airline_name>'.$spotter_item['airline_name'].'</airline_name>'; |
|
109 | - $output .= '<airline_icao>'.$spotter_item['airline_icao'].'</airline_icao>'; |
|
101 | + $output .= '<aircraft>'; |
|
102 | + $output .= '<id>'.$spotter_item['spotter_id'].'</id>'; |
|
103 | + $output .= '<ident>'.$spotter_item['ident'].'</ident>'; |
|
104 | + $output .= '<registration>'.$spotter_item['registration'].'</registration>'; |
|
105 | + $output .= '<aircraft_icao>'.$spotter_item['aircraft_type'].'</aircraft_icao>'; |
|
106 | + $output .= '<aircraft_name>'.$spotter_item['aircraft_name'].'</aircraft_name>'; |
|
107 | + $output .= '<aircraft_manufacturer>'.$spotter_item['aircraft_manufacturer'].'</aircraft_manufacturer>'; |
|
108 | + $output .= '<airline_name>'.$spotter_item['airline_name'].'</airline_name>'; |
|
109 | + $output .= '<airline_icao>'.$spotter_item['airline_icao'].'</airline_icao>'; |
|
110 | 110 | if (isset($spotter_item['airline_iata'])) { |
111 | - $output .= '<airline_iata>'.$spotter_item['airline_iata'].'</airline_iata>'; |
|
112 | - } |
|
113 | - $output .= '<airline_country>'.$spotter_item['airline_country'].'</airline_country>'; |
|
114 | - if (isset($spotter_item['airline_callsign'])) { |
|
115 | - $output .= '<airline_callsign>'.$spotter_item['airline_callsign'].'</airline_callsign>'; |
|
116 | - } |
|
117 | - $output .= '<airline_type>'.$spotter_item['airline_type'].'</airline_type>'; |
|
118 | - $output .= '<departure_airport_city>'.$spotter_item['departure_airport_city'].'</departure_airport_city>'; |
|
119 | - $output .= '<departure_airport_country>'.$spotter_item['departure_airport_country'].'</departure_airport_country>'; |
|
120 | - $output .= '<departure_airport_iata>'.$spotter_item['departure_airport_iata'].'</departure_airport_iata>'; |
|
121 | - $output .= '<departure_airport_icao>'.$spotter_item['departure_airport_icao'].'</departure_airport_icao>'; |
|
122 | - $output .= '<departure_airport_latitude>'.$spotter_item['departure_airport_latitude'].'</departure_airport_latitude>'; |
|
123 | - $output .= '<departure_airport_longitude>'.$spotter_item['departure_airport_longitude'].'</departure_airport_longitude>'; |
|
124 | - $output .= '<departure_airport_altitude>'.$spotter_item['departure_airport_altitude'].'</departure_airport_altitude>'; |
|
125 | - $output .= '<arrival_airport_city>'.$spotter_item['arrival_airport_city'].'</arrival_airport_city>'; |
|
126 | - $output .= '<arrival_airport_country>'.$spotter_item['arrival_airport_country'].'</arrival_airport_country>'; |
|
127 | - $output .= '<arrival_airport_iata>'.$spotter_item['arrival_airport_iata'].'</arrival_airport_iata>'; |
|
128 | - $output .= '<arrival_airport_icao>'.$spotter_item['arrival_airport_icao'].'</arrival_airport_icao>'; |
|
129 | - $output .= '<arrival_airport_latitude>'.$spotter_item['arrival_airport_latitude'].'</arrival_airport_latitude>'; |
|
130 | - $output .= '<arrival_airport_longitude>'.$spotter_item['arrival_airport_longitude'].'</arrival_airport_longitude>'; |
|
131 | - $output .= '<arrival_airport_altitude>'.$spotter_item['arrival_airport_altitude'].'</arrival_airport_altitude>'; |
|
132 | - $output .= '<latitude>'.$spotter_item['latitude'].'</latitude>'; |
|
133 | - $output .= '<longitude>'.$spotter_item['longitude'].'</longitude>'; |
|
134 | - $output .= '<altitude>'.$spotter_item['altitude'].'</altitude>'; |
|
135 | - $output .= '<ground_speed>'.$spotter_item['ground_speed'].'</ground_speed>'; |
|
136 | - $output .= '<heading>'.$spotter_item['heading'].'</heading>'; |
|
137 | - $output .= '<heading_name>'.$spotter_item['heading_name'].'</heading_name>'; |
|
138 | - $output .= '<waypoints>'.$spotter_item['waypoints'].'</waypoints>'; |
|
139 | - $output .= '<date>'.date("c", strtotime($spotter_item['date_iso_8601'])).'</date>'; |
|
140 | - $output .= '</aircraft>'; |
|
141 | - } |
|
111 | + $output .= '<airline_iata>'.$spotter_item['airline_iata'].'</airline_iata>'; |
|
112 | + } |
|
113 | + $output .= '<airline_country>'.$spotter_item['airline_country'].'</airline_country>'; |
|
114 | + if (isset($spotter_item['airline_callsign'])) { |
|
115 | + $output .= '<airline_callsign>'.$spotter_item['airline_callsign'].'</airline_callsign>'; |
|
116 | + } |
|
117 | + $output .= '<airline_type>'.$spotter_item['airline_type'].'</airline_type>'; |
|
118 | + $output .= '<departure_airport_city>'.$spotter_item['departure_airport_city'].'</departure_airport_city>'; |
|
119 | + $output .= '<departure_airport_country>'.$spotter_item['departure_airport_country'].'</departure_airport_country>'; |
|
120 | + $output .= '<departure_airport_iata>'.$spotter_item['departure_airport_iata'].'</departure_airport_iata>'; |
|
121 | + $output .= '<departure_airport_icao>'.$spotter_item['departure_airport_icao'].'</departure_airport_icao>'; |
|
122 | + $output .= '<departure_airport_latitude>'.$spotter_item['departure_airport_latitude'].'</departure_airport_latitude>'; |
|
123 | + $output .= '<departure_airport_longitude>'.$spotter_item['departure_airport_longitude'].'</departure_airport_longitude>'; |
|
124 | + $output .= '<departure_airport_altitude>'.$spotter_item['departure_airport_altitude'].'</departure_airport_altitude>'; |
|
125 | + $output .= '<arrival_airport_city>'.$spotter_item['arrival_airport_city'].'</arrival_airport_city>'; |
|
126 | + $output .= '<arrival_airport_country>'.$spotter_item['arrival_airport_country'].'</arrival_airport_country>'; |
|
127 | + $output .= '<arrival_airport_iata>'.$spotter_item['arrival_airport_iata'].'</arrival_airport_iata>'; |
|
128 | + $output .= '<arrival_airport_icao>'.$spotter_item['arrival_airport_icao'].'</arrival_airport_icao>'; |
|
129 | + $output .= '<arrival_airport_latitude>'.$spotter_item['arrival_airport_latitude'].'</arrival_airport_latitude>'; |
|
130 | + $output .= '<arrival_airport_longitude>'.$spotter_item['arrival_airport_longitude'].'</arrival_airport_longitude>'; |
|
131 | + $output .= '<arrival_airport_altitude>'.$spotter_item['arrival_airport_altitude'].'</arrival_airport_altitude>'; |
|
132 | + $output .= '<latitude>'.$spotter_item['latitude'].'</latitude>'; |
|
133 | + $output .= '<longitude>'.$spotter_item['longitude'].'</longitude>'; |
|
134 | + $output .= '<altitude>'.$spotter_item['altitude'].'</altitude>'; |
|
135 | + $output .= '<ground_speed>'.$spotter_item['ground_speed'].'</ground_speed>'; |
|
136 | + $output .= '<heading>'.$spotter_item['heading'].'</heading>'; |
|
137 | + $output .= '<heading_name>'.$spotter_item['heading_name'].'</heading_name>'; |
|
138 | + $output .= '<waypoints>'.$spotter_item['waypoints'].'</waypoints>'; |
|
139 | + $output .= '<date>'.date("c", strtotime($spotter_item['date_iso_8601'])).'</date>'; |
|
140 | + $output .= '</aircraft>'; |
|
141 | + } |
|
142 | 142 | } |
143 | 143 | $output .= '</aircrafts>'; |
144 | 144 | $output .= '</flightairmap>'; |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | if (isset($_GET['start_date'])) { |
7 | 7 | //for the date manipulation into the query |
8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
8 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
9 | 9 | $start_date = $_GET['start_date'].":00"; |
10 | 10 | $end_date = $_GET['end_date'].":00"; |
11 | 11 | $sql_date = $start_date.",".$end_date; |
12 | - } else if($_GET['start_date'] != ""){ |
|
12 | + } else if ($_GET['start_date'] != "") { |
|
13 | 13 | $start_date = $_GET['start_date'].":00"; |
14 | 14 | $sql_date = $start_date; |
15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
15 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | 18 | } else $sql_date = ''; |
@@ -20,21 +20,21 @@ discard block |
||
20 | 20 | |
21 | 21 | if (isset($_GET['highest_altitude'])) { |
22 | 22 | //for altitude manipulation |
23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
23 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
24 | 24 | $end_altitude = $_GET['highest_altitude']; |
25 | 25 | $start_altitude = $_GET['lowest_altitude']; |
26 | 26 | $sql_altitude = $start_altitude.",".$end_altitude; |
27 | - } else if($_GET['highest_altitude'] != ""){ |
|
27 | + } else if ($_GET['highest_altitude'] != "") { |
|
28 | 28 | $end_altitude = $_GET['highest_altitude']; |
29 | 29 | $sql_altitude = $end_altitude; |
30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
30 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
31 | 31 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
32 | 32 | $sql_altitude = $start_altitude; |
33 | 33 | } else $sql_altitude = ''; |
34 | 34 | } else $sql_altitude = ''; |
35 | 35 | |
36 | 36 | //calculuation for the pagination |
37 | -if(!isset($_GET['limit'])) |
|
37 | +if (!isset($_GET['limit'])) |
|
38 | 38 | { |
39 | 39 | if (!isset($_GET['number_results'])) |
40 | 40 | { |
@@ -42,14 +42,14 @@ discard block |
||
42 | 42 | $limit_end = 25; |
43 | 43 | $absolute_difference = 25; |
44 | 44 | } else { |
45 | - if ($_GET['number_results'] > 1000){ |
|
45 | + if ($_GET['number_results'] > 1000) { |
|
46 | 46 | $_GET['number_results'] = 1000; |
47 | 47 | } |
48 | 48 | $limit_start = 0; |
49 | 49 | $limit_end = $_GET['number_results']; |
50 | 50 | $absolute_difference = $_GET['number_results']; |
51 | 51 | } |
52 | -} else { |
|
52 | +} else { |
|
53 | 53 | $limit_explode = explode(",", $_GET['limit']); |
54 | 54 | $limit_start = $limit_explode[0]; |
55 | 55 | $limit_end = $limit_explode[1]; |
@@ -69,23 +69,23 @@ discard block |
||
69 | 69 | |
70 | 70 | if (isset($_GET['sort'])) $sort = $_GET['sort']; |
71 | 71 | else $sort = ''; |
72 | -$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
|
73 | -$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
|
74 | -$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |
|
75 | -$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING); |
|
76 | -$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING); |
|
77 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
78 | -$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING); |
|
79 | -$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING); |
|
80 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
81 | -$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING); |
|
82 | -$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING); |
|
83 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
84 | -$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING); |
|
85 | -$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING); |
|
86 | -$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING); |
|
87 | -$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
88 | -$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,''); |
|
72 | +$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
73 | +$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING); |
|
74 | +$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
75 | +$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
76 | +$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
77 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
78 | +$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
79 | +$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
80 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
81 | +$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
82 | +$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
83 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
84 | +$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
85 | +$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
86 | +$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
87 | +$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
88 | +$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, ''); |
|
89 | 89 | |
90 | 90 | $output = '<?xml version="1.0" encoding="UTF-8" ?>'; |
91 | 91 | $output .= '<flightairmap>'; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | if (!empty($spotter_array)) |
97 | 97 | { |
98 | - foreach($spotter_array as $spotter_item) |
|
98 | + foreach ($spotter_array as $spotter_item) |
|
99 | 99 | { |
100 | 100 | |
101 | 101 | $output .= '<aircraft>'; |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -49,7 +57,7 @@ discard block |
||
49 | 57 | $limit_end = $_GET['number_results']; |
50 | 58 | $absolute_difference = $_GET['number_results']; |
51 | 59 | } |
52 | -} else { |
|
60 | +} else { |
|
53 | 61 | $limit_explode = explode(",", $_GET['limit']); |
54 | 62 | $limit_start = $limit_explode[0]; |
55 | 63 | $limit_end = $limit_explode[1]; |
@@ -67,8 +75,11 @@ discard block |
||
67 | 75 | |
68 | 76 | header('Content-Type: application/xml'); |
69 | 77 | |
70 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
71 | -else $sort = ''; |
|
78 | +if (isset($_GET['sort'])) { |
|
79 | + $sort = $_GET['sort']; |
|
80 | +} else { |
|
81 | + $sort = ''; |
|
82 | +} |
|
72 | 83 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
73 | 84 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
74 | 85 | $aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | var data = google.visualization.arrayToDataTable([ |
23 | 23 | ["'._("Country").'", "'._("# of times").'"], '; |
24 | 24 | $flightover_data = ''; |
25 | -foreach($flightover_array as $flightover_item) |
|
25 | +foreach ($flightover_array as $flightover_item) |
|
26 | 26 | { |
27 | 27 | $flightover_data .= '[ "'.$flightover_item['flight_country'].' ('.$flightover_item['flight_country_iso2'].')",'.$flightover_item['flight_count'].'],'; |
28 | 28 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | print '</thead>'; |
58 | 58 | print '<tbody>'; |
59 | 59 | $i = 1; |
60 | - foreach($flightover_array as $flightover_item) |
|
60 | + foreach ($flightover_array as $flightover_item) |
|
61 | 61 | { |
62 | 62 | print '<tr>'; |
63 | 63 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,10 +3,10 @@ discard block |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/aircraft/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | - <li><a href="<?php print $globalURL; ?>/aircraft/statistics/registration/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-statistics-registration"){ print 'class="active"'; } ?>><?php echo _("Registration"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/aircraft/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | + <li><a href="<?php print $globalURL; ?>/aircraft/statistics/registration/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-statistics-registration") { print 'class="active"'; } ?>><?php echo _("Registration"); ?></a></li> |
|
8 | 8 | <li class="dropdown"> |
9 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "aircraft-statistics-airline" || strtolower($current_page) == "aircraft-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "aircraft-statistics-airline" || strtolower($current_page) == "aircraft-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
10 | 10 | <?php echo _("Airline"); ?> <span class="caret"></span> |
11 | 11 | </a> |
12 | 12 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </ul> |
16 | 16 | </li> |
17 | 17 | <li class="dropdown"> |
18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "aircraft-statistics-departure-airport" || strtolower($current_page) == "aircraft-statistics-departure-airport-country" || strtolower($current_page) == "aircraft-statistics-arrival-airport" || strtolower($current_page) == "aircraft-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "aircraft-statistics-departure-airport" || strtolower($current_page) == "aircraft-statistics-departure-airport-country" || strtolower($current_page) == "aircraft-statistics-arrival-airport" || strtolower($current_page) == "aircraft-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
19 | 19 | <?php echo _("Airport"); ?> <span class="caret"></span> |
20 | 20 | </a> |
21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <li><a href="<?php print $globalURL; ?>/aircraft/statistics/arrival-airport-country/<?php print $_GET['aircraft_type']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
26 | 26 | </ul> |
27 | 27 | </li> |
28 | - <li><a href="<?php print $globalURL; ?>/aircraft/statistics/route/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
29 | - <li><a href="<?php print $globalURL; ?>/aircraft/statistics/time/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-statistics-time"){ print 'class="active"'; } ?>><?php echo ("Time"); ?></a></li> |
|
28 | + <li><a href="<?php print $globalURL; ?>/aircraft/statistics/route/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
29 | + <li><a href="<?php print $globalURL; ?>/aircraft/statistics/time/<?php print $_GET['aircraft_type']; ?>" <?php if (strtolower($current_page) == "aircraft-statistics-time") { print 'class="active"'; } ?>><?php echo ("Time"); ?></a></li> |
|
30 | 30 | </ul> |
31 | 31 | </div> |
32 | 32 | \ No newline at end of file |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | $from_archive = false; |
11 | 11 | if (isset($_GET['ident'])) { |
12 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
13 | 13 | $spotter_array = $SpotterLive->getLastLiveSpotterDataByIdent($ident); |
14 | 14 | if (empty($spotter_array)) { |
15 | 15 | $from_archive = true; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | } |
18 | 18 | } |
19 | 19 | if (isset($_GET['flightaware_id'])) { |
20 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
20 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
21 | 21 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
22 | 22 | if (empty($spotter_array)) { |
23 | 23 | $from_archive = true; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
34 | 34 | { |
35 | 35 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
36 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
36 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
37 | 37 | } else $image = $spotter_item['image_thumbnail']; |
38 | 38 | |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
52 | 52 | if (isset($spotter_item['departure_airport_time'])) { |
53 | 53 | if ($spotter_item['departure_airport_time'] > 2460) { |
54 | - print '<br /><span class="time">'.date('H:m',$spotter_item['departure_airport_time']).'</span>'; |
|
54 | + print '<br /><span class="time">'.date('H:m', $spotter_item['departure_airport_time']).'</span>'; |
|
55 | 55 | } else { |
56 | 56 | print '<br /><span class="time">'.$spotter_item['departure_airport_time'].'</span>'; |
57 | 57 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | print '<span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport'].'</a></span>'.$spotter_item['arrival_airport_city'].' '.$spotter_item['arrival_airport_country']; |
61 | 61 | if (isset($spotter_item['arrival_airport_time'])) { |
62 | 62 | if ($spotter_item['arrival_airport_time'] > 2460) { |
63 | - print '<br /><span class="time">'.date('H:m',$spotter_item['arrival_airport_time']).'</span>'; |
|
63 | + print '<br /><span class="time">'.date('H:m', $spotter_item['arrival_airport_time']).'</span>'; |
|
64 | 64 | } else { |
65 | 65 | print '<br /><span class="time">'.$spotter_item['arrival_airport_time'].'</span>'; |
66 | 66 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | if (isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
125 | 125 | if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
126 | -if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
126 | +if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br/>', $spotter_item['acars']['message'])).'</div>'; |
|
127 | 127 | if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
128 | 128 | print '</div>'; |
129 | 129 | ?> |
@@ -34,7 +34,9 @@ discard block |
||
34 | 34 | { |
35 | 35 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
36 | 36 | $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
37 | - } else $image = $spotter_item['image_thumbnail']; |
|
37 | + } else { |
|
38 | + $image = $spotter_item['image_thumbnail']; |
|
39 | + } |
|
38 | 40 | |
39 | 41 | } |
40 | 42 | /* else { |
@@ -46,7 +48,9 @@ discard block |
||
46 | 48 | print '<div class="left"><img src="'.$image.'" alt="'.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].'" title="'.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' Image © '.$spotter_item['image_copyright'].'"/><br />Image © '.$spotter_item['image_copyright'].'</div>'; |
47 | 49 | } |
48 | 50 | print '<div class="right"><div class="callsign-details"><div class="callsign"><a href="'.$globalURL.'/redirect/'.$spotter_item['flightaware_id'].'" target="_blank">'.$spotter_item['ident'].'</a></div>'; |
49 | -if (isset($spotter_item['airline_name'])) print '<div class="airline">'.$spotter_item['airline_name'].'</div>'; |
|
51 | +if (isset($spotter_item['airline_name'])) { |
|
52 | + print '<div class="airline">'.$spotter_item['airline_name'].'</div>'; |
|
53 | +} |
|
50 | 54 | print '</div>'; |
51 | 55 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
52 | 56 | if (isset($spotter_item['departure_airport_time'])) { |
@@ -74,9 +78,14 @@ discard block |
||
74 | 78 | print '<span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport'].'</a></span>'.$spotter_item['arrival_airport_city'].' '.$spotter_item['arrival_airport_country']; |
75 | 79 | print '</div></div><div>'; |
76 | 80 | print '<span>'._("Aircraft").'</span>'; |
77 | -if (isset($spotter_item['aircraft_wiki'])) print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
|
78 | -if (isset($spotter_item['aircraft_type'])) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</a>'; |
|
79 | -else print $spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name']; |
|
81 | +if (isset($spotter_item['aircraft_wiki'])) { |
|
82 | + print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
|
83 | +} |
|
84 | +if (isset($spotter_item['aircraft_type'])) { |
|
85 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</a>'; |
|
86 | +} else { |
|
87 | + print $spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name']; |
|
88 | +} |
|
80 | 89 | print '</div>'; |
81 | 90 | print '<div><span>'._("Altitude").'</span>'; |
82 | 91 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
@@ -85,7 +94,9 @@ discard block |
||
85 | 94 | print round($spotter_item['altitude']*30.48).' m (FL'.$spotter_item['altitude'].')'; |
86 | 95 | } |
87 | 96 | print '</div>'; |
88 | -if (isset($spotter_item['registration']) && $spotter_item['registration'] != '') print '<div><span>'._("Registration").'</span><a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a></div>'; |
|
97 | +if (isset($spotter_item['registration']) && $spotter_item['registration'] != '') { |
|
98 | + print '<div><span>'._("Registration").'</span><a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a></div>'; |
|
99 | +} |
|
89 | 100 | print '<div><span>'._("Speed").'</span>'; |
90 | 101 | if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
91 | 102 | print round($spotter_item['ground_speed']*1.15078).' mph'; |
@@ -99,8 +110,11 @@ discard block |
||
99 | 110 | print '<div><span>'._("Heading").'</span>'.$spotter_item['heading'].'°</div>'; |
100 | 111 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != '') { |
101 | 112 | print '<div><span>'._("Pilot").'</span>'; |
102 | - if (isset($spotter_item['pilot_id'])) print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
103 | - else print $spotter_item['pilot_name']; |
|
113 | + if (isset($spotter_item['pilot_id'])) { |
|
114 | + print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
115 | + } else { |
|
116 | + print $spotter_item['pilot_name']; |
|
117 | + } |
|
104 | 118 | print '</div>'; |
105 | 119 | } |
106 | 120 | |
@@ -121,10 +135,18 @@ discard block |
||
121 | 135 | } |
122 | 136 | print '</div>'; |
123 | 137 | |
124 | -if (isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
|
125 | -if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
|
126 | -if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
127 | -if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
|
138 | +if (isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') { |
|
139 | + print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
|
140 | +} |
|
141 | +if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') { |
|
142 | + print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
|
143 | +} |
|
144 | +if (isset($spotter_item['acars']['message'])) { |
|
145 | + print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
146 | +} |
|
147 | +if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) { |
|
148 | + print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
|
149 | +} |
|
128 | 150 | print '</div>'; |
129 | 151 | ?> |
130 | 152 | </div> |