@@ -14,35 +14,35 @@ discard block |
||
14 | 14 | if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline'; |
15 | 15 | |
16 | 16 | if (isset($_GET['3d'])) { |
17 | - setcookie('MapFormat','3d'); |
|
17 | + setcookie('MapFormat', '3d'); |
|
18 | 18 | } else if (isset($_GET['2d'])) { |
19 | - setcookie('MapFormat','2d'); |
|
19 | + setcookie('MapFormat', '2d'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
23 | - $tsk = filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); |
|
23 | + $tsk = filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | if (isset($_POST['archive'])) { |
27 | - setcookie('archive','true'); |
|
28 | - setcookie('archive_begin',strtotime($_POST['start_date'])); |
|
29 | - setcookie('archive_end',strtotime($_POST['end_date'])); |
|
30 | - setcookie('archive_speed',$_POST['archivespeed']); |
|
27 | + setcookie('archive', 'true'); |
|
28 | + setcookie('archive_begin', strtotime($_POST['start_date'])); |
|
29 | + setcookie('archive_end', strtotime($_POST['end_date'])); |
|
30 | + setcookie('archive_speed', $_POST['archivespeed']); |
|
31 | 31 | } |
32 | 32 | if (isset($_POST['noarchive'])) { |
33 | - setcookie('archive','false',-1); |
|
34 | - setcookie('archive_begin','',-1); |
|
35 | - setcookie('archive_end','',-1); |
|
36 | - setcookie('archive_speed','',-1); |
|
33 | + setcookie('archive', 'false', -1); |
|
34 | + setcookie('archive_begin', '', -1); |
|
35 | + setcookie('archive_end', '', -1); |
|
36 | + setcookie('archive_speed', '', -1); |
|
37 | 37 | } |
38 | 38 | // When button "Remove all filters" is clicked |
39 | 39 | if (isset($_POST['removefilters'])) { |
40 | - $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
|
41 | - return strpos($key,'filter_') === 0; |
|
40 | + $allfilters = array_filter(array_keys($_COOKIE), function($key) { |
|
41 | + return strpos($key, 'filter_') === 0; |
|
42 | 42 | }); |
43 | 43 | foreach ($allfilters as $filt) { |
44 | 44 | unset($_COOKIE[$filt]); |
45 | - setcookie($filt,null,-1); |
|
45 | + setcookie($filt, null, -1); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | ?> |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
265 | 265 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
266 | 266 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
267 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
267 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if (isset($latitude)) print '&latitude='.$latitude; ?><?php if (isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
268 | 268 | <?php |
269 | 269 | if (!isset($type) || $type == 'aircraft') { |
270 | 270 | ?> |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
338 | 338 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
339 | 339 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
340 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
340 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if (isset($latitude)) print '&latitude='.$latitude; ?><?php if (isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
341 | 341 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
342 | 342 | <?php |
343 | 343 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -742,8 +742,8 @@ discard block |
||
742 | 742 | ?> |
743 | 743 | <div class="search"> |
744 | 744 | <form action="<?php print $globalURL; ?>/search" method="get"> |
745 | - <!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>--> |
|
746 | - <input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != ""){ print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
|
745 | + <!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != "") { print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>--> |
|
746 | + <input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != "") { print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
|
747 | 747 | </form> |
748 | 748 | </div> |
749 | 749 | <div class="social"> |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | print '</div>'; |
762 | 762 | } |
763 | 763 | |
764 | -if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
|
764 | +if (strtolower($current_page) == 'ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
|
765 | 765 | ?> |
766 | 766 | <div class="top-header clear" role="main"> |
767 | 767 | <?php |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | </div> |
775 | 775 | <?php |
776 | 776 | } |
777 | -if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
|
777 | +if ((strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) || (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false)) |
|
778 | 778 | { |
779 | 779 | ?> |
780 | 780 | <div class="top-header clear" role="main"> |
@@ -787,15 +787,15 @@ discard block |
||
787 | 787 | var zoom = 13; |
788 | 788 | //create the map |
789 | 789 | <?php |
790 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
790 | + if (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
791 | 791 | ?> |
792 | 792 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
793 | 793 | <?php |
794 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
794 | + } elseif (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) { |
|
795 | 795 | ?> |
796 | 796 | map = L.map('map', { zoomControl:true }); |
797 | 797 | <?php |
798 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
798 | + } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
799 | 799 | ?> |
800 | 800 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
801 | 801 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
804 | 804 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
805 | 805 | <?php |
806 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
806 | + } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
807 | 807 | ?> |
808 | 808 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
809 | 809 | <?php |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | $gpx .= '<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpsies="http://www.gpsies.com/GPX/1/0" creator="GPSies http://www.gpsies.com - Sendl.-O&apos;sch-heim" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.gpsies.com/GPX/1/0 http://www.gpsies.com/gpsies.xsd">'; |
45 | 45 | $gpx .= '<trk>'; |
46 | 46 | $gpx .= '<trkseg>'; |
47 | - foreach($spotter_history_array as $spotter_data) { |
|
48 | - $gpx .= '<trkpt lat="'.sprintf("%.8f",$spotter_data['latitude']).'" lon="'.sprintf("%.8f",$spotter_data['longitude']).'">'; |
|
49 | - if (isset($spotter_data['altitude'])) $gpx .= '<ele>'.sprintf("%.6f",$spotter_data['altitude']).'</ele>'; |
|
50 | - $gpx .= '<time>'.date("Y-m-d\TH:i:s\Z",strtotime($spotter_data['date'])).'</time>'; |
|
47 | + foreach ($spotter_history_array as $spotter_data) { |
|
48 | + $gpx .= '<trkpt lat="'.sprintf("%.8f", $spotter_data['latitude']).'" lon="'.sprintf("%.8f", $spotter_data['longitude']).'">'; |
|
49 | + if (isset($spotter_data['altitude'])) $gpx .= '<ele>'.sprintf("%.6f", $spotter_data['altitude']).'</ele>'; |
|
50 | + $gpx .= '<time>'.date("Y-m-d\TH:i:s\Z", strtotime($spotter_data['date'])).'</time>'; |
|
51 | 51 | $gpx .= '</trkpt>'; |
52 | 52 | } |
53 | 53 | $gpx .= '</trkseg>'; |
@@ -84,18 +84,18 @@ discard block |
||
84 | 84 | global $globalMapMatchingMaxPts, $globalTrackMatchingAppKey, $globalTrackMatchingAppId; |
85 | 85 | if (!isset($globalMapMatchingMaxPts)) $globalMapMatchingMaxPts = 100; |
86 | 86 | if (count($spotter_history_array) < 2) return $spotter_history_array; |
87 | - if (count($spotter_history_array) > $globalMapMatchingMaxPts) $spotter_history_array = array_slice($spotter_history_array,-$globalMapMatchingMaxPts); |
|
87 | + if (count($spotter_history_array) > $globalMapMatchingMaxPts) $spotter_history_array = array_slice($spotter_history_array, -$globalMapMatchingMaxPts); |
|
88 | 88 | $data = $this->create_gpx($spotter_history_array); |
89 | 89 | $url = 'https://test.roadmatching.com/rest/mapmatch/?app_id='.$globalTrackMatchingAppId.'&app_key='.$globalTrackMatchingAppKey.'&output.waypoints=true'; |
90 | 90 | $Common = new Common(); |
91 | - $matching = $Common->getData($url,'post',$data,array('Content-Type: application/gpx+xml','Accept: application/json')); |
|
92 | - $matching = json_decode($matching,true); |
|
91 | + $matching = $Common->getData($url, 'post', $data, array('Content-Type: application/gpx+xml', 'Accept: application/json')); |
|
92 | + $matching = json_decode($matching, true); |
|
93 | 93 | if (isset($matching['diary']['entries'][0]['route']['links'])) { |
94 | 94 | $spotter_history_array = array(); |
95 | 95 | foreach ($matching['diary']['entries'][0]['route']['links'] as $match) { |
96 | 96 | if (isset($match['wpts'])) { |
97 | 97 | foreach ($match['wpts'] as $coord) { |
98 | - $spotter_history_array[] = array('longitude' => $coord['x'],'latitude' => $coord['y']); |
|
98 | + $spotter_history_array[] = array('longitude' => $coord['x'], 'latitude' => $coord['y']); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | } |
@@ -115,22 +115,22 @@ discard block |
||
115 | 115 | if (count($spotter_history_array) < 2) return $spotter_history_array; |
116 | 116 | $spotter_history_initial_array = array(); |
117 | 117 | if (count($spotter_history_array) > $globalMapMatchingMaxPts) { |
118 | - $spotter_history_array = array_slice($spotter_history_array,-$globalMapMatchingMaxPts); |
|
119 | - $spotter_history_initial_array = array_slice($spotter_history_array,0,count($spotter_history_array)-$globalMapMatchingMaxPts); |
|
118 | + $spotter_history_array = array_slice($spotter_history_array, -$globalMapMatchingMaxPts); |
|
119 | + $spotter_history_initial_array = array_slice($spotter_history_array, 0, count($spotter_history_array) - $globalMapMatchingMaxPts); |
|
120 | 120 | } |
121 | 121 | $data = $this->create_gpx($spotter_history_array); |
122 | 122 | $url = 'https://graphhopper.com/api/1/match?vehicle=car&points_encoded=0&instructions=false&key='.$globalGraphHopperKey; |
123 | 123 | $Common = new Common(); |
124 | - $matching = $Common->getData($url,'post',$data,array('Content-Type: application/gpx+xml')); |
|
125 | - $matching = json_decode($matching,true); |
|
124 | + $matching = $Common->getData($url, 'post', $data, array('Content-Type: application/gpx+xml')); |
|
125 | + $matching = json_decode($matching, true); |
|
126 | 126 | if (isset($matching['paths'][0]['points']['coordinates'])) { |
127 | 127 | $spotter_history_array = array(); |
128 | 128 | foreach ($matching['paths'][0]['points']['coordinates'] as $match) { |
129 | 129 | $coord = $match; |
130 | - $spotter_history_array[] = array('longitude' => $coord[0],'latitude' => $coord[1]); |
|
130 | + $spotter_history_array[] = array('longitude' => $coord[0], 'latitude' => $coord[1]); |
|
131 | 131 | } |
132 | 132 | } |
133 | - $spotter_history_array = array_merge($spotter_history_initial_array,$spotter_history_array); |
|
133 | + $spotter_history_array = array_merge($spotter_history_initial_array, $spotter_history_array); |
|
134 | 134 | $spotter_history_array[0]['mapmatching_engine'] = 'graphhopper'; |
135 | 135 | return $spotter_history_array; |
136 | 136 | } |
@@ -146,23 +146,23 @@ discard block |
||
146 | 146 | if (count($spotter_history_array) < 2) return $spotter_history_array; |
147 | 147 | $spotter_history_initial_array = array(); |
148 | 148 | if (count($spotter_history_array) > $globalMapMatchingMaxPts) { |
149 | - $spotter_history_array = array_slice($spotter_history_array,-$globalMapMatchingMaxPts); |
|
150 | - $spotter_history_initial_array = array_slice($spotter_history_array,0,count($spotter_history_array)-$globalMapMatchingMaxPts); |
|
149 | + $spotter_history_array = array_slice($spotter_history_array, -$globalMapMatchingMaxPts); |
|
150 | + $spotter_history_initial_array = array_slice($spotter_history_array, 0, count($spotter_history_array) - $globalMapMatchingMaxPts); |
|
151 | 151 | } |
152 | 152 | $data = $this->create_gpx($spotter_history_array); |
153 | 153 | $url = 'https://mapmatching.flightairmap.com/api/1/match?vehicle=car&points_encoded=0&instructions=false'; |
154 | 154 | //$url = 'https://mapmatching.flightairmap.com/api/1/match?vehicle=car&points_encoded=0'; |
155 | 155 | $Common = new Common(); |
156 | - $matching = $Common->getData($url,'post',$data,array('Content-Type: application/gpx+xml')); |
|
157 | - $matching = json_decode($matching,true); |
|
156 | + $matching = $Common->getData($url, 'post', $data, array('Content-Type: application/gpx+xml')); |
|
157 | + $matching = json_decode($matching, true); |
|
158 | 158 | if (isset($matching['paths'][0]['points']['coordinates'])) { |
159 | 159 | $spotter_history_array = array(); |
160 | 160 | foreach ($matching['paths'][0]['points']['coordinates'] as $match) { |
161 | 161 | $coord = $match; |
162 | - $spotter_history_array[] = array('longitude' => $coord[0],'latitude' => $coord[1]); |
|
162 | + $spotter_history_array[] = array('longitude' => $coord[0], 'latitude' => $coord[1]); |
|
163 | 163 | } |
164 | 164 | } |
165 | - $spotter_history_array = array_merge($spotter_history_initial_array,$spotter_history_array); |
|
165 | + $spotter_history_array = array_merge($spotter_history_initial_array, $spotter_history_array); |
|
166 | 166 | $spotter_history_array[0]['mapmatching_engine'] = 'fam'; |
167 | 167 | return $spotter_history_array; |
168 | 168 | } |
@@ -178,8 +178,8 @@ discard block |
||
178 | 178 | if (count($spotter_history_array) < 2) return $spotter_history_array; |
179 | 179 | $spotter_history_initial_array = array(); |
180 | 180 | if (count($spotter_history_array) > $globalMapMatchingMaxPts) { |
181 | - $spotter_history_array = array_slice($spotter_history_array,-$globalMapMatchingMaxPts); |
|
182 | - $spotter_history_initial_array = array_slice($spotter_history_array,0,count($spotter_history_array)-$globalMapMatchingMaxPts); |
|
181 | + $spotter_history_array = array_slice($spotter_history_array, -$globalMapMatchingMaxPts); |
|
182 | + $spotter_history_initial_array = array_slice($spotter_history_array, 0, count($spotter_history_array) - $globalMapMatchingMaxPts); |
|
183 | 183 | } |
184 | 184 | $coord = ''; |
185 | 185 | $ts = ''; |
@@ -195,15 +195,15 @@ discard block |
||
195 | 195 | $url = 'https://router.project-osrm.org/match/v1/driving/'.$coord.'?timestamps='.$ts.'&overview=full&geometries=geojson&tidy=true&gaps=ignore'; |
196 | 196 | $Common = new Common(); |
197 | 197 | $matching = $Common->getData($url); |
198 | - $matching = json_decode($matching,true); |
|
198 | + $matching = json_decode($matching, true); |
|
199 | 199 | if (isset($matching['matchings'][0]['geometry']['coordinates'])) { |
200 | 200 | $spotter_history_array = array(); |
201 | 201 | foreach ($matching['matchings'][0]['geometry']['coordinates'] as $match) { |
202 | 202 | $coord = $match; |
203 | - $spotter_history_array[] = array('longitude' => $coord[0],'latitude' => $coord[1]); |
|
203 | + $spotter_history_array[] = array('longitude' => $coord[0], 'latitude' => $coord[1]); |
|
204 | 204 | } |
205 | 205 | } |
206 | - $spotter_history_array = array_merge($spotter_history_initial_array,$spotter_history_array); |
|
206 | + $spotter_history_array = array_merge($spotter_history_initial_array, $spotter_history_array); |
|
207 | 207 | $spotter_history_array[0]['mapmatching_engine'] = 'osmr'; |
208 | 208 | return $spotter_history_array; |
209 | 209 | } |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | if (count($spotter_history_array) < 2) return $spotter_history_array; |
220 | 220 | $spotter_history_initial_array = array(); |
221 | 221 | if (count($spotter_history_array) > $globalMapMatchingMaxPts) { |
222 | - $spotter_history_array = array_slice($spotter_history_array,-$globalMapMatchingMaxPts); |
|
223 | - $spotter_history_initial_array = array_slice($spotter_history_array,0,count($spotter_history_array)-$globalMapMatchingMaxPts); |
|
222 | + $spotter_history_array = array_slice($spotter_history_array, -$globalMapMatchingMaxPts); |
|
223 | + $spotter_history_initial_array = array_slice($spotter_history_array, 0, count($spotter_history_array) - $globalMapMatchingMaxPts); |
|
224 | 224 | } |
225 | 225 | $coord = ''; |
226 | 226 | $ts = ''; |
@@ -237,15 +237,15 @@ discard block |
||
237 | 237 | $url = 'https://api.mapbox.com/matching/v5/mapbox/driving/'.$coord.'?access_token='.$globalMapboxToken.'×tamps='.$ts.'&overview=full&tidy=true&geometries=geojson'; |
238 | 238 | $Common = new Common(); |
239 | 239 | $matching = $Common->getData($url); |
240 | - $matching = json_decode($matching,true); |
|
240 | + $matching = json_decode($matching, true); |
|
241 | 241 | if (isset($matching['matchings'][0]['geometry']['coordinates'])) { |
242 | 242 | $spotter_history_array = array(); |
243 | 243 | foreach ($matching['matchings'][0]['geometry']['coordinates'] as $match) { |
244 | 244 | $coord = $match; |
245 | - $spotter_history_array[] = array('longitude' => $coord[0],'latitude' => $coord[1]); |
|
245 | + $spotter_history_array[] = array('longitude' => $coord[0], 'latitude' => $coord[1]); |
|
246 | 246 | } |
247 | 247 | } |
248 | - $spotter_history_array = array_merge($spotter_history_initial_array,$spotter_history_array); |
|
248 | + $spotter_history_array = array_merge($spotter_history_initial_array, $spotter_history_array); |
|
249 | 249 | $spotter_history_array[0]['mapmatching_engine'] = 'mapbox'; |
250 | 250 | return $spotter_history_array; |
251 | 251 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | require_once(dirname(__FILE__).'/class.create_db.php'); |
23 | 23 | require_once(dirname(__FILE__).'/class.update_schema.php'); |
24 | 24 | require_once(dirname(__FILE__).'/class.settings.php'); |
25 | -$title="Install"; |
|
25 | +$title = "Install"; |
|
26 | 26 | require(dirname(__FILE__).'/../require/settings.php'); |
27 | 27 | require_once(dirname(__FILE__).'/../require/class.Common.php'); |
28 | 28 | require(dirname(__FILE__).'/header.php'); |
@@ -95,8 +95,8 @@ discard block |
||
95 | 95 | if (!extension_loaded('curl')) { |
96 | 96 | $error[] = "Curl is not loaded."; |
97 | 97 | } |
98 | - if(function_exists('apache_get_modules') ){ |
|
99 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
98 | + if (function_exists('apache_get_modules')) { |
|
99 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
100 | 100 | $error[] = "mod_rewrite is not available."; |
101 | 101 | } |
102 | 102 | /* |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) { |
114 | 114 | if (function_exists('get_headers')) { |
115 | 115 | //$check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/','install'),'search',str_replace('index.php','',$_SERVER["REQUEST_URI"]))); |
116 | - $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/','install'),'live/geojson?test',str_replace('index.php','',$_SERVER["REQUEST_URI"]))); |
|
117 | - if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) { |
|
116 | + $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/', 'install'), 'live/geojson?test', str_replace('index.php', '', $_SERVER["REQUEST_URI"]))); |
|
117 | + if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) { |
|
118 | 118 | print '<div class="info column"><p><strong>Check your configuration, rewrite don\'t seems to work well. If using Apache, you need to desactivate MultiViews <a href="https://github.com/Ysurac/FlightAirMap/wiki/Apache-configuration">https://github.com/Ysurac/FlightAirMap/wiki/Apache-configuration</a></strong></p></div>'; |
119 | 119 | } |
120 | 120 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
194 | 194 | if (isset($_SERVER['REQUEST_URI'])) { |
195 | 195 | $URL = $_SERVER['REQUEST_URI']; |
196 | - $globalURL = str_replace('/install','',str_replace('/install/','',str_replace('/install/index.php','',$URL))); |
|
196 | + $globalURL = str_replace('/install', '', str_replace('/install/', '', str_replace('/install/index.php', '', $URL))); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | ?> |
@@ -516,13 +516,13 @@ discard block |
||
516 | 516 | ?> |
517 | 517 | <tr> |
518 | 518 | <?php |
519 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
519 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
520 | 520 | ?> |
521 | 521 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
522 | 522 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
523 | 523 | <?php |
524 | 524 | } else { |
525 | - $hostport = explode(':',$source['host']); |
|
525 | + $hostport = explode(':', $source['host']); |
|
526 | 526 | if (isset($hostport[1])) { |
527 | 527 | $host = $hostport[0]; |
528 | 528 | $port = $hostport[1]; |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | <select name="timezones[]" id="timezones"> |
572 | 572 | <?php |
573 | 573 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
574 | - foreach($timezonelist as $timezones){ |
|
574 | + foreach ($timezonelist as $timezones) { |
|
575 | 575 | if (isset($source['timezone']) && $source['timezone'] == $timezones) { |
576 | 576 | print '<option selected>'.$timezones.'</option>'; |
577 | 577 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | <select name="timezones[]" id="timezones"> |
626 | 626 | <?php |
627 | 627 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
628 | - foreach($timezonelist as $timezones){ |
|
628 | + foreach ($timezonelist as $timezones) { |
|
629 | 629 | if ($timezones == 'UTC') { |
630 | 630 | print '<option selected>'.$timezones.'</option>'; |
631 | 631 | } else print '<option>'.$timezones.'</option>'; |
@@ -1079,7 +1079,7 @@ discard block |
||
1079 | 1079 | <br /> |
1080 | 1080 | <p> |
1081 | 1081 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
1082 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
1082 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
1083 | 1083 | </p> |
1084 | 1084 | <br /> |
1085 | 1085 | <p> |
@@ -1141,14 +1141,14 @@ discard block |
||
1141 | 1141 | $error = ''; |
1142 | 1142 | |
1143 | 1143 | if (isset($_POST['dbtype'])) { |
1144 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
1145 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
1146 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
1147 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
1148 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
1149 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
1150 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
1151 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
1144 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
1145 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
1146 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
1147 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
1148 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
1149 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
1150 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
1151 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
1152 | 1152 | |
1153 | 1153 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
1154 | 1154 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -1168,49 +1168,49 @@ discard block |
||
1168 | 1168 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
1169 | 1169 | */ |
1170 | 1170 | |
1171 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
1171 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
1172 | 1172 | |
1173 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
1174 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
1175 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
1176 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
1177 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
1173 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
1174 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
1175 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
1176 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
1177 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
1178 | 1178 | |
1179 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
1180 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
1181 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
1182 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
1183 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
1184 | - $openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING); |
|
1185 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
1186 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
1187 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
1188 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
1179 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
1180 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
1181 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
1182 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
1183 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
1184 | + $openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING); |
|
1185 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
1186 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
1187 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
1188 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
1189 | 1189 | |
1190 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
1191 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
1192 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
1193 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
1194 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
1195 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
1190 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
1191 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
1192 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
1193 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
1194 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
1195 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
1196 | 1196 | |
1197 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
1198 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
1197 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
1198 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
1199 | 1199 | |
1200 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
1201 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
1202 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
1200 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
1201 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
1202 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
1203 | 1203 | |
1204 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
1204 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
1205 | 1205 | if ($acars == 'acars') { |
1206 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
1206 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
1207 | 1207 | } else { |
1208 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
1208 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
1209 | 1209 | } |
1210 | 1210 | |
1211 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
1212 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
1213 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
1211 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
1212 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
1213 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
1214 | 1214 | |
1215 | 1215 | $source_name = $_POST['source_name']; |
1216 | 1216 | $source_latitude = $_POST['source_latitude']; |
@@ -1224,8 +1224,8 @@ discard block |
||
1224 | 1224 | |
1225 | 1225 | $sources = array(); |
1226 | 1226 | foreach ($source_name as $keys => $name) { |
1227 | - 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]); |
|
1228 | - 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]); |
|
1227 | + 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]); |
|
1228 | + 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]); |
|
1229 | 1229 | } |
1230 | 1230 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
1231 | 1231 | |
@@ -1234,16 +1234,16 @@ discard block |
||
1234 | 1234 | $newstype = $_POST['newstype']; |
1235 | 1235 | |
1236 | 1236 | $newsfeeds = array(); |
1237 | - foreach($newsurl as $newskey => $url) { |
|
1237 | + foreach ($newsurl as $newskey => $url) { |
|
1238 | 1238 | if ($url != '') { |
1239 | 1239 | $type = $newstype[$newskey]; |
1240 | 1240 | $lng = $newslng[$newskey]; |
1241 | 1241 | if (isset($newsfeeds[$type][$lng])) { |
1242 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
1242 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng], array($url)); |
|
1243 | 1243 | } else $newsfeeds[$type][$lng] = array($url); |
1244 | 1244 | } |
1245 | 1245 | } |
1246 | - $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
|
1246 | + $settings = array_merge($settings, array('globalNewsFeeds' => $newsfeeds)); |
|
1247 | 1247 | |
1248 | 1248 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
1249 | 1249 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -1254,27 +1254,27 @@ discard block |
||
1254 | 1254 | $sbsurl = $_POST['sbsurl']; |
1255 | 1255 | */ |
1256 | 1256 | |
1257 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
1258 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
1259 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
1260 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
1261 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
1262 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
1263 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
1264 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
1257 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
1258 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
1259 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
1260 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
1261 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
1262 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
1263 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
1264 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
1265 | 1265 | |
1266 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
1267 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
1268 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1269 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
1270 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
1271 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1272 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
1273 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
1274 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1275 | - $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
|
1276 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
1277 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
1266 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
1267 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
1268 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
1269 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
1270 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
1271 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
1272 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
1273 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
1274 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
1275 | + $globalsatellite = filter_input(INPUT_POST, 'globalsatellite', FILTER_SANITIZE_STRING); |
|
1276 | + if ($globalsatellite == 'satellite') $settings = array_merge($settings, array('globalSatellite' => 'TRUE')); |
|
1277 | + else $settings = array_merge($settings, array('globalSatellite' => 'FALSE')); |
|
1278 | 1278 | |
1279 | 1279 | /* |
1280 | 1280 | $globalSBS1Hosts = array(); |
@@ -1290,7 +1290,7 @@ discard block |
||
1290 | 1290 | } |
1291 | 1291 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
1292 | 1292 | */ |
1293 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
1293 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
1294 | 1294 | $host = $_POST['host']; |
1295 | 1295 | $port = $_POST['port']; |
1296 | 1296 | $name = $_POST['name']; |
@@ -1307,115 +1307,115 @@ discard block |
||
1307 | 1307 | else $cov = 'FALSE'; |
1308 | 1308 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
1309 | 1309 | else $arch = 'FALSE'; |
1310 | - if (strpos($format[$key],'_callback')) { |
|
1311 | - $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
|
1310 | + if (strpos($format[$key], '_callback')) { |
|
1311 | + $gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE'); |
|
1312 | 1312 | } elseif ($h != '' || $name[$key] != '') { |
1313 | - $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
|
1313 | + $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE'); |
|
1314 | 1314 | } |
1315 | 1315 | if ($format[$key] == 'airwhere') $forcepilots = true; |
1316 | 1316 | } |
1317 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
1317 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
1318 | 1318 | |
1319 | 1319 | /* |
1320 | 1320 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
1321 | 1321 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
1322 | 1322 | */ |
1323 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
1324 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
1325 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
1323 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
1324 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
1325 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
1326 | 1326 | |
1327 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
1328 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
1327 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
1328 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
1329 | 1329 | |
1330 | - $customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING); |
|
1331 | - $settings = array_merge($settings,array('globalCustomCSS' => $customcss)); |
|
1330 | + $customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING); |
|
1331 | + $settings = array_merge($settings, array('globalCustomCSS' => $customcss)); |
|
1332 | 1332 | |
1333 | - $map3dtile = filter_input(INPUT_POST,'map3dtileset',FILTER_SANITIZE_STRING); |
|
1334 | - $settings = array_merge($settings,array('globalMap3DTiles' => $map3dtile)); |
|
1333 | + $map3dtile = filter_input(INPUT_POST, 'map3dtileset', FILTER_SANITIZE_STRING); |
|
1334 | + $settings = array_merge($settings, array('globalMap3DTiles' => $map3dtile)); |
|
1335 | 1335 | |
1336 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
1337 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
1338 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
1339 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
1336 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
1337 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
1338 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
1339 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
1340 | 1340 | |
1341 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
1342 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
1343 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
1341 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
1342 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
1343 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
1344 | 1344 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
1345 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
1346 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1345 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
1346 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
1347 | 1347 | |
1348 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
1349 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
1350 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
1351 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
1352 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
1353 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
1354 | - $minfetch = filter_input(INPUT_POST,'minfetch',FILTER_SANITIZE_NUMBER_INT); |
|
1355 | - $settings = array_merge($settings,array('globalMinFetch' => $minfetch)); |
|
1356 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
1357 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
1348 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
1349 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
1350 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
1351 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
1352 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
1353 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
1354 | + $minfetch = filter_input(INPUT_POST, 'minfetch', FILTER_SANITIZE_NUMBER_INT); |
|
1355 | + $settings = array_merge($settings, array('globalMinFetch' => $minfetch)); |
|
1356 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
1357 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
1358 | 1358 | |
1359 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
1360 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
1359 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
1360 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
1361 | 1361 | |
1362 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
1363 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
1362 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
1363 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
1364 | 1364 | |
1365 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
1365 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
1366 | 1366 | if ($archiveyear == "archiveyear") { |
1367 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
1367 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
1368 | 1368 | } else { |
1369 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
1369 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
1370 | 1370 | } |
1371 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1372 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1373 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1374 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1371 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1372 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1373 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1374 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1375 | 1375 | |
1376 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
1377 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
1378 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
1379 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
1376 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
1377 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
1378 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
1379 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
1380 | 1380 | |
1381 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
1382 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
1383 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
1381 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
1382 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
1383 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
1384 | 1384 | |
1385 | 1385 | // Create in settings.php keys not yet configurable if not already here |
1386 | 1386 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1387 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1387 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
1388 | 1388 | |
1389 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
1389 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
1390 | 1390 | if ($resetyearstats == 'resetyearstats') { |
1391 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
1391 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
1392 | 1392 | } else { |
1393 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
1393 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
1394 | 1394 | } |
1395 | 1395 | |
1396 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
1396 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
1397 | 1397 | if ($archive == 'archive') { |
1398 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
1398 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
1399 | 1399 | } else { |
1400 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
1400 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
1401 | 1401 | } |
1402 | - $archiveresults = filter_input(INPUT_POST,'archiveresults',FILTER_SANITIZE_STRING); |
|
1402 | + $archiveresults = filter_input(INPUT_POST, 'archiveresults', FILTER_SANITIZE_STRING); |
|
1403 | 1403 | if ($archiveresults == 'archiveresults') { |
1404 | - $settings = array_merge($settings,array('globalArchiveResults' => 'TRUE')); |
|
1404 | + $settings = array_merge($settings, array('globalArchiveResults' => 'TRUE')); |
|
1405 | 1405 | } else { |
1406 | - $settings = array_merge($settings,array('globalArchiveResults' => 'FALSE')); |
|
1406 | + $settings = array_merge($settings, array('globalArchiveResults' => 'FALSE')); |
|
1407 | 1407 | } |
1408 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
1408 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
1409 | 1409 | if ($daemon == 'daemon') { |
1410 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
1410 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
1411 | 1411 | } else { |
1412 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
1412 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
1413 | 1413 | } |
1414 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
1414 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
1415 | 1415 | if ($schedules == 'schedules') { |
1416 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
1416 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
1417 | 1417 | } else { |
1418 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
1418 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
1419 | 1419 | } |
1420 | 1420 | |
1421 | 1421 | /* |
@@ -1426,274 +1426,274 @@ discard block |
||
1426 | 1426 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
1427 | 1427 | } |
1428 | 1428 | */ |
1429 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
1430 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1431 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1432 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1433 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1429 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
1430 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
1431 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
1432 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
1433 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
1434 | 1434 | $va = false; |
1435 | 1435 | if ($globalivao == 'ivao') { |
1436 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
1436 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
1437 | 1437 | $va = true; |
1438 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1438 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
1439 | 1439 | if ($globalvatsim == 'vatsim') { |
1440 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
1440 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
1441 | 1441 | $va = true; |
1442 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1442 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
1443 | 1443 | if ($globalphpvms == 'phpvms') { |
1444 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
1444 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
1445 | 1445 | $va = true; |
1446 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1446 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
1447 | 1447 | if ($globalvam == 'vam') { |
1448 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
1448 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
1449 | 1449 | $va = true; |
1450 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1450 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
1451 | 1451 | if ($va) { |
1452 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
1453 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1452 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
1453 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
1454 | 1454 | if ($globalva == 'va' || $va) { |
1455 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
1456 | - $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1455 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
1456 | + $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
1457 | 1457 | } else { |
1458 | - $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
1459 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1460 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
1458 | + $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
1459 | + if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
1460 | + else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE')); |
|
1461 | 1461 | } |
1462 | 1462 | |
1463 | 1463 | |
1464 | - $mapoffline = filter_input(INPUT_POST,'mapoffline',FILTER_SANITIZE_STRING); |
|
1464 | + $mapoffline = filter_input(INPUT_POST, 'mapoffline', FILTER_SANITIZE_STRING); |
|
1465 | 1465 | if ($mapoffline == 'mapoffline') { |
1466 | - $settings = array_merge($settings,array('globalMapOffline' => 'TRUE')); |
|
1466 | + $settings = array_merge($settings, array('globalMapOffline' => 'TRUE')); |
|
1467 | 1467 | } else { |
1468 | - $settings = array_merge($settings,array('globalMapOffline' => 'FALSE')); |
|
1468 | + $settings = array_merge($settings, array('globalMapOffline' => 'FALSE')); |
|
1469 | 1469 | } |
1470 | - $globaloffline = filter_input(INPUT_POST,'globaloffline',FILTER_SANITIZE_STRING); |
|
1470 | + $globaloffline = filter_input(INPUT_POST, 'globaloffline', FILTER_SANITIZE_STRING); |
|
1471 | 1471 | if ($globaloffline == 'globaloffline') { |
1472 | - $settings = array_merge($settings,array('globalOffline' => 'TRUE')); |
|
1472 | + $settings = array_merge($settings, array('globalOffline' => 'TRUE')); |
|
1473 | 1473 | } else { |
1474 | - $settings = array_merge($settings,array('globalOffline' => 'FALSE')); |
|
1474 | + $settings = array_merge($settings, array('globalOffline' => 'FALSE')); |
|
1475 | 1475 | } |
1476 | 1476 | |
1477 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
1477 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
1478 | 1478 | if ($notam == 'notam') { |
1479 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
1479 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
1480 | 1480 | } else { |
1481 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
1481 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
1482 | 1482 | } |
1483 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
1483 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
1484 | 1484 | if ($owner == 'owner') { |
1485 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
1485 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
1486 | 1486 | } else { |
1487 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
1487 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
1488 | 1488 | } |
1489 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
1489 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
1490 | 1490 | if ($map3d == 'map3d') { |
1491 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
1491 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
1492 | 1492 | } else { |
1493 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
1493 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
1494 | 1494 | } |
1495 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
1495 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
1496 | 1496 | if ($crash == 'crash') { |
1497 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
1497 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
1498 | 1498 | } else { |
1499 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
1499 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
1500 | 1500 | } |
1501 | - $fires = filter_input(INPUT_POST,'fires',FILTER_SANITIZE_STRING); |
|
1501 | + $fires = filter_input(INPUT_POST, 'fires', FILTER_SANITIZE_STRING); |
|
1502 | 1502 | if ($fires == 'fires') { |
1503 | - $settings = array_merge($settings,array('globalMapFires' => 'TRUE')); |
|
1503 | + $settings = array_merge($settings, array('globalMapFires' => 'TRUE')); |
|
1504 | 1504 | } else { |
1505 | - $settings = array_merge($settings,array('globalMapFires' => 'FALSE')); |
|
1505 | + $settings = array_merge($settings, array('globalMapFires' => 'FALSE')); |
|
1506 | 1506 | } |
1507 | - $firessupport = filter_input(INPUT_POST,'firessupport',FILTER_SANITIZE_STRING); |
|
1507 | + $firessupport = filter_input(INPUT_POST, 'firessupport', FILTER_SANITIZE_STRING); |
|
1508 | 1508 | if ($firessupport == 'firessupport') { |
1509 | - $settings = array_merge($settings,array('globalFires' => 'TRUE')); |
|
1509 | + $settings = array_merge($settings, array('globalFires' => 'TRUE')); |
|
1510 | 1510 | } else { |
1511 | - $settings = array_merge($settings,array('globalFires' => 'FALSE')); |
|
1511 | + $settings = array_merge($settings, array('globalFires' => 'FALSE')); |
|
1512 | 1512 | } |
1513 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
1513 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
1514 | 1514 | if ($mapsatellites == 'mapsatellites') { |
1515 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
1515 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
1516 | 1516 | } else { |
1517 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
1517 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
1518 | 1518 | } |
1519 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
1519 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
1520 | 1520 | if ($map3ddefault == 'map3ddefault') { |
1521 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
1521 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
1522 | 1522 | } else { |
1523 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
1523 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
1524 | 1524 | } |
1525 | - $map3dliveries = filter_input(INPUT_POST,'map3dliveries',FILTER_SANITIZE_STRING); |
|
1525 | + $map3dliveries = filter_input(INPUT_POST, 'map3dliveries', FILTER_SANITIZE_STRING); |
|
1526 | 1526 | if ($map3dliveries == 'map3dliveries') { |
1527 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'TRUE')); |
|
1527 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'TRUE')); |
|
1528 | 1528 | } else { |
1529 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'FALSE')); |
|
1529 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'FALSE')); |
|
1530 | 1530 | } |
1531 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
1531 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
1532 | 1532 | if ($translate == 'translate') { |
1533 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
1533 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
1534 | 1534 | } else { |
1535 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
1535 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
1536 | 1536 | } |
1537 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
1537 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
1538 | 1538 | if ($realairlines == 'realairlines') { |
1539 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
1539 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
1540 | 1540 | } else { |
1541 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
1541 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
1542 | 1542 | } |
1543 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
1543 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
1544 | 1544 | if ($estimation == 'estimation') { |
1545 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
1545 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
1546 | 1546 | } else { |
1547 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
1547 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
1548 | 1548 | } |
1549 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
1549 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
1550 | 1550 | if ($metar == 'metar') { |
1551 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
1551 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
1552 | 1552 | } else { |
1553 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
1553 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
1554 | 1554 | } |
1555 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
1555 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
1556 | 1556 | if ($metarcycle == 'metarcycle') { |
1557 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
1557 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
1558 | 1558 | } else { |
1559 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
1559 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
1560 | 1560 | } |
1561 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
1561 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
1562 | 1562 | if ($fork == 'fork') { |
1563 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
1563 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
1564 | 1564 | } else { |
1565 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
1565 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
1566 | 1566 | } |
1567 | 1567 | |
1568 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
1568 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
1569 | 1569 | if ($colormap == 'colormap') { |
1570 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
1570 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
1571 | 1571 | } else { |
1572 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
1572 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
1573 | 1573 | } |
1574 | 1574 | |
1575 | 1575 | if (isset($_POST['aircrafticoncolor'])) { |
1576 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
1577 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
1576 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
1577 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
1578 | 1578 | } |
1579 | 1579 | |
1580 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
1581 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
1580 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
1581 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
1582 | 1582 | |
1583 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
1584 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
1585 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
1586 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
1587 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
1588 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
1583 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
1584 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
1585 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
1586 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
1587 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
1588 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
1589 | 1589 | |
1590 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
1590 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
1591 | 1591 | if ($mappopup == 'mappopup') { |
1592 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
1592 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
1593 | 1593 | } else { |
1594 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
1594 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
1595 | 1595 | } |
1596 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
1596 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
1597 | 1597 | if ($airportpopup == 'airportpopup') { |
1598 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
1598 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
1599 | 1599 | } else { |
1600 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
1600 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
1601 | 1601 | } |
1602 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
1602 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
1603 | 1603 | if ($maphistory == 'maphistory') { |
1604 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
1604 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
1605 | 1605 | } else { |
1606 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
1606 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
1607 | 1607 | } |
1608 | - $maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING); |
|
1608 | + $maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING); |
|
1609 | 1609 | if ($maptooltip == 'maptooltip') { |
1610 | - $settings = array_merge($settings,array('globalMapTooltip' => 'TRUE')); |
|
1610 | + $settings = array_merge($settings, array('globalMapTooltip' => 'TRUE')); |
|
1611 | 1611 | } else { |
1612 | - $settings = array_merge($settings,array('globalMapTooltip' => 'FALSE')); |
|
1612 | + $settings = array_merge($settings, array('globalMapTooltip' => 'FALSE')); |
|
1613 | 1613 | } |
1614 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
1614 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
1615 | 1615 | if ($flightroute == 'flightroute') { |
1616 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
1616 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
1617 | 1617 | } else { |
1618 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
1618 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
1619 | 1619 | } |
1620 | - $flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING); |
|
1620 | + $flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING); |
|
1621 | 1621 | if ($flightremainingroute == 'flightremainingroute') { |
1622 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE')); |
|
1622 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE')); |
|
1623 | 1623 | } else { |
1624 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE')); |
|
1624 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE')); |
|
1625 | 1625 | } |
1626 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
1626 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
1627 | 1627 | if ($allflights == 'allflights') { |
1628 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
1628 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
1629 | 1629 | } else { |
1630 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
1630 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
1631 | 1631 | } |
1632 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
1632 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
1633 | 1633 | if ($bbox == 'bbox') { |
1634 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
1634 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
1635 | 1635 | } else { |
1636 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
1636 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
1637 | 1637 | } |
1638 | - $groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING); |
|
1638 | + $groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING); |
|
1639 | 1639 | if ($groundaltitude == 'groundaltitude') { |
1640 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE')); |
|
1640 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE')); |
|
1641 | 1641 | } else { |
1642 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE')); |
|
1642 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE')); |
|
1643 | 1643 | } |
1644 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
1644 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
1645 | 1645 | if ($waypoints == 'waypoints') { |
1646 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
1646 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
1647 | 1647 | } else { |
1648 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
1648 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
1649 | 1649 | } |
1650 | - $geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING); |
|
1650 | + $geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING); |
|
1651 | 1651 | if ($geoid == 'geoid') { |
1652 | - $settings = array_merge($settings,array('globalGeoid' => 'TRUE')); |
|
1652 | + $settings = array_merge($settings, array('globalGeoid' => 'TRUE')); |
|
1653 | 1653 | } else { |
1654 | - $settings = array_merge($settings,array('globalGeoid' => 'FALSE')); |
|
1654 | + $settings = array_merge($settings, array('globalGeoid' => 'FALSE')); |
|
1655 | 1655 | } |
1656 | - $geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING); |
|
1657 | - $settings = array_merge($settings,array('globalGeoidSource' => $geoid_source)); |
|
1656 | + $geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING); |
|
1657 | + $settings = array_merge($settings, array('globalGeoidSource' => $geoid_source)); |
|
1658 | 1658 | |
1659 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
1659 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
1660 | 1660 | if ($noairlines == 'noairlines') { |
1661 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
1661 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
1662 | 1662 | } else { |
1663 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
1663 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
1664 | 1664 | } |
1665 | 1665 | |
1666 | - $tsk = filter_input(INPUT_POST,'tsk',FILTER_SANITIZE_STRING); |
|
1666 | + $tsk = filter_input(INPUT_POST, 'tsk', FILTER_SANITIZE_STRING); |
|
1667 | 1667 | if ($tsk == 'tsk') { |
1668 | - $settings = array_merge($settings,array('globalTSK' => 'TRUE')); |
|
1668 | + $settings = array_merge($settings, array('globalTSK' => 'TRUE')); |
|
1669 | 1669 | } else { |
1670 | - $settings = array_merge($settings,array('globalTSK' => 'FALSE')); |
|
1670 | + $settings = array_merge($settings, array('globalTSK' => 'FALSE')); |
|
1671 | 1671 | } |
1672 | - $mapmatching = filter_input(INPUT_POST,'mapmatching',FILTER_SANITIZE_STRING); |
|
1672 | + $mapmatching = filter_input(INPUT_POST, 'mapmatching', FILTER_SANITIZE_STRING); |
|
1673 | 1673 | if ($mapmatching == 'mapmatching') { |
1674 | - $settings = array_merge($settings,array('globalMapMatching' => 'TRUE')); |
|
1674 | + $settings = array_merge($settings, array('globalMapMatching' => 'TRUE')); |
|
1675 | 1675 | } else { |
1676 | - $settings = array_merge($settings,array('globalMapMatching' => 'FALSE')); |
|
1676 | + $settings = array_merge($settings, array('globalMapMatching' => 'FALSE')); |
|
1677 | 1677 | } |
1678 | - $mapmatchingsource = filter_input(INPUT_POST,'mapmatchingsource',FILTER_SANITIZE_STRING); |
|
1679 | - $settings = array_merge($settings,array('globalMapMatchingSource' => $mapmatchingsource)); |
|
1680 | - $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
|
1681 | - $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
|
1678 | + $mapmatchingsource = filter_input(INPUT_POST, 'mapmatchingsource', FILTER_SANITIZE_STRING); |
|
1679 | + $settings = array_merge($settings, array('globalMapMatchingSource' => $mapmatchingsource)); |
|
1680 | + $graphhopper = filter_input(INPUT_POST, 'graphhopper', FILTER_SANITIZE_STRING); |
|
1681 | + $settings = array_merge($settings, array('globalGraphHopperKey' => $graphhopper)); |
|
1682 | 1682 | |
1683 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1683 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
1684 | 1684 | |
1685 | 1685 | // Set some defaults values... |
1686 | 1686 | if (!isset($globalAircraftImageSources)) { |
1687 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1688 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1687 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
1688 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1689 | 1689 | } |
1690 | 1690 | |
1691 | 1691 | if (!isset($globalSchedulesSources)) { |
1692 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1693 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1692 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
1693 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1694 | 1694 | } |
1695 | 1695 | |
1696 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
1696 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
1697 | 1697 | |
1698 | 1698 | if ($error == '') settings::modify_settings($settings); |
1699 | 1699 | if ($error == '') settings::comment_settings($settings_comment); |