@@ -26,24 +26,24 @@ discard block |
||
26 | 26 | $sql_date = ''; |
27 | 27 | if (isset($_GET['start_date'])) { |
28 | 28 | //for the date manipulation into the query |
29 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
29 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
30 | 30 | if (strtotime($_GET['start_date']) !== false && strtotime($_GET['end_date']) !== false) { |
31 | 31 | //$start_date = $_GET['start_date']." 00:00:00"; |
32 | - $start_date = date("Y-m-d",strtotime($_GET['start_date']))." 00:00:00"; |
|
32 | + $start_date = date("Y-m-d", strtotime($_GET['start_date']))." 00:00:00"; |
|
33 | 33 | //$end_date = $_GET['end_date']." 00:00:00"; |
34 | - $end_date = date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
|
34 | + $end_date = date("Y-m-d", strtotime($_GET['end_date']))." 00:00:00"; |
|
35 | 35 | $sql_date = $start_date.",".$end_date; |
36 | 36 | } |
37 | - } else if($_GET['start_date'] != ""){ |
|
37 | + } else if ($_GET['start_date'] != "") { |
|
38 | 38 | if (strtotime($_GET['start_date']) !== false) { |
39 | 39 | //$start_date = $_GET['start_date']." 00:00:00"; |
40 | - $start_date = date("Y-m-d",strtotime($_GET['start_date']))." 00:00:00"; |
|
40 | + $start_date = date("Y-m-d", strtotime($_GET['start_date']))." 00:00:00"; |
|
41 | 41 | $sql_date = $start_date; |
42 | 42 | } |
43 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
43 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
44 | 44 | if (strtotime($_GET['end_date']) !== false) { |
45 | 45 | //$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00"; |
46 | - $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".date("Y-m-d",strtotime($_GET['end_date']))." 00:00:00"; |
|
46 | + $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".date("Y-m-d", strtotime($_GET['end_date']))." 00:00:00"; |
|
47 | 47 | $sql_date = $end_date; |
48 | 48 | } |
49 | 49 | } else $sql_date = ''; |
@@ -51,21 +51,21 @@ discard block |
||
51 | 51 | |
52 | 52 | if (isset($_GET['highest_altitude'])) { |
53 | 53 | //for altitude manipulation |
54 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
55 | - $end_altitude = filter_input(INPUT_GET,'highest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
56 | - $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
54 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
55 | + $end_altitude = filter_input(INPUT_GET, 'highest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
56 | + $start_altitude = filter_input(INPUT_GET, 'lowest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
57 | 57 | $sql_altitude = $start_altitude.",".$end_altitude; |
58 | - } else if($_GET['highest_altitude'] != ""){ |
|
59 | - $end_altitude = filter_input(INPUT_GET,'highest_altitude',FILTER_SANITIZE_NUMBER_INT); |
|
58 | + } else if ($_GET['highest_altitude'] != "") { |
|
59 | + $end_altitude = filter_input(INPUT_GET, 'highest_altitude', FILTER_SANITIZE_NUMBER_INT); |
|
60 | 60 | $sql_altitude = $end_altitude; |
61 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
62 | - $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
|
61 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
62 | + $start_altitude = filter_input(INPUT_GET, 'lowest_altitude', FILTER_SANITIZE_NUMBER_INT).",60000"; |
|
63 | 63 | $sql_altitude = $start_altitude; |
64 | 64 | } else $sql_altitude = ''; |
65 | 65 | } else $sql_altitude = ''; |
66 | 66 | |
67 | 67 | //calculuation for the pagination |
68 | -if(!isset($_GET['limit'])) |
|
68 | +if (!isset($_GET['limit'])) |
|
69 | 69 | { |
70 | 70 | if (!isset($_GET['number_results'])) |
71 | 71 | { |
@@ -73,17 +73,17 @@ discard block |
||
73 | 73 | $limit_end = 25; |
74 | 74 | $absolute_difference = 25; |
75 | 75 | } else { |
76 | - if ($_GET['number_results'] > 1000){ |
|
76 | + if ($_GET['number_results'] > 1000) { |
|
77 | 77 | $_GET['number_results'] = 1000; |
78 | 78 | } |
79 | 79 | $limit_start = 0; |
80 | - $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
81 | - $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
80 | + $limit_end = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
81 | + $absolute_difference = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
82 | 82 | } |
83 | -} else { |
|
83 | +} else { |
|
84 | 84 | $limit_explode = explode(",", $_GET['limit']); |
85 | - $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
|
86 | - $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
|
85 | + $limit_start = filter_var($limit_explode[0], FILTER_SANITIZE_NUMBER_INT); |
|
86 | + $limit_end = filter_var($limit_explode[1], FILTER_SANITIZE_NUMBER_INT); |
|
87 | 87 | } |
88 | 88 | $absolute_difference = abs($limit_start - $limit_end); |
89 | 89 | $limit_next = $limit_end + $absolute_difference; |
@@ -116,35 +116,35 @@ discard block |
||
116 | 116 | ((isset($_GET['origlat']) && $_GET['origlat'] != '') && |
117 | 117 | (isset($_GET['origlon']) && $_GET['origlon'] != '') && |
118 | 118 | (isset($_GET['dist']) && $_GET['dist'] != '')) |
119 | - ){ |
|
120 | - $q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING); |
|
121 | - $registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING); |
|
122 | - $aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING); |
|
123 | - $manufacturer = filter_input(INPUT_GET, 'manufacturer',FILTER_SANITIZE_STRING); |
|
124 | - $highlights = filter_input(INPUT_GET, 'highlights',FILTER_SANITIZE_STRING); |
|
125 | - $airline = filter_input(INPUT_GET, 'airline',FILTER_SANITIZE_STRING); |
|
126 | - $airline_country = filter_input(INPUT_GET, 'airline_country',FILTER_SANITIZE_STRING); |
|
127 | - $airline_type = filter_input(INPUT_GET, 'airline_type',FILTER_SANITIZE_STRING); |
|
128 | - $airport = filter_input(INPUT_GET, 'airport',FILTER_SANITIZE_STRING); |
|
129 | - $airport_country = filter_input(INPUT_GET, 'airport_country',FILTER_SANITIZE_STRING); |
|
130 | - $callsign = filter_input(INPUT_GET, 'callsign',FILTER_SANITIZE_STRING); |
|
131 | - $owner = filter_input(INPUT_GET, 'owner',FILTER_SANITIZE_STRING); |
|
132 | - $pilot_name = filter_input(INPUT_GET, 'pilot_name',FILTER_SANITIZE_STRING); |
|
133 | - $pilot_id = filter_input(INPUT_GET, 'pilot_id',FILTER_SANITIZE_STRING); |
|
134 | - $mmsi = filter_input(INPUT_GET, 'mmsi',FILTER_SANITIZE_NUMBER_INT); |
|
135 | - $imo = filter_input(INPUT_GET, 'imo',FILTER_SANITIZE_NUMBER_INT); |
|
136 | - $captain_id = filter_input(INPUT_GET, 'captain_id',FILTER_SANITIZE_NUMBER_INT); |
|
137 | - $race_id = filter_input(INPUT_GET, 'race_id',FILTER_SANITIZE_NUMBER_INT); |
|
138 | - $captain_name = filter_input(INPUT_GET, 'captain_name',FILTER_SANITIZE_STRING); |
|
139 | - $race_name = filter_input(INPUT_GET, 'race_name',FILTER_SANITIZE_STRING); |
|
140 | - $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route',FILTER_SANITIZE_STRING); |
|
141 | - $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
142 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
143 | - $archive = filter_input(INPUT_GET,'archive',FILTER_SANITIZE_NUMBER_INT); |
|
144 | - $origlat = filter_input(INPUT_GET,'origlat',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
145 | - $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
146 | - $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
|
147 | - $number_results = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
|
119 | + ) { |
|
120 | + $q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
121 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
122 | + $aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
123 | + $manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
124 | + $highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
125 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
126 | + $airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
127 | + $airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
128 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
129 | + $airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
130 | + $callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
131 | + $owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
132 | + $pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
133 | + $pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
134 | + $mmsi = filter_input(INPUT_GET, 'mmsi', FILTER_SANITIZE_NUMBER_INT); |
|
135 | + $imo = filter_input(INPUT_GET, 'imo', FILTER_SANITIZE_NUMBER_INT); |
|
136 | + $captain_id = filter_input(INPUT_GET, 'captain_id', FILTER_SANITIZE_NUMBER_INT); |
|
137 | + $race_id = filter_input(INPUT_GET, 'race_id', FILTER_SANITIZE_NUMBER_INT); |
|
138 | + $captain_name = filter_input(INPUT_GET, 'captain_name', FILTER_SANITIZE_STRING); |
|
139 | + $race_name = filter_input(INPUT_GET, 'race_name', FILTER_SANITIZE_STRING); |
|
140 | + $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
141 | + $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
142 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
143 | + $archive = filter_input(INPUT_GET, 'archive', FILTER_SANITIZE_NUMBER_INT); |
|
144 | + $origlat = filter_input(INPUT_GET, 'origlat', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
145 | + $origlon = filter_input(INPUT_GET, 'origlon', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
146 | + $dist = filter_input(INPUT_GET, 'dist', FILTER_SANITIZE_NUMBER_INT); |
|
147 | + $number_results = filter_input(INPUT_GET, 'number_results', FILTER_SANITIZE_NUMBER_INT); |
|
148 | 148 | if ($dist != '') { |
149 | 149 | if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
150 | 150 | elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
@@ -153,15 +153,15 @@ discard block |
||
153 | 153 | if ($archive == 1) { |
154 | 154 | if ($type == 'aircraft') { |
155 | 155 | $SpotterArchive = new SpotterArchive(); |
156 | - $spotter_array = $SpotterArchive->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,'',$origlat,$origlon,$dist); |
|
156 | + $spotter_array = $SpotterArchive->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, '', $origlat, $origlon, $dist); |
|
157 | 157 | } |
158 | 158 | } else { |
159 | 159 | if ($type == 'aircraft') { |
160 | - $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,'',$origlat,$origlon,$dist); |
|
160 | + $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, '', $origlat, $origlon, $dist); |
|
161 | 161 | } elseif ($type == 'tracker') { |
162 | - $spotter_array = $Tracker->searchTrackerData($q,$callsign,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
162 | + $spotter_array = $Tracker->searchTrackerData($q, $callsign, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
163 | 163 | } elseif ($type == 'marine') { |
164 | - $spotter_array = $Marine->searchMarineData($q,$callsign,$mmsi,$imo,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist,$captain_id,$captain_name,$race_id,$race_name); |
|
164 | + $spotter_array = $Marine->searchMarineData($q, $callsign, $mmsi, $imo, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist, $captain_id, $captain_name, $race_id, $race_name); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
@@ -197,12 +197,12 @@ discard block |
||
197 | 197 | //remove 3D=true parameter |
198 | 198 | $no3D = str_replace("&3D=true", "", $_SERVER['QUERY_STRING']); |
199 | 199 | $kmlURL = str_replace("http://", "kml://", $globalURL); |
200 | - if (!isset($_GET['3D'])){ |
|
200 | + if (!isset($_GET['3D'])) { |
|
201 | 201 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'" class="active"><i class="fa fa-table"></i> '._("Table").'</a></li>'; |
202 | 202 | } else { |
203 | 203 | print '<li><span class="notablet"><a href="'.$globalURL.'/search?'.$no3D.'"><i class="fa fa-table"></i> '._("Table").'</a></span></li>'; |
204 | 204 | } |
205 | - if (isset($_GET['3D'])){ |
|
205 | + if (isset($_GET['3D'])) { |
|
206 | 206 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="active"><i class="fa fa-globe"></i> '._("3D Map").'</a></li>'; |
207 | 207 | } else { |
208 | 208 | print '<li ><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="notablet nomobile"><i class="fa fa-globe"></i> '._("3D Map").'</a><a href="'.$kmlURL.'/search/kml?'.htmlentities($_SERVER['QUERY_STRING']).'" class="tablet mobile"><i class="fa fa-globe"></i> 3D Map</a></li>'; |
@@ -223,36 +223,36 @@ discard block |
||
223 | 223 | print '<div class="column">'; |
224 | 224 | print '<div class="info">'; |
225 | 225 | print '<h1>'._("Search Results for").' '; |
226 | - if (isset($_GET['q']) && $_GET['q'] != ""){ print _("Keyword:").' <span>'.$q.'</span> '; } |
|
227 | - if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
|
228 | - if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
|
229 | - if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$registration.'</span> '; } |
|
230 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
231 | - if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$airline.'</span> '; } |
|
232 | - if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
|
233 | - if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
|
234 | - if (isset($_GET['airport']) && $_GET['airport'] != ""){ print _("Airport:").' <span>'.$airport.'</span> '; } |
|
235 | - if (isset($_GET['airport_country']) && $_GET['airport_country'] != ""){ print _("Airport country:").' <span>'.$airport_country.'</span> '; } |
|
236 | - if (isset($_GET['callsign']) && $_GET['callsign'] != ""){ print _("Callsign:").' <span>'.$callsign.'</span> '; } |
|
237 | - if (isset($_GET['owner']) && $_GET['owner'] != ""){ print _("Owner:").' <span>'.$owner.'</span> '; } |
|
238 | - if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != ""){ print _("Pilot id:").' <span>'.$pilot_id.'</span> '; } |
|
239 | - if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != ""){ print _("Pilot name:").' <span>'.$pilot_name.'</span> '; } |
|
240 | - if (isset($_GET['captain_id']) && $_GET['captain_id'] != ""){ print _("Captain id:").' <span>'.$captain_id.'</span> '; } |
|
241 | - if (isset($_GET['captain_name']) && $_GET['captain_name'] != ""){ print _("Captain name:").' <span>'.$captain_name.'</span> '; } |
|
242 | - if (isset($_GET['race_id']) && $_GET['race_id'] != ""){ print _("Race id:").' <span>'.$race_id.'</span> '; } |
|
243 | - if (isset($_GET['race_name']) && $_GET['race_name'] != ""){ print _("Race name:").' <span>'.$race_name.'</span> '; } |
|
244 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")){ print _("Route out of:").' <span>'.$departure_airport_route.'</span> '; } |
|
245 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route into:").' <span>'.$arrival_airport_route.'</span> '; } |
|
246 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route between:").' <span>'.$departure_airport_route.'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
247 | - if (isset($_GET['mmsi']) && $_GET['mmsi'] != ""){ print _("MMSI:").' <span>'.$mmsi.'</span> '; } |
|
248 | - if (isset($_GET['imo']) && $_GET['imo'] != ""){ print _("IMO:").' <span>'.$imo.'</span> '; } |
|
249 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == ""){ print _("Date starting at:").' <span>'.$start_date.'</span> '; } |
|
250 | - if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date ending at:").' <span>'.$end_date.'</span> '; } |
|
251 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date between:").' <span>'.$start_date.'</span> and <span>'.$end_date.'</span> '; } |
|
252 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == ""){ print _("Altitude starting at:").' <span>'.number_format($lowest_altitude).' feet</span> '; } |
|
253 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude ending at:").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
254 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude between:").' <span>'.number_format($lowest_altitude).' feet</span> '._("and").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
255 | - if (isset($_GET['number_results']) && $_GET['number_results'] != ""){ print _("limit per page:").' <span>'.$number_results.'</span> '; } |
|
226 | + if (isset($_GET['q']) && $_GET['q'] != "") { print _("Keyword:").' <span>'.$q.'</span> '; } |
|
227 | + if (isset($_GET['aircraft']) && $_GET['aircraft'] != "") { print _("Aircraft:").' <span>'.$aircraft.'</span> '; } |
|
228 | + if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != "") { print _("Manufacturer:").' <span>'.$manufacturer.'</span> '; } |
|
229 | + if (isset($_GET['registration']) && $_GET['registration'] != "") { print _("Registration:").' <span>'.$registration.'</span> '; } |
|
230 | + if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print _("Highlights:").' <span>'.$highlights.'</span> '; } |
|
231 | + if (isset($_GET['airline']) && $_GET['airline'] != "") { print _("Airline:").' <span>'.$airline.'</span> '; } |
|
232 | + if (isset($_GET['airline_country']) && $_GET['airline_country'] != "") { print _("Airline country:").' <span>'.$airline_country.'</span> '; } |
|
233 | + if (isset($_GET['airline_type']) && $_GET['airline_type'] != "") { print _("Airline type:").' <span>'.$airline_type.'</span> '; } |
|
234 | + if (isset($_GET['airport']) && $_GET['airport'] != "") { print _("Airport:").' <span>'.$airport.'</span> '; } |
|
235 | + if (isset($_GET['airport_country']) && $_GET['airport_country'] != "") { print _("Airport country:").' <span>'.$airport_country.'</span> '; } |
|
236 | + if (isset($_GET['callsign']) && $_GET['callsign'] != "") { print _("Callsign:").' <span>'.$callsign.'</span> '; } |
|
237 | + if (isset($_GET['owner']) && $_GET['owner'] != "") { print _("Owner:").' <span>'.$owner.'</span> '; } |
|
238 | + if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != "") { print _("Pilot id:").' <span>'.$pilot_id.'</span> '; } |
|
239 | + if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != "") { print _("Pilot name:").' <span>'.$pilot_name.'</span> '; } |
|
240 | + if (isset($_GET['captain_id']) && $_GET['captain_id'] != "") { print _("Captain id:").' <span>'.$captain_id.'</span> '; } |
|
241 | + if (isset($_GET['captain_name']) && $_GET['captain_name'] != "") { print _("Captain name:").' <span>'.$captain_name.'</span> '; } |
|
242 | + if (isset($_GET['race_id']) && $_GET['race_id'] != "") { print _("Race id:").' <span>'.$race_id.'</span> '; } |
|
243 | + if (isset($_GET['race_name']) && $_GET['race_name'] != "") { print _("Race name:").' <span>'.$race_name.'</span> '; } |
|
244 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")) { print _("Route out of:").' <span>'.$departure_airport_route.'</span> '; } |
|
245 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route into:").' <span>'.$arrival_airport_route.'</span> '; } |
|
246 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route between:").' <span>'.$departure_airport_route.'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
247 | + if (isset($_GET['mmsi']) && $_GET['mmsi'] != "") { print _("MMSI:").' <span>'.$mmsi.'</span> '; } |
|
248 | + if (isset($_GET['imo']) && $_GET['imo'] != "") { print _("IMO:").' <span>'.$imo.'</span> '; } |
|
249 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == "") { print _("Date starting at:").' <span>'.$start_date.'</span> '; } |
|
250 | + if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date ending at:").' <span>'.$end_date.'</span> '; } |
|
251 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date between:").' <span>'.$start_date.'</span> and <span>'.$end_date.'</span> '; } |
|
252 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == "") { print _("Altitude starting at:").' <span>'.number_format($lowest_altitude).' feet</span> '; } |
|
253 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude ending at:").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
254 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude between:").' <span>'.number_format($lowest_altitude).' feet</span> '._("and").' <span>'.number_format($highest_altitude).' feet</span> '; } |
|
255 | + if (isset($_GET['number_results']) && $_GET['number_results'] != "") { print _("limit per page:").' <span>'.$number_results.'</span> '; } |
|
256 | 256 | print '</h1>'; |
257 | 257 | print '</div>'; |
258 | 258 | |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | </select> |
391 | 391 | </div> |
392 | 392 | </div> |
393 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
393 | + <script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $manufacturer; ?>')</script> |
|
394 | 394 | <div class="form-group"> |
395 | 395 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
396 | 396 | <div class="col-sm-10"> |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | </select> |
400 | 400 | </div> |
401 | 401 | </div> |
402 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
402 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $aircraft_icao; ?>');</script> |
|
403 | 403 | <div class="form-group"> |
404 | 404 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
405 | 405 | <div class="col-sm-10"> |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | </div> |
423 | 423 | </div> |
424 | 424 | <?php |
425 | - }else { |
|
425 | + } else { |
|
426 | 426 | ?> |
427 | 427 | <div class="form-group"> |
428 | 428 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
@@ -435,8 +435,8 @@ discard block |
||
435 | 435 | ?> |
436 | 436 | <div class="form-group"> |
437 | 437 | <div class="col-sm-offset-2 col-sm-10"> |
438 | - <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
439 | - <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
438 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
439 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <?php echo _("Include only aircraft with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
440 | 440 | </div> |
441 | 441 | </div> |
442 | 442 | </fieldset> |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | </select> |
451 | 451 | </div> |
452 | 452 | </div> |
453 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $airline; ?>');</script> |
|
453 | + <script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $airline; ?>');</script> |
|
454 | 454 | <div class="form-group"> |
455 | 455 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
456 | 456 | <div class="col-sm-10"> |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | </select> |
460 | 460 | </div> |
461 | 461 | </div> |
462 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
462 | + <script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $airline_country; ?>');</script> |
|
463 | 463 | <div class="form-group"> |
464 | 464 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
465 | 465 | <div class="col-sm-10"> |
@@ -468,10 +468,10 @@ discard block |
||
468 | 468 | </div> |
469 | 469 | <div class="form-group"> |
470 | 470 | <div class="col-sm-offset-2 col-sm-10"> |
471 | - <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
|
472 | - <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
473 | - <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
474 | - <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
471 | + <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all") { print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
|
472 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger") { print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
473 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "cargo") { print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
474 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "military") { print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
475 | 475 | </div> |
476 | 476 | </div> |
477 | 477 | </fieldset> |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | </select> |
486 | 486 | </div> |
487 | 487 | </div> |
488 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
488 | + <script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $airport_icao; ?>');</script> |
|
489 | 489 | <div class="form-group"> |
490 | 490 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
491 | 491 | <div class="col-sm-10"> |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | </select> |
495 | 495 | </div> |
496 | 496 | </div> |
497 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
497 | + <script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $airport_country; ?>');</script> |
|
498 | 498 | </fieldset> |
499 | 499 | <fieldset> |
500 | 500 | <legend><?php echo _("Route"); ?></legend> |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | </select> |
507 | 507 | </div> |
508 | 508 | </div> |
509 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
509 | + <script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $departure_airport_route; ?>');</script> |
|
510 | 510 | <div class="form-group"> |
511 | 511 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
512 | 512 | <div class="col-sm-10"> |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | </select> |
516 | 516 | </div> |
517 | 517 | </div> |
518 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
518 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $arrival_airport_route; ?>');</script> |
|
519 | 519 | </fieldset> |
520 | 520 | <fieldset> |
521 | 521 | <legend><?php echo _("Altitude"); ?></legend> |
@@ -526,9 +526,9 @@ discard block |
||
526 | 526 | <option></option> |
527 | 527 | <?php |
528 | 528 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
529 | -foreach($altitude_array as $altitude) |
|
529 | +foreach ($altitude_array as $altitude) |
|
530 | 530 | { |
531 | - if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
531 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
532 | 532 | { |
533 | 533 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
534 | 534 | } else { |
@@ -546,9 +546,9 @@ discard block |
||
546 | 546 | <option></option> |
547 | 547 | <?php |
548 | 548 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
549 | - foreach($altitude_array as $altitude) |
|
549 | + foreach ($altitude_array as $altitude) |
|
550 | 550 | { |
551 | - if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
551 | + if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
552 | 552 | { |
553 | 553 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
554 | 554 | } else { |
@@ -710,10 +710,10 @@ discard block |
||
710 | 710 | <div class="col-sm-10"> |
711 | 711 | <select class="form-control" name="number_results"> |
712 | 712 | <?php |
713 | -$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
714 | -foreach($number_results_array as $number) |
|
713 | +$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
714 | +foreach ($number_results_array as $number) |
|
715 | 715 | { |
716 | - if(isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
716 | + if (isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
717 | 717 | { |
718 | 718 | print '<option value="'.$number.'" selected="selected">'.$number.'</option>'; |
719 | 719 | } else { |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | <fieldset> |
733 | 733 | <div class="form-group"> |
734 | 734 | <div class="col-sm-offset-2 col-sm-10"> |
735 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" disabled /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
735 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" disabled /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
736 | 736 | <p class="help-block">Disabled in demo</p> |
737 | 737 | </div> |
738 | 738 | </div> |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | <fieldset> |
744 | 744 | <div class="form-group"> |
745 | 745 | <div class="col-sm-offset-2 col-sm-10"> |
746 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
746 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
747 | 747 | </div> |
748 | 748 | </div> |
749 | 749 | </fieldset> |
@@ -24,55 +24,55 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | class Language { |
27 | - public $all_languages = array('ar_SA' => array('العَرَبِيَّةُ', 'ar', 'arabic'), |
|
28 | - 'bg_BG' => array('Български', 'bg', 'bulgarian'), |
|
29 | - 'id_ID' => array('Bahasa Indonesia', 'id', 'indonesian'), |
|
30 | - 'ms_MY' => array('Bahasa Melayu', 'ms', 'malay'), |
|
31 | - 'ca_ES' => array('Català', 'ca', 'catalan'), // ca_CA |
|
32 | - 'cs_CZ' => array('Čeština', 'cs', 'czech'), |
|
33 | - 'de_DE' => array('Deutsch', 'de', 'german'), |
|
34 | - 'da_DK' => array('Dansk', 'da', 'danish') , // dk_DK |
|
35 | - 'et_EE' => array('Eesti', 'et', 'estonian'), // ee_ET |
|
36 | - 'en_GB' => array('English', 'en', 'english'), |
|
37 | - 'en_US' => array('English (US)', 'en', 'english'), |
|
38 | - 'es_AR' => array('Español (Argentina)', 'es', 'spanish'), |
|
39 | - 'es_CO' => array('Español (Colombia)', 'es', 'spanish'), |
|
40 | - 'es_ES' => array('Español', 'es', 'spanish'), |
|
41 | - 'es_419' => array('Español (América Latina)', 'es', 'spanish'), |
|
42 | - 'es_MX' => array('Español (Mexico)', 'es', 'spanish'), |
|
43 | - 'es_VE' => array('Español (Venezuela)', 'es', 'spanish'), |
|
44 | - 'eu_ES' => array('Euskara', 'en', 'basque'), |
|
45 | - 'fr_FR' => array('Français', 'fr', 'french'), |
|
46 | - 'gl_ES' => array('Galego', 'gl', 'galician'), |
|
47 | - 'el_GR' => array('Ελληνικά', 'el', 'greek'), // el_EL |
|
48 | - 'he_IL' => array('עברית', 'he', 'hebrew'), // he_HE |
|
49 | - 'hr_HR' => array('Hrvatski', 'hr', 'croatian'), |
|
50 | - 'hu_HU' => array('Magyar', 'hu', 'hungarian'), |
|
51 | - 'it_IT' => array('Italiano', 'it', 'italian'), |
|
52 | - 'lv_LV' => array('Latviešu', 'lv', 'latvian'), |
|
53 | - 'lt_LT' => array('Lietuvių', 'lt', 'lithuanian'), |
|
54 | - 'nl_NL' => array('Nederlands', 'nl', 'dutch'), |
|
55 | - 'nb_NO' => array('Norsk (Bokmål)', 'nb', 'norwegian'), // no_NB |
|
56 | - 'nn_NO' => array('Norsk (Nynorsk)', 'nn', 'norwegian'), // no_NN |
|
57 | - 'fa_IR' => array('فارسی', 'fa', 'persian'), |
|
58 | - 'pl_PL' => array('Polski', 'pl', 'polish'), |
|
59 | - 'pt_PT' => array('Português', 'pt', 'portuguese'), |
|
60 | - 'pt_BR' => array('Português do Brasil', 'pt', 'brazilian portuguese'), |
|
61 | - 'ro_RO' => array('Română', 'en', 'romanian'), |
|
62 | - 'ru_RU' => array('Pусский', 'ru', 'russian'), |
|
63 | - 'sk_SK' => array('Slovenčina', 'sk', 'slovak'), |
|
64 | - 'sl_SI' => array('Slovenščina', 'sl', 'slovenian slovene'), |
|
65 | - 'sr_RS' => array('Srpski', 'sr', 'serbian'), |
|
66 | - 'fi_FI' => array('Suomi', 'fi', 'finish'), |
|
67 | - 'sv_SE' => array('Svenska', 'sv', 'swedish'), |
|
68 | - 'vi_VN' => array('Tiếng Việt', 'vi', 'vietnamese'), |
|
69 | - 'th_TH' => array('ภาษาไทย', 'th', 'thai'), |
|
70 | - 'tr_TR' => array('Türkçe', 'tr', 'turkish'), |
|
71 | - 'uk_UA' => array('Українська', 'en', 'ukrainian'), // ua_UA |
|
72 | - 'ja_JP' => array('日本語', 'ja', 'japanese'), |
|
73 | - 'zh_CN' => array('简体中文', 'zh', 'chinese'), |
|
74 | - 'zh_TW' => array('繁體中文', 'zh', 'chinese'), |
|
75 | - 'ko_KR' => array('한글', 'ko', 'korean') |
|
27 | + public $all_languages = array('ar_SA' => array('العَرَبِيَّةُ', 'ar', 'arabic'), |
|
28 | + 'bg_BG' => array('Български', 'bg', 'bulgarian'), |
|
29 | + 'id_ID' => array('Bahasa Indonesia', 'id', 'indonesian'), |
|
30 | + 'ms_MY' => array('Bahasa Melayu', 'ms', 'malay'), |
|
31 | + 'ca_ES' => array('Català', 'ca', 'catalan'), // ca_CA |
|
32 | + 'cs_CZ' => array('Čeština', 'cs', 'czech'), |
|
33 | + 'de_DE' => array('Deutsch', 'de', 'german'), |
|
34 | + 'da_DK' => array('Dansk', 'da', 'danish'), // dk_DK |
|
35 | + 'et_EE' => array('Eesti', 'et', 'estonian'), // ee_ET |
|
36 | + 'en_GB' => array('English', 'en', 'english'), |
|
37 | + 'en_US' => array('English (US)', 'en', 'english'), |
|
38 | + 'es_AR' => array('Español (Argentina)', 'es', 'spanish'), |
|
39 | + 'es_CO' => array('Español (Colombia)', 'es', 'spanish'), |
|
40 | + 'es_ES' => array('Español', 'es', 'spanish'), |
|
41 | + 'es_419' => array('Español (América Latina)', 'es', 'spanish'), |
|
42 | + 'es_MX' => array('Español (Mexico)', 'es', 'spanish'), |
|
43 | + 'es_VE' => array('Español (Venezuela)', 'es', 'spanish'), |
|
44 | + 'eu_ES' => array('Euskara', 'en', 'basque'), |
|
45 | + 'fr_FR' => array('Français', 'fr', 'french'), |
|
46 | + 'gl_ES' => array('Galego', 'gl', 'galician'), |
|
47 | + 'el_GR' => array('Ελληνικά', 'el', 'greek'), // el_EL |
|
48 | + 'he_IL' => array('עברית', 'he', 'hebrew'), // he_HE |
|
49 | + 'hr_HR' => array('Hrvatski', 'hr', 'croatian'), |
|
50 | + 'hu_HU' => array('Magyar', 'hu', 'hungarian'), |
|
51 | + 'it_IT' => array('Italiano', 'it', 'italian'), |
|
52 | + 'lv_LV' => array('Latviešu', 'lv', 'latvian'), |
|
53 | + 'lt_LT' => array('Lietuvių', 'lt', 'lithuanian'), |
|
54 | + 'nl_NL' => array('Nederlands', 'nl', 'dutch'), |
|
55 | + 'nb_NO' => array('Norsk (Bokmål)', 'nb', 'norwegian'), // no_NB |
|
56 | + 'nn_NO' => array('Norsk (Nynorsk)', 'nn', 'norwegian'), // no_NN |
|
57 | + 'fa_IR' => array('فارسی', 'fa', 'persian'), |
|
58 | + 'pl_PL' => array('Polski', 'pl', 'polish'), |
|
59 | + 'pt_PT' => array('Português', 'pt', 'portuguese'), |
|
60 | + 'pt_BR' => array('Português do Brasil', 'pt', 'brazilian portuguese'), |
|
61 | + 'ro_RO' => array('Română', 'en', 'romanian'), |
|
62 | + 'ru_RU' => array('Pусский', 'ru', 'russian'), |
|
63 | + 'sk_SK' => array('Slovenčina', 'sk', 'slovak'), |
|
64 | + 'sl_SI' => array('Slovenščina', 'sl', 'slovenian slovene'), |
|
65 | + 'sr_RS' => array('Srpski', 'sr', 'serbian'), |
|
66 | + 'fi_FI' => array('Suomi', 'fi', 'finish'), |
|
67 | + 'sv_SE' => array('Svenska', 'sv', 'swedish'), |
|
68 | + 'vi_VN' => array('Tiếng Việt', 'vi', 'vietnamese'), |
|
69 | + 'th_TH' => array('ภาษาไทย', 'th', 'thai'), |
|
70 | + 'tr_TR' => array('Türkçe', 'tr', 'turkish'), |
|
71 | + 'uk_UA' => array('Українська', 'en', 'ukrainian'), // ua_UA |
|
72 | + 'ja_JP' => array('日本語', 'ja', 'japanese'), |
|
73 | + 'zh_CN' => array('简体中文', 'zh', 'chinese'), |
|
74 | + 'zh_TW' => array('繁體中文', 'zh', 'chinese'), |
|
75 | + 'ko_KR' => array('한글', 'ko', 'korean') |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | public function getLocale($locale) |
102 | 102 | { |
103 | - return array($locale,$this->all_languages[$locale][1],$this->all_languages[$locale][2],$locale.'.utf8',$locale.'.UTF8'); |
|
103 | + return array($locale, $this->all_languages[$locale][1], $this->all_languages[$locale][2], $locale.'.utf8', $locale.'.UTF8'); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | $allAvailableLanguages = array(); |
115 | 115 | $currentLocal = setlocale(LC_ALL, 0); |
116 | 116 | foreach ($available as $lang) { |
117 | - if (isset($this->all_languages[$lang]) && (setlocale(LC_ALL,$this->getLocale($lang)) || $lang = 'en_GB')) $allAvailableLanguages[$lang] = $this->all_languages[$lang]; |
|
117 | + if (isset($this->all_languages[$lang]) && (setlocale(LC_ALL, $this->getLocale($lang)) || $lang = 'en_GB')) $allAvailableLanguages[$lang] = $this->all_languages[$lang]; |
|
118 | 118 | } |
119 | - setlocale(LC_ALL,$currentLocal); |
|
119 | + setlocale(LC_ALL, $currentLocal); |
|
120 | 120 | return $allAvailableLanguages; |
121 | 121 | } |
122 | 122 | } |