@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | ); |
69 | 69 | |
70 | 70 | /** |
71 | - * Returns list of available locales |
|
72 | - * |
|
73 | - * @return array |
|
74 | - */ |
|
71 | + * Returns list of available locales |
|
72 | + * |
|
73 | + * @return array |
|
74 | + */ |
|
75 | 75 | public function listLocaleDir() |
76 | 76 | { |
77 | 77 | $result = array('en_GB'); |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | - * Returns list of available languages |
|
100 | - * |
|
101 | - * @return array |
|
99 | + * Returns list of available languages |
|
100 | + * |
|
101 | + * @return array |
|
102 | 102 | */ |
103 | 103 | public function getLanguages() |
104 | 104 | { |
@@ -15,11 +15,11 @@ |
||
15 | 15 | |
16 | 16 | |
17 | 17 | /** |
18 | - * Change IATA to ICAO value for ident |
|
19 | - * |
|
20 | - * @param String $ident ident |
|
21 | - * @return String the icao |
|
22 | - */ |
|
18 | + * Change IATA to ICAO value for ident |
|
19 | + * |
|
20 | + * @param String $ident ident |
|
21 | + * @return String the icao |
|
22 | + */ |
|
23 | 23 | public function ident2icao($ident) { |
24 | 24 | $Spotter = new Spotter(); |
25 | 25 | if (!is_numeric(substr($ident, 0, 3))) { |
@@ -90,40 +90,40 @@ |
||
90 | 90 | if (!empty($spotter_array)) { |
91 | 91 | foreach($spotter_array as $spotter_item) { |
92 | 92 | array_push($flights, array( |
93 | - "id" => $spotter_item['spotter_id'], |
|
94 | - "ident" => $spotter_item['ident'], |
|
95 | - "registration" => $spotter_item['registration'], |
|
96 | - "aircraft_icao" => $spotter_item['aircraft_type'], |
|
97 | - "aircraft_name" => $spotter_item['aircraft_name'], |
|
98 | - "aircraft_manufacturer" => $spotter_item['aircraft_manufacturer'], |
|
99 | - "airline_name" => $spotter_item['airline_name'], |
|
100 | - "airline_icao" => $spotter_item['airline_icao'], |
|
101 | - "airline_iata" => $spotter_item['airline_iata'], |
|
102 | - "airline_country" => $spotter_item['airline_country'], |
|
103 | - "airline_callsign" => $spotter_item['airline_callsign'], |
|
104 | - "airline_type" => $spotter_item['airline_type'], |
|
105 | - "departure_airport_city" => $spotter_item['departure_airport_city'], |
|
106 | - "departure_airport_country" => $spotter_item['departure_airport_country'], |
|
107 | - "departure_airport_iata" => $spotter_item['departure_airport_iata'], |
|
108 | - "departure_airport_icao" => $spotter_item['departure_airport_icao'], |
|
109 | - "departure_airport_latitude" => $spotter_item['departure_airport_latitude'], |
|
110 | - "departure_airport_longitude" => $spotter_item['departure_airport_longitude'], |
|
111 | - "departure_airport_altitude" => $spotter_item['departure_airport_altitude'], |
|
112 | - "arrival_airport_city" => $spotter_item['arrival_airport_city'], |
|
113 | - "arrival_airport_country" => $spotter_item['arrival_airport_country'], |
|
114 | - "arrival_airport_iata" => $spotter_item['arrival_airport_iata'], |
|
115 | - "arrival_airport_icao" => $spotter_item['arrival_airport_icao'], |
|
116 | - "arrival_airport_latitude" => $spotter_item['arrival_airport_latitude'], |
|
117 | - "arrival_airport_longitude" => $spotter_item['arrival_airport_longitude'], |
|
118 | - "arrival_airport_altitude" => $spotter_item['arrival_airport_altitude'], |
|
119 | - "latitude" => $spotter_item['latitude'], |
|
120 | - "longitude" => $spotter_item['longitude'], |
|
121 | - "altitude" => $spotter_item['altitude'], |
|
122 | - "ground_speed" => $spotter_item['ground_speed'], |
|
123 | - "heading" => $spotter_item['heading'], |
|
124 | - "heading_name" => $spotter_item['heading_name'], |
|
125 | - "waypoints" => $spotter_item['waypoints'], |
|
126 | - "date" => date("c", strtotime($spotter_item['date_iso_8601'])) |
|
93 | + "id" => $spotter_item['spotter_id'], |
|
94 | + "ident" => $spotter_item['ident'], |
|
95 | + "registration" => $spotter_item['registration'], |
|
96 | + "aircraft_icao" => $spotter_item['aircraft_type'], |
|
97 | + "aircraft_name" => $spotter_item['aircraft_name'], |
|
98 | + "aircraft_manufacturer" => $spotter_item['aircraft_manufacturer'], |
|
99 | + "airline_name" => $spotter_item['airline_name'], |
|
100 | + "airline_icao" => $spotter_item['airline_icao'], |
|
101 | + "airline_iata" => $spotter_item['airline_iata'], |
|
102 | + "airline_country" => $spotter_item['airline_country'], |
|
103 | + "airline_callsign" => $spotter_item['airline_callsign'], |
|
104 | + "airline_type" => $spotter_item['airline_type'], |
|
105 | + "departure_airport_city" => $spotter_item['departure_airport_city'], |
|
106 | + "departure_airport_country" => $spotter_item['departure_airport_country'], |
|
107 | + "departure_airport_iata" => $spotter_item['departure_airport_iata'], |
|
108 | + "departure_airport_icao" => $spotter_item['departure_airport_icao'], |
|
109 | + "departure_airport_latitude" => $spotter_item['departure_airport_latitude'], |
|
110 | + "departure_airport_longitude" => $spotter_item['departure_airport_longitude'], |
|
111 | + "departure_airport_altitude" => $spotter_item['departure_airport_altitude'], |
|
112 | + "arrival_airport_city" => $spotter_item['arrival_airport_city'], |
|
113 | + "arrival_airport_country" => $spotter_item['arrival_airport_country'], |
|
114 | + "arrival_airport_iata" => $spotter_item['arrival_airport_iata'], |
|
115 | + "arrival_airport_icao" => $spotter_item['arrival_airport_icao'], |
|
116 | + "arrival_airport_latitude" => $spotter_item['arrival_airport_latitude'], |
|
117 | + "arrival_airport_longitude" => $spotter_item['arrival_airport_longitude'], |
|
118 | + "arrival_airport_altitude" => $spotter_item['arrival_airport_altitude'], |
|
119 | + "latitude" => $spotter_item['latitude'], |
|
120 | + "longitude" => $spotter_item['longitude'], |
|
121 | + "altitude" => $spotter_item['altitude'], |
|
122 | + "ground_speed" => $spotter_item['ground_speed'], |
|
123 | + "heading" => $spotter_item['heading'], |
|
124 | + "heading_name" => $spotter_item['heading_name'], |
|
125 | + "waypoints" => $spotter_item['waypoints'], |
|
126 | + "date" => date("c", strtotime($spotter_item['date_iso_8601'])) |
|
127 | 127 | )); |
128 | 128 | } |
129 | 129 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | //waypoint plotting |
93 | - /* |
|
93 | + /* |
|
94 | 94 | $output .= '{'; |
95 | 95 | $output .= '"type": "Feature",'; |
96 | 96 | $output .= '"properties": {'; |
@@ -269,8 +269,8 @@ discard block |
||
269 | 269 | $output_time .= (strtotime($spotter_history['date'])*1000).','; |
270 | 270 | } |
271 | 271 | if (isset($output_time)) { |
272 | - $output_time = substr($output_time, 0, -1); |
|
273 | - $output .= '"time": ['.$output_time.'],'; |
|
272 | + $output_time = substr($output_time, 0, -1); |
|
273 | + $output .= '"time": ['.$output_time.'],'; |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | $output .= '"coordinates": ['; |
285 | 285 | |
286 | 286 | if (isset($output_history)) { |
287 | - $output_history = substr($output_history, 0, -1); |
|
288 | - $output .= $output_history; |
|
287 | + $output_history = substr($output_history, 0, -1); |
|
288 | + $output .= $output_history; |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | $output .= ']'; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | ?> |
250 | 250 | <div class="more"> |
251 | 251 | <?php |
252 | - /* |
|
252 | + /* |
|
253 | 253 | if ($year != '' && $month != '') { |
254 | 254 | ?> |
255 | 255 | <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | <?php |
261 | 261 | } |
262 | 262 | */ |
263 | - ?> |
|
263 | + ?> |
|
264 | 264 | </div> |
265 | 265 | </div> |
266 | 266 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | ?> |
295 | 295 | <div class="more"> |
296 | 296 | <?php |
297 | - /* |
|
297 | + /* |
|
298 | 298 | if ($year != '' && $month != '') { |
299 | 299 | ?> |
300 | 300 | <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | <?php |
306 | 306 | } |
307 | 307 | */ |
308 | - ?> |
|
308 | + ?> |
|
309 | 309 | </div> |
310 | 310 | </div> |
311 | 311 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * Gets all launch site |
|
128 | - * |
|
129 | - * @return Array the launch site list |
|
130 | - * |
|
131 | - */ |
|
127 | + * Gets all launch site |
|
128 | + * |
|
129 | + * @return Array the launch site list |
|
130 | + * |
|
131 | + */ |
|
132 | 132 | public function countAllLaunchSite($limit = true, $filters = array()) |
133 | 133 | { |
134 | 134 | global $globalDBdriver; |
@@ -153,11 +153,11 @@ discard block |
||
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
156 | - * Gets all owners |
|
157 | - * |
|
158 | - * @return Array the owners list |
|
159 | - * |
|
160 | - */ |
|
156 | + * Gets all owners |
|
157 | + * |
|
158 | + * @return Array the owners list |
|
159 | + * |
|
160 | + */ |
|
161 | 161 | public function countAllOwners($limit = true, $filters = array()) |
162 | 162 | { |
163 | 163 | global $globalDBdriver; |
@@ -182,11 +182,11 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | - * Gets all countries owners |
|
186 | - * |
|
187 | - * @return Array the countries list |
|
188 | - * |
|
189 | - */ |
|
185 | + * Gets all countries owners |
|
186 | + * |
|
187 | + * @return Array the countries list |
|
188 | + * |
|
189 | + */ |
|
190 | 190 | public function countAllCountriesOwners($limit = true, $filters = array()) |
191 | 191 | { |
192 | 192 | global $globalDBdriver; |
@@ -211,11 +211,11 @@ discard block |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
214 | - * Counts all launch dates during the last year |
|
215 | - * |
|
216 | - * @return Array the launch date list |
|
217 | - * |
|
218 | - */ |
|
214 | + * Counts all launch dates during the last year |
|
215 | + * |
|
216 | + * @return Array the launch date list |
|
217 | + * |
|
218 | + */ |
|
219 | 219 | public function countAllMonthsLastYear($filters = array(), $sincedate = '') |
220 | 220 | { |
221 | 221 | global $globalTimezone, $globalDBdriver; |
@@ -256,11 +256,11 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
259 | - * Counts all dates during the last 10 years |
|
260 | - * |
|
261 | - * @return Array the date list |
|
262 | - * |
|
263 | - */ |
|
259 | + * Counts all dates during the last 10 years |
|
260 | + * |
|
261 | + * @return Array the date list |
|
262 | + * |
|
263 | + */ |
|
264 | 264 | public function countAllYears($filters = array(), $sincedate = '') |
265 | 265 | { |
266 | 266 | global $globalTimezone, $globalDBdriver; |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | } |
20 | 20 | } |
21 | 21 | /** |
22 | - * Change IATA to ICAO value for ident |
|
23 | - * |
|
24 | - * @param String $ident ident |
|
25 | - * @return String the icao |
|
26 | - */ |
|
22 | + * Change IATA to ICAO value for ident |
|
23 | + * |
|
24 | + * @param String $ident ident |
|
25 | + * @return String the icao |
|
26 | + */ |
|
27 | 27 | public function ident2icao($ident) { |
28 | 28 | if (substr($ident,0,2) == 'AF') { |
29 | 29 | if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * Deletes all info in the live table |
|
43 | - * |
|
44 | - * @return String success or false |
|
45 | - * |
|
46 | - */ |
|
42 | + * Deletes all info in the live table |
|
43 | + * |
|
44 | + * @return String success or false |
|
45 | + * |
|
46 | + */ |
|
47 | 47 | public function deleteLiveAcarsData() |
48 | 48 | { |
49 | 49 | global $globalDBdriver; |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * Deletes all info in the archive table |
|
67 | - * |
|
68 | - * @return String success or false |
|
69 | - * |
|
70 | - */ |
|
66 | + * Deletes all info in the archive table |
|
67 | + * |
|
68 | + * @return String success or false |
|
69 | + * |
|
70 | + */ |
|
71 | 71 | public function deleteArchiveAcarsData() |
72 | 72 | { |
73 | 73 | global $globalACARSArchiveKeepMonths, $globalDBdriver; |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | |
89 | 89 | |
90 | 90 | /** |
91 | - * Parse ACARS data |
|
92 | - * |
|
93 | - * @param String ACARS data in acarsdec data |
|
94 | - * |
|
95 | - */ |
|
91 | + * Parse ACARS data |
|
92 | + * |
|
93 | + * @param String ACARS data in acarsdec data |
|
94 | + * |
|
95 | + */ |
|
96 | 96 | public function parse($data) { |
97 | 97 | global $globalDebug, $globalACARSArchive; |
98 | 98 | //$Image = new Image($this->db); |
@@ -722,11 +722,11 @@ discard block |
||
722 | 722 | } |
723 | 723 | |
724 | 724 | /** |
725 | - * Add ACARS data |
|
726 | - * |
|
727 | - * @param String ACARS data in acarsdec data |
|
728 | - * |
|
729 | - */ |
|
725 | + * Add ACARS data |
|
726 | + * |
|
727 | + * @param String ACARS data in acarsdec data |
|
728 | + * |
|
729 | + */ |
|
730 | 730 | function add($data) { |
731 | 731 | global $globalDebug, $globalACARSArchive; |
732 | 732 | $Image = new Image($this->db); |
@@ -773,15 +773,15 @@ discard block |
||
773 | 773 | } |
774 | 774 | |
775 | 775 | /** |
776 | - * Add Live ACARS data in DB |
|
777 | - * |
|
778 | - * @param String $ident ident |
|
779 | - * @param String $registration Registration of the aircraft |
|
780 | - * @param String $label Label of the ACARS message |
|
781 | - * @param String $block_id Block id of the ACARS message |
|
782 | - * @param String $msg_no Number of the ACARS message |
|
783 | - * @param String $message ACARS message |
|
784 | - */ |
|
776 | + * Add Live ACARS data in DB |
|
777 | + * |
|
778 | + * @param String $ident ident |
|
779 | + * @param String $registration Registration of the aircraft |
|
780 | + * @param String $label Label of the ACARS message |
|
781 | + * @param String $block_id Block id of the ACARS message |
|
782 | + * @param String $msg_no Number of the ACARS message |
|
783 | + * @param String $message ACARS message |
|
784 | + */ |
|
785 | 785 | public function addLiveAcarsData($ident,$registration,$label,$block_id,$msg_no,$message,$decode = '') { |
786 | 786 | global $globalDebug; |
787 | 787 | date_default_timezone_set('UTC'); |
@@ -817,15 +817,15 @@ discard block |
||
817 | 817 | } |
818 | 818 | |
819 | 819 | /** |
820 | - * Add Archive ACARS data in DB |
|
821 | - * |
|
822 | - * @param String $ident ident |
|
823 | - * @param String $registration Registration of the aircraft |
|
824 | - * @param String $label Label of the ACARS message |
|
825 | - * @param String $block_id Block id of the ACARS message |
|
826 | - * @param String $msg_no Number of the ACARS message |
|
827 | - * @param String $message ACARS message |
|
828 | - */ |
|
820 | + * Add Archive ACARS data in DB |
|
821 | + * |
|
822 | + * @param String $ident ident |
|
823 | + * @param String $registration Registration of the aircraft |
|
824 | + * @param String $label Label of the ACARS message |
|
825 | + * @param String $block_id Block id of the ACARS message |
|
826 | + * @param String $msg_no Number of the ACARS message |
|
827 | + * @param String $message ACARS message |
|
828 | + */ |
|
829 | 829 | public function addArchiveAcarsData($ident,$registration,$label,$block_id,$msg_no,$message,$decode = '') { |
830 | 830 | global $globalDebug; |
831 | 831 | date_default_timezone_set('UTC'); |
@@ -856,11 +856,11 @@ discard block |
||
856 | 856 | } |
857 | 857 | |
858 | 858 | /** |
859 | - * Get Message title from label from DB |
|
860 | - * |
|
861 | - * @param String $label |
|
862 | - * @return String Return ACARS title |
|
863 | - */ |
|
859 | + * Get Message title from label from DB |
|
860 | + * |
|
861 | + * @param String $label |
|
862 | + * @return String Return ACARS title |
|
863 | + */ |
|
864 | 864 | public function getTitlefromLabel($label) { |
865 | 865 | $Connection = new Connection($this->db); |
866 | 866 | $this->db = $Connection->db; |
@@ -879,10 +879,10 @@ discard block |
||
879 | 879 | } |
880 | 880 | |
881 | 881 | /** |
882 | - * List all Message title & label from DB |
|
883 | - * |
|
884 | - * @return Array Return ACARS data in array |
|
885 | - */ |
|
882 | + * List all Message title & label from DB |
|
883 | + * |
|
884 | + * @return Array Return ACARS data in array |
|
885 | + */ |
|
886 | 886 | public function getAllTitleLabel() { |
887 | 887 | $query = "SELECT * FROM acars_label ORDER BY title"; |
888 | 888 | $query_values = array(); |
@@ -899,11 +899,11 @@ discard block |
||
899 | 899 | } |
900 | 900 | |
901 | 901 | /** |
902 | - * Get Live ACARS data from DB |
|
903 | - * |
|
904 | - * @param String $ident |
|
905 | - * @return Array Return ACARS data in array |
|
906 | - */ |
|
902 | + * Get Live ACARS data from DB |
|
903 | + * |
|
904 | + * @param String $ident |
|
905 | + * @return Array Return ACARS data in array |
|
906 | + */ |
|
907 | 907 | public function getLiveAcarsData($ident) { |
908 | 908 | $query = "SELECT * FROM acars_live WHERE ident = :ident ORDER BY acars_live_id DESC"; |
909 | 909 | $query_values = array(':ident' => $ident); |
@@ -920,10 +920,10 @@ discard block |
||
920 | 920 | } |
921 | 921 | |
922 | 922 | /** |
923 | - * Get Latest ACARS data from DB |
|
924 | - * |
|
925 | - * @return Array Return ACARS data in array |
|
926 | - */ |
|
923 | + * Get Latest ACARS data from DB |
|
924 | + * |
|
925 | + * @return Array Return ACARS data in array |
|
926 | + */ |
|
927 | 927 | public function getLatestAcarsData($limit = '',$label = '') { |
928 | 928 | global $globalURL, $globalDBdriver; |
929 | 929 | $Image = new Image($this->db); |
@@ -1011,10 +1011,10 @@ discard block |
||
1011 | 1011 | } |
1012 | 1012 | |
1013 | 1013 | /** |
1014 | - * Get Archive ACARS data from DB |
|
1015 | - * |
|
1016 | - * @return Array Return ACARS data in array |
|
1017 | - */ |
|
1014 | + * Get Archive ACARS data from DB |
|
1015 | + * |
|
1016 | + * @return Array Return ACARS data in array |
|
1017 | + */ |
|
1018 | 1018 | public function getArchiveAcarsData($limit = '',$label = '') { |
1019 | 1019 | global $globalURL, $globalDBdriver; |
1020 | 1020 | $Image = new Image($this->db); |
@@ -1102,13 +1102,13 @@ discard block |
||
1102 | 1102 | } |
1103 | 1103 | |
1104 | 1104 | /** |
1105 | - * Add ModeS data to DB |
|
1106 | - * |
|
1107 | - * @param String $ident ident |
|
1108 | - * @param String $registration Registration of the aircraft |
|
1109 | - * @param String $icao |
|
1110 | - * @param String $ICAOTypeCode |
|
1111 | - */ |
|
1105 | + * Add ModeS data to DB |
|
1106 | + * |
|
1107 | + * @param String $ident ident |
|
1108 | + * @param String $registration Registration of the aircraft |
|
1109 | + * @param String $icao |
|
1110 | + * @param String $ICAOTypeCode |
|
1111 | + */ |
|
1112 | 1112 | public function addModeSData($ident,$registration,$icao = '',$ICAOTypeCode = '',$latitude = '', $longitude = '') { |
1113 | 1113 | global $globalDebug, $globalDBdriver; |
1114 | 1114 | $ident = trim($ident); |
@@ -322,14 +322,14 @@ discard block |
||
322 | 322 | </tr> |
323 | 323 | <!-- |
324 | 324 | <?php |
325 | - if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
326 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
327 | - $Connection = new Connection(); |
|
325 | + if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
326 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
327 | + $Connection = new Connection(); |
|
328 | 328 | ?> |
329 | 329 | --> |
330 | 330 | <?php |
331 | 331 | if ($Connection->db != NULL) { |
332 | - if ($Connection->tableExists('source_location')) { |
|
332 | + if ($Connection->tableExists('source_location')) { |
|
333 | 333 | require_once(dirname(__FILE__).'/../require/class.Source.php'); |
334 | 334 | $Source = new Source(); |
335 | 335 | //$alllocations = $Source->getAllLocationInfo(); |
@@ -349,9 +349,9 @@ discard block |
||
349 | 349 | |
350 | 350 | <?php |
351 | 351 | } |
352 | - } |
|
352 | + } |
|
353 | + } |
|
353 | 354 | } |
354 | - } |
|
355 | 355 | ?> |
356 | 356 | |
357 | 357 | <tr> |
@@ -461,12 +461,12 @@ discard block |
||
461 | 461 | ?> |
462 | 462 | <tr> |
463 | 463 | <?php |
464 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
464 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
465 | 465 | ?> |
466 | 466 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
467 | 467 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
468 | 468 | <?php |
469 | - } else { |
|
469 | + } else { |
|
470 | 470 | $hostport = explode(':',$source['host']); |
471 | 471 | if (isset($hostport[1])) { |
472 | 472 | $host = $hostport[0]; |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
480 | 480 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
481 | 481 | <?php |
482 | - } |
|
482 | + } |
|
483 | 483 | ?> |
484 | 484 | <td> |
485 | 485 | <select name="format[]" id="format"> |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | <br /> |
894 | 894 | <p> |
895 | 895 | <?php |
896 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
896 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
897 | 897 | ?> |
898 | 898 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
899 | 899 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -903,11 +903,11 @@ discard block |
||
903 | 903 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
904 | 904 | <?php |
905 | 905 | } |
906 | - } else { |
|
906 | + } else { |
|
907 | 907 | ?> |
908 | 908 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
909 | 909 | <?php |
910 | - } |
|
910 | + } |
|
911 | 911 | ?> |
912 | 912 | </p> |
913 | 913 | <br /> |
@@ -931,7 +931,7 @@ discard block |
||
931 | 931 | </p> |
932 | 932 | <?php |
933 | 933 | require('../footer.php'); |
934 | - exit; |
|
934 | + exit; |
|
935 | 935 | } |
936 | 936 | // ' |
937 | 937 | $settings = array(); |
@@ -1022,8 +1022,8 @@ discard block |
||
1022 | 1022 | |
1023 | 1023 | $sources = array(); |
1024 | 1024 | foreach ($source_name as $keys => $name) { |
1025 | - if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
1026 | - else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
1025 | + if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
1026 | + else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
1027 | 1027 | } |
1028 | 1028 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
1029 | 1029 | |
@@ -1408,14 +1408,14 @@ discard block |
||
1408 | 1408 | |
1409 | 1409 | // Set some defaults values... |
1410 | 1410 | if (!isset($globalAircraftImageSources)) { |
1411 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1412 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1411 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1412 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1413 | 1413 | } |
1414 | 1414 | |
1415 | 1415 | if (!isset($globalSchedulesSources)) { |
1416 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1417 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1418 | - } |
|
1416 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1417 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1418 | + } |
|
1419 | 1419 | |
1420 | 1420 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
1421 | 1421 | |
@@ -1462,21 +1462,21 @@ discard block |
||
1462 | 1462 | $popi = false; |
1463 | 1463 | $popw = false; |
1464 | 1464 | foreach ($_SESSION['done'] as $done) { |
1465 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1466 | - if ($done == 'Create database') $pop = true; |
|
1467 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
1468 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
1469 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
1465 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1466 | + if ($done == 'Create database') $pop = true; |
|
1467 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
1468 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
1469 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
1470 | 1470 | } |
1471 | 1471 | if ($pop) { |
1472 | - sleep(5); |
|
1473 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
1472 | + sleep(5); |
|
1473 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
1474 | 1474 | } else if ($popi) { |
1475 | - sleep(5); |
|
1476 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
1475 | + sleep(5); |
|
1476 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
1477 | 1477 | } else if ($popw) { |
1478 | - sleep(5); |
|
1479 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
1478 | + sleep(5); |
|
1479 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
1480 | 1480 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
1481 | 1481 | print '</div></ul>'; |
1482 | 1482 | print '<div id="error"></div>'; |
@@ -1539,7 +1539,7 @@ discard block |
||
1539 | 1539 | unset($_COOKIE['install']); |
1540 | 1540 | print '<div class="info column"><ul>'; |
1541 | 1541 | foreach ($_SESSION['done'] as $done) { |
1542 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1542 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1543 | 1543 | } |
1544 | 1544 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
1545 | 1545 | print '</ul></div>'; |
@@ -1,49 +1,49 @@ |
||
1 | 1 | #!/usr/bin/php |
2 | 2 | <?php |
3 | - require_once('../require/settings.php'); |
|
4 | - if ($globalInstalled) { |
|
5 | - //echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | - echo "Use install/index.php instead. You really don't want to use this."; |
|
7 | - exit; |
|
8 | - } |
|
9 | - require('class.update_db.php'); |
|
10 | - echo "Populate all tables...\n"; |
|
11 | - update_db::update_all(); |
|
12 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
13 | - update_db::update_waypoints(); |
|
14 | - echo "Done !\n"; |
|
15 | - echo "Install airspace..."; |
|
16 | - update_db::update_airspace(); |
|
17 | - echo "Done !\n"; |
|
18 | - echo "Install countries..."; |
|
19 | - update_db::update_countries(); |
|
20 | - echo "Done !\n"; |
|
21 | - if (isset($globalOwner) && $globalOwner) { |
|
3 | + require_once('../require/settings.php'); |
|
4 | + if ($globalInstalled) { |
|
5 | + //echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | + echo "Use install/index.php instead. You really don't want to use this."; |
|
7 | + exit; |
|
8 | + } |
|
9 | + require('class.update_db.php'); |
|
10 | + echo "Populate all tables...\n"; |
|
11 | + update_db::update_all(); |
|
12 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
13 | + update_db::update_waypoints(); |
|
14 | + echo "Done !\n"; |
|
15 | + echo "Install airspace..."; |
|
16 | + update_db::update_airspace(); |
|
17 | + echo "Done !\n"; |
|
18 | + echo "Install countries..."; |
|
19 | + update_db::update_countries(); |
|
20 | + echo "Done !\n"; |
|
21 | + if (isset($globalOwner) && $globalOwner) { |
|
22 | 22 | echo "Install private owners..."; |
23 | 23 | update_db::update_owner_fam(); |
24 | - echo "Done !\n"; |
|
25 | - } |
|
26 | - /* |
|
24 | + echo "Done !\n"; |
|
25 | + } |
|
26 | + /* |
|
27 | 27 | if (isset($globalIVAO) && $globalIVAO) { |
28 | 28 | echo "Install IVAO airlines and logos..."; |
29 | 29 | update_db::update_IVAO(); |
30 | 30 | echo "Done !\n"; |
31 | 31 | } |
32 | 32 | */ |
33 | - if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
33 | + if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
34 | 34 | echo "Install NOTAM from notaminfo.com..."; |
35 | - update_db:update_notam(); |
|
36 | - echo "Done !\n"; |
|
37 | - } |
|
38 | - if (isset($globalMap3D) && $globalMap3D) { |
|
35 | + update_db:update_notam(); |
|
36 | + echo "Done !\n"; |
|
37 | + } |
|
38 | + if (isset($globalMap3D) && $globalMap3D) { |
|
39 | 39 | echo "Install 3D models..."; |
40 | 40 | update_db::update_models(); |
41 | 41 | echo "Done !\n"; |
42 | 42 | if (isset($globalMapSatellites) && $globalMapSatellites) { |
43 | - echo "Install Space 3D models..."; |
|
44 | - update_db::update_space_models(); |
|
45 | - echo "Done !\n"; |
|
46 | - } |
|
47 | - } |
|
43 | + echo "Install Space 3D models..."; |
|
44 | + update_db::update_space_models(); |
|
45 | + echo "Done !\n"; |
|
46 | + } |
|
47 | + } |
|
48 | 48 | |
49 | 49 | ?> |
50 | 50 | \ No newline at end of file |