@@ -7,23 +7,23 @@ 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))); |
|
10 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
11 | 11 | |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Time of Day from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Time of Day from %s"), $manufacturer); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/manufacturer" method="post">'; |
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 Time of Day").'</h2>'; |
45 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
45 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
46 | 46 | |
47 | 47 | $hour_array = $Spotter->countAllHoursByManufacturer($manufacturer); |
48 | 48 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | var data = google.visualization.arrayToDataTable([ |
55 | 55 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
56 | 56 | $hour_data = ''; |
57 | - foreach($hour_array as $hour_item) |
|
57 | + foreach ($hour_array as $hour_item) |
|
58 | 58 | { |
59 | 59 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
60 | 60 | } |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$isent = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$isent = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Airlines").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $airline_array = $Spotter->countAllAirlinesByIdent($_GET['ident']); |
30 | 30 | if (!empty($airline_array)) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | print '</thead>'; |
42 | 42 | print '<tbody>'; |
43 | 43 | $i = 1; |
44 | - foreach($airline_array as $airline_item) |
|
44 | + foreach ($airline_array as $airline_item) |
|
45 | 45 | { |
46 | 46 | print '<tr>'; |
47 | 47 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | ["'._("Month").'", "'._("# of Flights").'"], '; |
23 | 23 | |
24 | 24 | $date_data = ''; |
25 | -foreach($date_array as $date_item) |
|
25 | +foreach ($date_array as $date_item) |
|
26 | 26 | { |
27 | 27 | $date_data .= '[ "'.date("F, Y", strtotime($date_item['year_name'].'-'.$date_item['month_name'].'-01')).'",'.$date_item['date_count'].'],'; |
28 | 28 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | print '</thead>'; |
60 | 60 | print '<tbody>'; |
61 | 61 | $i = 1; |
62 | - foreach($date_array as $date_item) |
|
62 | + foreach ($date_array as $date_item) |
|
63 | 63 | { |
64 | 64 | print '<tr>'; |
65 | 65 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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 = '{'; |
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 .= '{'; |
@@ -3,15 +3,15 @@ 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 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
8 | 8 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
9 | 9 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
10 | 10 | |
11 | 11 | |
12 | 12 | if (!empty($spotter_array)) |
13 | 13 | { |
14 | - $title = sprintf(_("Most Common Routes from aircraft with registration %s"),$registration); |
|
14 | + $title = sprintf(_("Most Common Routes from aircraft with registration %s"), $registration); |
|
15 | 15 | |
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="info column">'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('registration-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Routes").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common routes of aircraft with registration <strong>%s</strong>."),$registration).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common routes of aircraft with registration <strong>%s</strong>."), $registration).'</p>'; |
|
28 | 28 | |
29 | 29 | $route_array = $Spotter->countAllRoutesByRegistration($registration); |
30 | 30 | if (!empty($route_array)) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | print '</thead>'; |
41 | 41 | print '<tbody>'; |
42 | 42 | $i = 1; |
43 | - foreach($route_array as $route_item) |
|
43 | + foreach ($route_array as $route_item) |
|
44 | 44 | { |
45 | 45 | print '<tr>'; |
46 | 46 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | } |
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | print '<option></option>'; |
24 | 24 | $all_manufacturers = $Spotter->getAllManufacturers(); |
25 | - foreach($all_manufacturers as $all_manufacturer) |
|
25 | + foreach ($all_manufacturers as $all_manufacturer) |
|
26 | 26 | { |
27 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
27 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
30 | 30 | } else { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | include('manufacturer-sub-menu.php'); |
44 | 44 | print '<div class="column">'; |
45 | 45 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
46 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
46 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
47 | 47 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByManufacturer($manufacturer); |
48 | 48 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
49 | 49 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -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['arrival_airport_country'].'",'.$airport_item['airport_arrival_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>'; |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airport'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $airport_names = $Spotter->getAllAirportNames(); |
23 | 23 | ksort($airport_names); |
24 | - foreach($airport_names as $airport_name) |
|
24 | + foreach ($airport_names as $airport_name) |
|
25 | 25 | { |
26 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
26 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
27 | 27 | { |
28 | 28 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
29 | 29 | } else { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | include('airport-sub-menu.php'); |
55 | 55 | print '<div class="column">'; |
56 | 56 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
57 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
57 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
58 | 58 | |
59 | 59 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirport($airport); |
60 | 60 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | var data = google.visualization.arrayToDataTable([ |
67 | 67 | ["'._("Country").'", "'._("# of times").'"], '; |
68 | 68 | $country_data = ''; |
69 | - foreach($airport_country_array as $airport_item) |
|
69 | + foreach ($airport_country_array as $airport_item) |
|
70 | 70 | { |
71 | 71 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
72 | 72 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | print '</thead>'; |
101 | 101 | print '<tbody>'; |
102 | 102 | $i = 1; |
103 | - foreach($airport_country_array as $airport_item) |
|
103 | + foreach ($airport_country_array as $airport_item) |
|
104 | 104 | { |
105 | 105 | print '<tr>'; |
106 | 106 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -11,27 +11,27 @@ |
||
11 | 11 | |
12 | 12 | if (isset($_GET['coord'])) |
13 | 13 | { |
14 | - $coords = explode(',',$_GET['coord']); |
|
14 | + $coords = explode(',', $_GET['coord']); |
|
15 | 15 | $spotter_array = $Spotter->getAllAirportInfobyCoord($coords); |
16 | 16 | } else { |
17 | - $spotter_array = $Spotter->getAllAirportInfobyCountry(array('France','Switzerland')); |
|
17 | + $spotter_array = $Spotter->getAllAirportInfobyCountry(array('France', 'Switzerland')); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | $output = '{"type": "FeatureCollection","features": ['; |
21 | 21 | |
22 | 22 | if (!empty($spotter_array)) |
23 | 23 | { |
24 | - foreach($spotter_array as $spotter_item) |
|
24 | + foreach ($spotter_array as $spotter_item) |
|
25 | 25 | { |
26 | 26 | date_default_timezone_set('UTC'); |
27 | 27 | //waypoint plotting |
28 | 28 | $output .= '{"type": "Feature",'; |
29 | 29 | $output .= '"properties": {'; |
30 | - $output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",'; |
|
30 | + $output .= '"name": "'.str_replace('"', "'", $spotter_item['name']).'",'; |
|
31 | 31 | $output .= '"city": "'.$spotter_item['city'].'",'; |
32 | 32 | $output .= '"country": "'.$spotter_item['country'].'",'; |
33 | 33 | $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
34 | - $output .= '"popupContent": "'.str_replace('"',"'",$spotter_item['name']).' : '.$spotter_item['city'].', '.$spotter_item['country'].'",'; |
|
34 | + $output .= '"popupContent": "'.str_replace('"', "'", $spotter_item['name']).' : '.$spotter_item['city'].', '.$spotter_item['country'].'",'; |
|
35 | 35 | if ($spotter_item['type'] == 'large_airport') { |
36 | 36 | $output .= '"icon": "'.$globalURL.'/images/airport.png",'; |
37 | 37 | } elseif ($spotter_item['type'] == 'heliport') { |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | -if (!isset($_GET['airline'])){ |
|
6 | +if (!isset($_GET['airline'])) { |
|
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | -} else{ |
|
8 | +} else { |
|
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | //calculuation for the pagination |
11 | - if(!isset($_GET['limit']) || $_GET['limit'] == "") |
|
11 | + if (!isset($_GET['limit']) || $_GET['limit'] == "") |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -27,16 +27,16 @@ discard block |
||
27 | 27 | $limit_previous_1 = $limit_start - $absolute_difference; |
28 | 28 | $limit_previous_2 = $limit_end - $absolute_difference; |
29 | 29 | |
30 | - $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
30 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
31 | 31 | $page_url = $globalURL.'/airline/'.$airline; |
32 | 32 | |
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
34 | - $spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'],$limit_start.",".$absolute_difference, $sort); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | + $spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'], $limit_start.",".$absolute_difference, $sort); |
|
35 | 35 | |
36 | 36 | if (!empty($spotter_array)) |
37 | 37 | { |
38 | 38 | if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) { |
39 | - $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
39 | + $title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
40 | 40 | } else $title = ''; |
41 | 41 | require_once('header.php'); |
42 | 42 | |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
46 | 46 | print '<option></option>'; |
47 | 47 | $airline_names = $Spotter->getAllAirlineNames(); |
48 | - foreach($airline_names as $airline_name) |
|
48 | + foreach ($airline_names as $airline_name) |
|
49 | 49 | { |
50 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
50 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
51 | 51 | { |
52 | 52 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
53 | 53 | } else { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | include('airline-sub-menu.php'); |
85 | 85 | print '<div class="table column">'; |
86 | 86 | if (isset($spotter_array[0]['airline_name'])) { |
87 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
87 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | include('table-output.php'); |