@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -if (!isset($_GET['aircraft_manufacturer'])){ |
|
6 | +if (!isset($_GET['aircraft_manufacturer'])) { |
|
7 | 7 | header('Location: '.$globalURL.''); |
8 | 8 | } else { |
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]; |
@@ -26,19 +26,19 @@ discard block |
||
26 | 26 | $limit_previous_1 = $limit_start - $absolute_difference; |
27 | 27 | $limit_previous_2 = $limit_end - $absolute_difference; |
28 | 28 | |
29 | - $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
30 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
29 | + $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
30 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
31 | 31 | $page_url = $globalURL.'/manufacturer/'.$GET['aircraft_manufacturer']; |
32 | 32 | |
33 | 33 | if (isset($_GET['sort'])) { |
34 | - $spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,$limit_start.",".$absolute_difference, $sort); |
|
34 | + $spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, $limit_start.",".$absolute_difference, $sort); |
|
35 | 35 | } else { |
36 | - $spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,$limit_start.",".$absolute_difference, ''); |
|
36 | + $spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, $limit_start.",".$absolute_difference, ''); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | if (!empty($spotter_array)) |
40 | 40 | { |
41 | - $title = sprintf(_("Detailed View for %s"),$manufacturer); |
|
41 | + $title = sprintf(_("Detailed View for %s"), $manufacturer); |
|
42 | 42 | |
43 | 43 | require_once('header.php'); |
44 | 44 | print '<div class="select-item">'; |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
47 | 47 | print '<option></option>'; |
48 | 48 | $all_manufacturers = $Spotter->getAllManufacturers(); |
49 | - foreach($all_manufacturers as $all_manufacturer) |
|
49 | + foreach ($all_manufacturers as $all_manufacturer) |
|
50 | 50 | { |
51 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
51 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
52 | 52 | { |
53 | 53 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
54 | 54 | } else { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | print '</div>'; |
66 | 66 | |
67 | 67 | print '<div class="table column">'; |
68 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong."),$manufacturer).'</p>'; |
|
68 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong."), $manufacturer).'</p>'; |
|
69 | 69 | |
70 | 70 | include('manufacturer-sub-menu.php'); |
71 | 71 | include('table-output.php'); |
@@ -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]; |
@@ -4,13 +4,13 @@ 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 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
8 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
9 | 9 | else $spotter_array = ''; |
10 | 10 | |
11 | 11 | if (!empty($spotter_array)) |
12 | 12 | { |
13 | - $title = sprintf(_("Most Common Airlines on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | + $title = sprintf(_("Most Common Airlines on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
14 | 14 | |
15 | 15 | require_once('header.php'); |
16 | 16 | print '<div class="select-item">'; |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | print '</div>'; |
23 | 23 | |
24 | 24 | print '<div class="info column">'; |
25 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
25 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
26 | 26 | print '</div>'; |
27 | 27 | |
28 | 28 | include('date-sub-menu.php'); |
29 | 29 | print '<div class="column">'; |
30 | 30 | print '<h2>'._("Most Common Airlines").'</h2>'; |
31 | - 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>'; |
|
31 | + 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>'; |
|
32 | 32 | |
33 | 33 | $airline_array = $Spotter->countAllAirlinesByDate($_GET['date']); |
34 | 34 | if (!empty($airline_array)) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | print '</thead>'; |
46 | 46 | print '<tbody>'; |
47 | 47 | $i = 1; |
48 | - foreach($airline_array as $airline_item) |
|
48 | + foreach ($airline_array as $airline_item) |
|
49 | 49 | { |
50 | 50 | print '<tr>'; |
51 | 51 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,8 +5,11 @@ |
||
5 | 5 | |
6 | 6 | $Spotter = new Spotter(); |
7 | 7 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
8 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
9 | -else $spotter_array = ''; |
|
8 | +if (isset($_GET['date'])) { |
|
9 | + $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
10 | +} else { |
|
11 | + $spotter_array = ''; |
|
12 | +} |
|
10 | 13 | |
11 | 14 | if (!empty($spotter_array)) |
12 | 15 | { |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
8 | 8 | |
9 | 9 | if (!empty($spotter_array)) |
10 | 10 | { |
11 | - $title = sprintf(_("Most Common Arrival Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
11 | + $title = sprintf(_("Most Common Arrival Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | 12 | require_once('header.php'); |
13 | 13 | print '<div class="select-item">'; |
14 | 14 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | print '</form>'; |
19 | 19 | print '</div>'; |
20 | 20 | print '<div class="info column">'; |
21 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
21 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
22 | 22 | print '</div>'; |
23 | 23 | |
24 | 24 | include('date-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
28 | 28 | |
29 | 29 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByDate($_GET['date']); |
30 | 30 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ["'._("Country").'", "'._("# of times").'"], '; |
38 | 38 | |
39 | 39 | $country_data = ''; |
40 | - foreach($airport_country_array as $airport_item) |
|
40 | + foreach ($airport_country_array as $airport_item) |
|
41 | 41 | { |
42 | 42 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
43 | 43 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | print '</thead>'; |
72 | 72 | print '<tbody>'; |
73 | 73 | $i = 1; |
74 | - foreach($airport_country_array as $airport_item) |
|
74 | + foreach ($airport_country_array as $airport_item) |
|
75 | 75 | { |
76 | 76 | print '<tr>'; |
77 | 77 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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']) || $_GET['limit'] == "") |
|
10 | +if (!isset($_GET['limit']) || $_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]; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | print '<div class="table column">'; |
40 | 40 | print '<p>'._("The table below shows the detailed information of all custom selected flights who have special aspects to it, such as unique liveries, destinations etc.").'</p>'; |
41 | 41 | |
42 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
42 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
43 | 43 | if (isset($_GET['sort'])) { |
44 | 44 | $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference, $sort); |
45 | 45 | } 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]; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['aircraft_manufacturer'])) { |
6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
10 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("'Most Common Departure Airports by Country from %s"),$manufacturer); |
|
16 | + $title = sprintf(_("'Most Common Departure Airports by Country from %s"), $manufacturer); |
|
17 | 17 | |
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
22 | 22 | print '<option></option>'; |
23 | 23 | $all_manufacturers = $Spotter->getAllManufacturers(); |
24 | - foreach($all_manufacturers as $all_manufacturer) |
|
24 | + foreach ($all_manufacturers as $all_manufacturer) |
|
25 | 25 | { |
26 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
26 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
27 | 27 | { |
28 | 28 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
29 | 29 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | include('manufacturer-sub-menu.php'); |
43 | 43 | print '<div class="column">'; |
44 | 44 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
45 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
45 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
46 | 46 | |
47 | 47 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByManufacturer($manufacturer); |
48 | 48 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ["'._("Country").'", "'._("# of times").'"], '; |
56 | 56 | |
57 | 57 | $country_data = ''; |
58 | - foreach($airport_country_array as $airport_item) |
|
58 | + foreach ($airport_country_array as $airport_item) |
|
59 | 59 | { |
60 | 60 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
61 | 61 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | print '</thead>'; |
90 | 90 | print '<tbody>'; |
91 | 91 | $i = 1; |
92 | - foreach($airport_country_array as $airport_item) |
|
92 | + foreach ($airport_country_array as $airport_item) |
|
93 | 93 | { |
94 | 94 | print '<tr>'; |
95 | 95 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
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(); |
@@ -6,13 +6,13 @@ 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 Aircraft by Registration from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | |
18 | 18 | print '<div class="select-item">'; |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
21 | 21 | print '<option></option>'; |
22 | 22 | $airline_names = $Spotter->getAllAirlineNames(); |
23 | - foreach($airline_names as $airline_name) |
|
23 | + foreach ($airline_names as $airline_name) |
|
24 | 24 | { |
25 | - if($airline == $airline_name['airline_icao']) |
|
25 | + if ($airline == $airline_name['airline_icao']) |
|
26 | 26 | { |
27 | 27 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
28 | 28 | } else { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | include('airline-sub-menu.php'); |
61 | 61 | print '<div class="column">'; |
62 | 62 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
63 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by their registration of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
63 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by their registration of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
64 | 64 | |
65 | 65 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirline($airline); |
66 | 66 | if (!empty($aircraft_array)) |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | print '</thead>'; |
78 | 78 | print '<tbody>'; |
79 | 79 | $i = 1; |
80 | - foreach($aircraft_array as $aircraft_item) |
|
80 | + foreach ($aircraft_array as $aircraft_item) |
|
81 | 81 | { |
82 | 82 | print '<tr>'; |
83 | 83 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -41,8 +41,7 @@ |
||
41 | 41 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
42 | 42 | { |
43 | 43 | 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" />'; |
44 | - } |
|
45 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
44 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
46 | 45 | { |
47 | 46 | 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" />'; |
48 | 47 | } |
@@ -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 = 28; |
14 | 14 | $absolute_difference = 28; |
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]; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | print '<div class="column">'; |
40 | 40 | print '<p>'._("The view below shows all aircrafts that have been selected to have some sort of special characteristic about them, such as unique liveries, destinations etc.").'</p>'; |
41 | 41 | |
42 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
42 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
43 | 43 | if (isset($_GET['sort'])) { |
44 | 44 | $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference, $sort); |
45 | 45 | } else { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | if (!empty($spotter_array)) |
49 | 49 | { |
50 | 50 | print '<div class="dispay-view">'; |
51 | - foreach($spotter_array as $spotter_item) |
|
51 | + foreach ($spotter_array as $spotter_item) |
|
52 | 52 | { |
53 | 53 | if (isset($spotter_item['image']) && $spotter_item['image'] != "") |
54 | 54 | { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $limit_start = 0; |
13 | 13 | $limit_end = 28; |
14 | 14 | $absolute_difference = 28; |
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]; |
@@ -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); |
@@ -90,22 +90,22 @@ discard block |
||
90 | 90 | |
91 | 91 | $output = '<?xml version="1.0" encoding="UTF-8"?>'; |
92 | 92 | $output .= '<kml xmlns="http://www.opengis.net/kml/2.2">'; |
93 | - $output .= '<Document>'; |
|
94 | - $output .= '<Style id="departureAirport">'; |
|
95 | - $output .= '<IconStyle>'; |
|
96 | - $output .= '<Icon>'; |
|
97 | - $output .= '<href>http://www.flightairmap.fr/images/kml_departure_airport.png</href>'; |
|
98 | - $output .= '</Icon>'; |
|
99 | - $output .= '</IconStyle>'; |
|
100 | - $output .= '</Style>'; |
|
101 | - $output .= '<Style id="arrivalAirport">'; |
|
102 | - $output .= '<IconStyle>'; |
|
103 | - $output .= '<Icon>'; |
|
104 | - $output .= '<href>http://www.flightairmap.fr/images/kml_arrival_airport.png</href>'; |
|
105 | - $output .= '</Icon>'; |
|
106 | - $output .= '</IconStyle>'; |
|
107 | - $output .= '</Style>'; |
|
108 | - $output .= '<Style id="route">'; |
|
93 | + $output .= '<Document>'; |
|
94 | + $output .= '<Style id="departureAirport">'; |
|
95 | + $output .= '<IconStyle>'; |
|
96 | + $output .= '<Icon>'; |
|
97 | + $output .= '<href>http://www.flightairmap.fr/images/kml_departure_airport.png</href>'; |
|
98 | + $output .= '</Icon>'; |
|
99 | + $output .= '</IconStyle>'; |
|
100 | + $output .= '</Style>'; |
|
101 | + $output .= '<Style id="arrivalAirport">'; |
|
102 | + $output .= '<IconStyle>'; |
|
103 | + $output .= '<Icon>'; |
|
104 | + $output .= '<href>http://www.flightairmap.fr/images/kml_arrival_airport.png</href>'; |
|
105 | + $output .= '</Icon>'; |
|
106 | + $output .= '</IconStyle>'; |
|
107 | + $output .= '</Style>'; |
|
108 | + $output .= '<Style id="route">'; |
|
109 | 109 | $output .= '<LineStyle>'; |
110 | 110 | $output .= '<color>7f0000ff</color>'; |
111 | 111 | $output .= '<width>2</width>'; |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | $output .= '</LineStyle>'; |
114 | 114 | $output .= '</Style>'; |
115 | 115 | |
116 | - if (!empty($spotter_array)) |
|
116 | + if (!empty($spotter_array)) |
|
117 | 117 | { |
118 | - foreach($spotter_array as $spotter_item) |
|
119 | - { |
|
118 | + foreach($spotter_array as $spotter_item) |
|
119 | + { |
|
120 | 120 | |
121 | 121 | |
122 | 122 | $altitude = $spotter_item['altitude'].'00'; |
@@ -127,12 +127,12 @@ discard block |
||
127 | 127 | $output .= '<styleUrl>#route</styleUrl>'; |
128 | 128 | $output .= '<LineString>'; |
129 | 129 | $output .= '<coordinates>'; |
130 | - $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
|
130 | + $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
|
131 | 131 | $waypoint_pieces = array_chunk($waypoint_pieces, 2); |
132 | 132 | |
133 | 133 | foreach ($waypoint_pieces as $waypoint_coordinate) |
134 | 134 | { |
135 | - $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
135 | + $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
136 | 136 | |
137 | 137 | } |
138 | 138 | $output .= '</coordinates>'; |
@@ -144,38 +144,38 @@ discard block |
||
144 | 144 | //departure airport |
145 | 145 | $output .= '<Placemark>'; |
146 | 146 | $output .= '<name>'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].')</name>'; |
147 | - $output .= '<description><![CDATA[ '; |
|
148 | - $output .= '<div class="ge-balloon">'; |
|
149 | - $output .= '<div class="ge-row">'; |
|
150 | - $output .= '<span>Name</span>'; |
|
151 | - $output .= $spotter_item['departure_airport_name']; |
|
152 | - $output .= '</div>'; |
|
153 | - $output .= '<div class="ge-row">'; |
|
154 | - $output .= '<span>City</span>'; |
|
155 | - $output .= $spotter_item['departure_airport_city']; |
|
156 | - $output .= '</div>'; |
|
157 | - $output .= '<div class="ge-row">'; |
|
158 | - $output .= '<span>Country</span>'; |
|
159 | - $output .= $spotter_item['departure_airport_country']; |
|
160 | - $output .= '</div>'; |
|
161 | - $output .= '<div class="ge-row">'; |
|
162 | - $output .= '<span>ICAO</span>'; |
|
163 | - $output .= $spotter_item['departure_airport_icao']; |
|
164 | - $output .= '</div>'; |
|
165 | - $output .= '<div class="ge-row">'; |
|
166 | - $output .= '<span>IATA</span>'; |
|
167 | - $output .= $spotter_item['departure_airport_iata']; |
|
168 | - $output .= '</div>'; |
|
169 | - $output .= '<div class="ge-row">'; |
|
170 | - $output .= '<span>Coordinates</span>'; |
|
171 | - $output .= $spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_longitude']; |
|
172 | - $output .= '</div>'; |
|
173 | - $output .= '<div class="ge-row">'; |
|
174 | - $output .= '<span>Altitude</span>'; |
|
175 | - $output .= $spotter_item['departure_airport_altitude']; |
|
176 | - $output .= '</div>'; |
|
177 | - $output .= '</div>'; |
|
178 | - $output .= ' ]]></description>'; |
|
147 | + $output .= '<description><![CDATA[ '; |
|
148 | + $output .= '<div class="ge-balloon">'; |
|
149 | + $output .= '<div class="ge-row">'; |
|
150 | + $output .= '<span>Name</span>'; |
|
151 | + $output .= $spotter_item['departure_airport_name']; |
|
152 | + $output .= '</div>'; |
|
153 | + $output .= '<div class="ge-row">'; |
|
154 | + $output .= '<span>City</span>'; |
|
155 | + $output .= $spotter_item['departure_airport_city']; |
|
156 | + $output .= '</div>'; |
|
157 | + $output .= '<div class="ge-row">'; |
|
158 | + $output .= '<span>Country</span>'; |
|
159 | + $output .= $spotter_item['departure_airport_country']; |
|
160 | + $output .= '</div>'; |
|
161 | + $output .= '<div class="ge-row">'; |
|
162 | + $output .= '<span>ICAO</span>'; |
|
163 | + $output .= $spotter_item['departure_airport_icao']; |
|
164 | + $output .= '</div>'; |
|
165 | + $output .= '<div class="ge-row">'; |
|
166 | + $output .= '<span>IATA</span>'; |
|
167 | + $output .= $spotter_item['departure_airport_iata']; |
|
168 | + $output .= '</div>'; |
|
169 | + $output .= '<div class="ge-row">'; |
|
170 | + $output .= '<span>Coordinates</span>'; |
|
171 | + $output .= $spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_longitude']; |
|
172 | + $output .= '</div>'; |
|
173 | + $output .= '<div class="ge-row">'; |
|
174 | + $output .= '<span>Altitude</span>'; |
|
175 | + $output .= $spotter_item['departure_airport_altitude']; |
|
176 | + $output .= '</div>'; |
|
177 | + $output .= '</div>'; |
|
178 | + $output .= ' ]]></description>'; |
|
179 | 179 | $output .= '<styleUrl>#departureAirport</styleUrl>'; |
180 | 180 | $output .= '<Point>'; |
181 | 181 | $output .= '<coordinates>'.$spotter_item['departure_airport_longitude'].', '.$spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_altitude'].'</coordinates>'; |
@@ -186,38 +186,38 @@ discard block |
||
186 | 186 | //arrival airport |
187 | 187 | $output .= '<Placemark>'; |
188 | 188 | $output .= '<name>'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</name>'; |
189 | - $output .= '<description><![CDATA[ '; |
|
190 | - $output .= '<div class="ge-balloon">'; |
|
191 | - $output .= '<div class="ge-row">'; |
|
192 | - $output .= '<span>Name</span>'; |
|
193 | - $output .= $spotter_item['arrival_airport_name']; |
|
194 | - $output .= '</div>'; |
|
195 | - $output .= '<div class="ge-row">'; |
|
196 | - $output .= '<span>City</span>'; |
|
197 | - $output .= $spotter_item['arrival_airport_city']; |
|
198 | - $output .= '</div>'; |
|
199 | - $output .= '<div class="ge-row">'; |
|
200 | - $output .= '<span>Country</span>'; |
|
201 | - $output .= $spotter_item['arrival_airport_country']; |
|
202 | - $output .= '</div>'; |
|
203 | - $output .= '<div class="ge-row">'; |
|
204 | - $output .= '<span>ICAO</span>'; |
|
205 | - $output .= $spotter_item['arrival_airport_icao']; |
|
206 | - $output .= '</div>'; |
|
207 | - $output .= '<div class="ge-row">'; |
|
208 | - $output .= '<span>IATA</span>'; |
|
209 | - $output .= $spotter_item['arrival_airport_iata']; |
|
210 | - $output .= '</div>'; |
|
211 | - $output .= '<div class="ge-row">'; |
|
212 | - $output .= '<span>Coordinates</span>'; |
|
213 | - $output .= $spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_longitude']; |
|
214 | - $output .= '</div>'; |
|
215 | - $output .= '<div class="ge-row">'; |
|
216 | - $output .= '<span>Altitude</span>'; |
|
217 | - $output .= $spotter_item['arrival_airport_altitude']; |
|
218 | - $output .= '</div>'; |
|
219 | - $output .= '</div>'; |
|
220 | - $output .= ' ]]></description>'; |
|
189 | + $output .= '<description><![CDATA[ '; |
|
190 | + $output .= '<div class="ge-balloon">'; |
|
191 | + $output .= '<div class="ge-row">'; |
|
192 | + $output .= '<span>Name</span>'; |
|
193 | + $output .= $spotter_item['arrival_airport_name']; |
|
194 | + $output .= '</div>'; |
|
195 | + $output .= '<div class="ge-row">'; |
|
196 | + $output .= '<span>City</span>'; |
|
197 | + $output .= $spotter_item['arrival_airport_city']; |
|
198 | + $output .= '</div>'; |
|
199 | + $output .= '<div class="ge-row">'; |
|
200 | + $output .= '<span>Country</span>'; |
|
201 | + $output .= $spotter_item['arrival_airport_country']; |
|
202 | + $output .= '</div>'; |
|
203 | + $output .= '<div class="ge-row">'; |
|
204 | + $output .= '<span>ICAO</span>'; |
|
205 | + $output .= $spotter_item['arrival_airport_icao']; |
|
206 | + $output .= '</div>'; |
|
207 | + $output .= '<div class="ge-row">'; |
|
208 | + $output .= '<span>IATA</span>'; |
|
209 | + $output .= $spotter_item['arrival_airport_iata']; |
|
210 | + $output .= '</div>'; |
|
211 | + $output .= '<div class="ge-row">'; |
|
212 | + $output .= '<span>Coordinates</span>'; |
|
213 | + $output .= $spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_longitude']; |
|
214 | + $output .= '</div>'; |
|
215 | + $output .= '<div class="ge-row">'; |
|
216 | + $output .= '<span>Altitude</span>'; |
|
217 | + $output .= $spotter_item['arrival_airport_altitude']; |
|
218 | + $output .= '</div>'; |
|
219 | + $output .= '</div>'; |
|
220 | + $output .= ' ]]></description>'; |
|
221 | 221 | $output .= '<styleUrl>#arrivalAirport</styleUrl>'; |
222 | 222 | $output .= '<Point>'; |
223 | 223 | $output .= '<coordinates>'.$spotter_item['arrival_airport_longitude'].', '.$spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_altitude'].'</coordinates>'; |
@@ -230,41 +230,41 @@ discard block |
||
230 | 230 | $output .= '<Placemark>'; |
231 | 231 | $output .= '<name>'.$spotter_item['ident'].' - '.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'</name>'; |
232 | 232 | $output .= '<description><![CDATA[ '; |
233 | - $output .= '<div class="ge-balloon">'; |
|
234 | - if ($spotter_item['image_thumbnail'] != "") |
|
235 | - { |
|
236 | - $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click on image to see Flight profile" title="Click on image to see Flight profile" class="ge-image" /></a>'; |
|
237 | - } |
|
238 | - $output .= '<div class="ge-row">'; |
|
239 | - $output .= '<span>Ident</span>'; |
|
240 | - $output .= '<a href="'.$globalURL.'/ident/'.$spotter_item['ident'].'" target="_blank">'.$spotter_item['ident'].'</a>'; |
|
241 | - $output .= '</div>'; |
|
242 | - $output .= '<div class="ge-row">'; |
|
243 | - $output .= '<span>Registration</span>'; |
|
244 | - $output .= '<a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a>'; |
|
245 | - $output .= '</div>'; |
|
246 | - $output .= '<div class="ge-row">'; |
|
247 | - $output .= '<span>Aircraft</span>'; |
|
248 | - $output .= '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" target="_blank">'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
249 | - $output .= '</div>'; |
|
250 | - $output .= '<div class="ge-row">'; |
|
251 | - $output .= '<span>Airline</span>'; |
|
252 | - $output .= '<a href="'.$globalURL.'/airline/'.$spotter_item['airline_icao'].'" target="_blank">'.$spotter_item['airline_name'].'</a>'; |
|
253 | - $output .= '</div>'; |
|
254 | - $output .= '<div class="ge-row">'; |
|
255 | - $output .= '<span>Departure Airport</span>'; |
|
256 | - $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].')</a>'; |
|
257 | - $output .= '</div>'; |
|
258 | - $output .= '<div class="ge-row">'; |
|
259 | - $output .= '<span>Arrival Airport</span>'; |
|
260 | - $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a>'; |
|
261 | - $output .= '</div>'; |
|
233 | + $output .= '<div class="ge-balloon">'; |
|
234 | + if ($spotter_item['image_thumbnail'] != "") |
|
235 | + { |
|
236 | + $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click on image to see Flight profile" title="Click on image to see Flight profile" class="ge-image" /></a>'; |
|
237 | + } |
|
238 | + $output .= '<div class="ge-row">'; |
|
239 | + $output .= '<span>Ident</span>'; |
|
240 | + $output .= '<a href="'.$globalURL.'/ident/'.$spotter_item['ident'].'" target="_blank">'.$spotter_item['ident'].'</a>'; |
|
241 | + $output .= '</div>'; |
|
242 | + $output .= '<div class="ge-row">'; |
|
243 | + $output .= '<span>Registration</span>'; |
|
244 | + $output .= '<a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a>'; |
|
245 | + $output .= '</div>'; |
|
246 | + $output .= '<div class="ge-row">'; |
|
247 | + $output .= '<span>Aircraft</span>'; |
|
248 | + $output .= '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" target="_blank">'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
249 | + $output .= '</div>'; |
|
250 | + $output .= '<div class="ge-row">'; |
|
251 | + $output .= '<span>Airline</span>'; |
|
252 | + $output .= '<a href="'.$globalURL.'/airline/'.$spotter_item['airline_icao'].'" target="_blank">'.$spotter_item['airline_name'].'</a>'; |
|
253 | + $output .= '</div>'; |
|
254 | + $output .= '<div class="ge-row">'; |
|
255 | + $output .= '<span>Departure Airport</span>'; |
|
256 | + $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].')</a>'; |
|
257 | + $output .= '</div>'; |
|
258 | + $output .= '<div class="ge-row">'; |
|
259 | + $output .= '<span>Arrival Airport</span>'; |
|
260 | + $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a>'; |
|
261 | + $output .= '</div>'; |
|
262 | 262 | $output .= '<div class="ge-row">'; |
263 | - $output .= '<span>Date</span>'; |
|
264 | - $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank">'.date("D M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</a>'; |
|
265 | - $output .= '</div>'; |
|
266 | - $output .= '</div>'; |
|
267 | - $output .= ' ]]></description>'; |
|
263 | + $output .= '<span>Date</span>'; |
|
264 | + $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank">'.date("D M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</a>'; |
|
265 | + $output .= '</div>'; |
|
266 | + $output .= '</div>'; |
|
267 | + $output .= ' ]]></description>'; |
|
268 | 268 | $output .= '<styleUrl>#aircraft_'.$spotter_item['spotter_id'].'</styleUrl>'; |
269 | 269 | $output .= '<Point>'; |
270 | 270 | $output .= '<coordinates>'.$spotter_item['longitude'].', '.$spotter_item['latitude'].', '.$altitude.'</coordinates>'; |
@@ -273,14 +273,14 @@ discard block |
||
273 | 273 | $output .= '</Placemark>'; |
274 | 274 | |
275 | 275 | $output .= '<Style id="aircraft_'.$spotter_item['spotter_id'].'">'; |
276 | - $output .= '<IconStyle>'; |
|
277 | - $output .= '<Icon>'; |
|
278 | - $output .= '<href>http://www.flightairmap.fr/images/kml_aircraft.png</href>'; |
|
279 | - $output .= '</Icon>'; |
|
280 | - $output .= '<heading>'.$spotter_item['heading'].'</heading>'; |
|
281 | - $output .= '</IconStyle>'; |
|
282 | - $output .= '</Style>'; |
|
283 | - } |
|
276 | + $output .= '<IconStyle>'; |
|
277 | + $output .= '<Icon>'; |
|
278 | + $output .= '<href>http://www.flightairmap.fr/images/kml_aircraft.png</href>'; |
|
279 | + $output .= '</Icon>'; |
|
280 | + $output .= '<heading>'.$spotter_item['heading'].'</heading>'; |
|
281 | + $output .= '</IconStyle>'; |
|
282 | + $output .= '</Style>'; |
|
283 | + } |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | $output .= '</Document>'; |
@@ -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 | |
91 | 91 | $output = '<?xml version="1.0" encoding="UTF-8"?>'; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | if (!empty($spotter_array)) |
117 | 117 | { |
118 | - foreach($spotter_array as $spotter_item) |
|
118 | + foreach ($spotter_array as $spotter_item) |
|
119 | 119 | { |
120 | 120 | |
121 | 121 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | foreach ($waypoint_pieces as $waypoint_coordinate) |
134 | 134 | { |
135 | - $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
135 | + $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
136 | 136 | |
137 | 137 | } |
138 | 138 | $output .= '</coordinates>'; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $output .= ' ]]></description>'; |
179 | 179 | $output .= '<styleUrl>#departureAirport</styleUrl>'; |
180 | 180 | $output .= '<Point>'; |
181 | - $output .= '<coordinates>'.$spotter_item['departure_airport_longitude'].', '.$spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_altitude'].'</coordinates>'; |
|
181 | + $output .= '<coordinates>'.$spotter_item['departure_airport_longitude'].', '.$spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_altitude'].'</coordinates>'; |
|
182 | 182 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
183 | 183 | $output .= '</Point>'; |
184 | 184 | $output .= '</Placemark>'; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $output .= ' ]]></description>'; |
221 | 221 | $output .= '<styleUrl>#arrivalAirport</styleUrl>'; |
222 | 222 | $output .= '<Point>'; |
223 | - $output .= '<coordinates>'.$spotter_item['arrival_airport_longitude'].', '.$spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_altitude'].'</coordinates>'; |
|
223 | + $output .= '<coordinates>'.$spotter_item['arrival_airport_longitude'].', '.$spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_altitude'].'</coordinates>'; |
|
224 | 224 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
225 | 225 | $output .= '</Point>'; |
226 | 226 | $output .= '</Placemark>'; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $output .= ' ]]></description>'; |
268 | 268 | $output .= '<styleUrl>#aircraft_'.$spotter_item['spotter_id'].'</styleUrl>'; |
269 | 269 | $output .= '<Point>'; |
270 | - $output .= '<coordinates>'.$spotter_item['longitude'].', '.$spotter_item['latitude'].', '.$altitude.'</coordinates>'; |
|
270 | + $output .= '<coordinates>'.$spotter_item['longitude'].', '.$spotter_item['latitude'].', '.$altitude.'</coordinates>'; |
|
271 | 271 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
272 | 272 | $output .= '</Point>'; |
273 | 273 | $output .= '</Placemark>'; |
@@ -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: text/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); |
@@ -7,12 +7,12 @@ |
||
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]; |
@@ -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]; |