@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | $page_url = $globalURL.'/tools-notam'; |
12 | 12 | |
13 | -$message = filter_input(INPUT_POST,'notam_message',FILTER_SANITIZE_STRING); |
|
13 | +$message = filter_input(INPUT_POST, 'notam_message', FILTER_SANITIZE_STRING); |
|
14 | 14 | |
15 | 15 | print '<div class="info column">'; |
16 | 16 | print '<h1>'._("Parse NOTAM messages").'</h1>'; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | if (!empty($notam_parse)) { |
35 | 35 | print '<p>'._("NOTAM message in human readable format:").'</p>'; |
36 | 36 | foreach ($notam_parse as $key => $value) { |
37 | - print '<b>'.strtoupper(str_replace('_',' ',$key)).'</b>: '.$value.'<br />'; |
|
37 | + print '<b>'.strtoupper(str_replace('_', ' ', $key)).'</b>: '.$value.'<br />'; |
|
38 | 38 | } |
39 | 39 | } else { |
40 | 40 | print '<p>'._("This NOTAM message can't be translated in human readable format :(").'</p>'; |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | header('Location: '.$globalURL.'/aircraft'); |
9 | 9 | die(); |
10 | 10 | } |
11 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
11 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
13 | 13 | |
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Airlines by Country from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
17 | + $title = sprintf(_("Most Common Airlines by Country from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | |
20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
23 | 23 | print '<option></option>'; |
24 | 24 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
25 | - foreach($aircraft_types as $aircrafttype) |
|
25 | + foreach ($aircraft_types as $aircrafttype) |
|
26 | 26 | { |
27 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
27 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
30 | 30 | } else { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | include('aircraft-sub-menu.php'); |
51 | 51 | print '<div class="column">'; |
52 | 52 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
54 | 54 | |
55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByAircraft($aircraft_type); |
56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | var data = google.visualization.arrayToDataTable([ |
63 | 63 | ["Country", "# of times"], '; |
64 | 64 | $country_data = ''; |
65 | - foreach($airline_array as $airline_item) |
|
65 | + foreach ($airline_array as $airline_item) |
|
66 | 66 | { |
67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
68 | 68 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | print '</thead>'; |
94 | 94 | print '<tbody>'; |
95 | 95 | $i = 1; |
96 | - foreach($airline_array as $airline_item) |
|
96 | + foreach ($airline_array as $airline_item) |
|
97 | 97 | { |
98 | 98 | print '<tr>'; |
99 | 99 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $output = '{'; |
11 | 11 | $output .= '"flights": ['; |
12 | 12 | if (!empty($spotter_array)) { |
13 | - foreach($spotter_array as $spotter_item) |
|
13 | + foreach ($spotter_array as $spotter_item) |
|
14 | 14 | { |
15 | 15 | $output .= '{'; |
16 | 16 | $output .= '"flight_id": "'.$spotter_item['spotter_id'].'",'; |
@@ -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 | -$ident = 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 | +$ident = 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 Routes of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Routes 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 Routes").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $route_array = $Spotter->countAllRoutesByIdent($ident); |
30 | 30 | if (!empty($route_array)) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | print '</thead>'; |
42 | 42 | print '<tbody>'; |
43 | 43 | $i = 1; |
44 | - foreach($route_array as $route_item) |
|
44 | + foreach ($route_array as $route_item) |
|
45 | 45 | { |
46 | 46 | print '<tr>'; |
47 | 47 | 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 Arrival Airports by Country from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports by Country from %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($airport == $airport_name['airport_icao']) |
|
26 | + if ($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 Arrival Airports by Country").'</h2>'; |
57 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <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 arrival airports by Country of origin of flights from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
58 | 58 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirport($airport); |
59 | 59 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
60 | 60 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | var data = google.visualization.arrayToDataTable([ |
66 | 66 | ["'._("Country").'", "'._("# of times").'"], '; |
67 | 67 | $country_data = ''; |
68 | - foreach($airport_country_array as $airport_item) |
|
68 | + foreach ($airport_country_array as $airport_item) |
|
69 | 69 | { |
70 | 70 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
71 | 71 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | print '</thead>'; |
100 | 100 | print '<tbody>'; |
101 | 101 | $i = 1; |
102 | - foreach($airport_country_array as $airport_item) |
|
102 | + foreach ($airport_country_array as $airport_item) |
|
103 | 103 | { |
104 | 104 | print '<tr>'; |
105 | 105 | 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,30 +69,30 @@ 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 | $i = 1; |
91 | 91 | //$output .= "oid;Line\n"; |
92 | 92 | $output = ''; |
93 | 93 | if (!empty($spotter_array)) |
94 | 94 | { |
95 | - foreach($spotter_array as $spotter_item) |
|
95 | + foreach ($spotter_array as $spotter_item) |
|
96 | 96 | { |
97 | 97 | if ($spotter_item['waypoints'] != '') { |
98 | 98 | $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
@@ -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 from %s"),$manufacturer); |
|
16 | + $title = sprintf(_("Most Common Departure Airports 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").'</h2>'; |
45 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
45 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
46 | 46 | $airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer); |
47 | 47 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
48 | 48 | <script> |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | ["'._("Airport").'", "'._("# of times").'"],'; |
58 | 58 | |
59 | 59 | $airport_data = ''; |
60 | - foreach($airport_airport_array as $airport_item) |
|
60 | + foreach ($airport_airport_array as $airport_item) |
|
61 | 61 | { |
62 | 62 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
63 | 63 | $name = str_replace("'", "", $name); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | print '</thead>'; |
97 | 97 | print '<tbody>'; |
98 | 98 | $i = 1; |
99 | - foreach($airport_airport_array as $airport_item) |
|
99 | + foreach ($airport_airport_array as $airport_item) |
|
100 | 100 | { |
101 | 101 | print '<tr>'; |
102 | 102 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | } else return $ident; |
32 | 32 | } else return $ident; |
33 | 33 | if ($airline_icao == 'AF') { |
34 | - if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
|
35 | - else $icao = 'AFR'.ltrim(substr($ident,2),'0'); |
|
34 | + if (filter_var(substr($ident, 2), FILTER_VALIDATE_INT, array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
|
35 | + else $icao = 'AFR'.ltrim(substr($ident, 2), '0'); |
|
36 | 36 | } else { |
37 | 37 | $identicao = $Spotter->getAllAirlineInfo($airline_icao); |
38 | 38 | if (isset($identicao[0])) { |
39 | - $icao = $identicao[0]['icao'].ltrim(substr($ident,2),'0'); |
|
39 | + $icao = $identicao[0]['icao'].ltrim(substr($ident, 2), '0'); |
|
40 | 40 | } else $icao = $ident; |
41 | 41 | } |
42 | 42 | return $icao; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | try { |
50 | 50 | $sth = $this->db->prepare($query); |
51 | 51 | $sth->execute($query_values); |
52 | - } catch(PDOException $e) { |
|
52 | + } catch (PDOException $e) { |
|
53 | 53 | return "error : ".$e->getMessage(); |
54 | 54 | } |
55 | 55 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
@@ -58,29 +58,29 @@ discard block |
||
58 | 58 | } else return $ident; |
59 | 59 | } |
60 | 60 | |
61 | - public function addOperator($ident,$correct_ident,$source) { |
|
61 | + public function addOperator($ident, $correct_ident, $source) { |
|
62 | 62 | $query = "INSERT INTO translation (Operator,Operator_correct,Source) VALUES (:ident,:correct_ident,:source)"; |
63 | - $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
|
63 | + $query_values = array(':ident' => $ident, ':correct_ident' => $correct_ident, ':source' => $source); |
|
64 | 64 | try { |
65 | 65 | $sth = $this->db->prepare($query); |
66 | 66 | $sth->execute($query_values); |
67 | - } catch(PDOException $e) { |
|
67 | + } catch (PDOException $e) { |
|
68 | 68 | return "error : ".$e->getMessage(); |
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - public function updateOperator($ident,$correct_ident,$source) { |
|
72 | + public function updateOperator($ident, $correct_ident, $source) { |
|
73 | 73 | $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident"; |
74 | - $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
|
74 | + $query_values = array(':ident' => $ident, ':correct_ident' => $correct_ident, ':source' => $source); |
|
75 | 75 | try { |
76 | 76 | $sth = $this->db->prepare($query); |
77 | 77 | $sth->execute($query_values); |
78 | - } catch(PDOException $e) { |
|
78 | + } catch (PDOException $e) { |
|
79 | 79 | return "error : ".$e->getMessage(); |
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | - public function checkTranslation($ident,$web = false) { |
|
83 | + public function checkTranslation($ident, $web = false) { |
|
84 | 84 | global $globalTranslationSources, $globalTranslationFetch; |
85 | 85 | //if (!isset($globalTranslationSources)) $globalTranslationSources = array('planefinder'); |
86 | 86 | $globalTranslationSources = array(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $globalLongitudeMin = '1.0'; //the minimum longitude (east) |
30 | 30 | |
31 | 31 | $globalCenterLatitude = '46.38'; //the latitude center of your coverage area |
32 | -$globalCenterLongitude = '5.29';//the longitude center of your coverage area |
|
32 | +$globalCenterLongitude = '5.29'; //the longitude center of your coverage area |
|
33 | 33 | |
34 | 34 | $globalLiveZoom = '9'; //default zoom on Live Map |
35 | 35 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $globalACARS = FALSE; |
127 | 127 | $globalACARSHost = '0.0.0.0'; // Local IP to listen |
128 | 128 | $globalACARSPort = '9999'; |
129 | -$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive |
|
129 | +$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive |
|
130 | 130 | $globalACARSArchiveKeepMonths = '0'; |
131 | 131 | |
132 | 132 | //APRS configuration (for glidernet) |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | //Retrieve Image from externals sources |
202 | 202 | $globalAircraftImageFetch = TRUE; |
203 | 203 | //Sources for Aircraft image |
204 | -$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources'); |
|
204 | +$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources'); |
|
205 | 205 | // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic) |
206 | 206 | // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'exif' => true); |
207 | 207 | // ************************ |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE) |
210 | 210 | $globalSchedulesFetch = TRUE; |
211 | 211 | //Sources for airline schedule if not official airline site |
212 | -$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
212 | +$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
213 | 213 | |
214 | 214 | //Retrieve translation from external sources (set to FALSE for IVAO) |
215 | 215 | $globalTranslationFetch = TRUE; |