@@ -1,23 +1,23 @@ |
||
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 | - exit; |
|
7 | - } |
|
8 | - require('class.update_db.php'); |
|
9 | - if (isset($globalVATSIM) && $globalVATSIM) { |
|
3 | + require_once('../require/settings.php'); |
|
4 | + if ($globalInstalled) { |
|
5 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | + exit; |
|
7 | + } |
|
8 | + require('class.update_db.php'); |
|
9 | + if (isset($globalVATSIM) && $globalVATSIM) { |
|
10 | 10 | echo "Install VATSIM airlines..."; |
11 | 11 | update_db::update_vatsim(); |
12 | 12 | echo "Done !\n"; |
13 | - } |
|
14 | - if (isset($globalIVAO) && $globalIVAO) { |
|
13 | + } |
|
14 | + if (isset($globalIVAO) && $globalIVAO) { |
|
15 | 15 | if (!file_exists('tmp/ivae_feb2013.zip')) { |
16 | 16 | echo "You have to download the file ivae_feb2013.zip from https://www.ivao.aero/softdev/mirrors.asp?software=IvAeDataUp and put it in install/tmp directory"; |
17 | 17 | } else { |
18 | - echo "Install IVAO airlines and logos..."; |
|
19 | - update_db::update_IVAO(); |
|
18 | + echo "Install IVAO airlines and logos..."; |
|
19 | + update_db::update_IVAO(); |
|
20 | 20 | echo "Done !\n"; |
21 | 21 | } |
22 | - } |
|
22 | + } |
|
23 | 23 | ?> |
24 | 24 | \ No newline at end of file |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <meta property="og:site_name" content="<?php print $globalName; ?>"/> |
40 | 40 | |
41 | 41 | <?php |
42 | - if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
42 | + if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
43 | 43 | ?> |
44 | 44 | <script language="JavaScript" type="text/javascript"> |
45 | 45 | function datasource_js() { |
@@ -120,22 +120,22 @@ discard block |
||
120 | 120 | } |
121 | 121 | </script> |
122 | 122 | <?php |
123 | - } |
|
123 | + } |
|
124 | 124 | ?> |
125 | 125 | |
126 | 126 | </head> |
127 | 127 | |
128 | 128 | <?php |
129 | - if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
129 | + if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
130 | 130 | ?> |
131 | 131 | |
132 | 132 | <body class="page-<?php print strtolower($current_page); ?>" onload="datasource_js(); metarcycle_js(); create_database_js(); daemon_js(); schedule_js()"> |
133 | 133 | <?php |
134 | - } else { |
|
134 | + } else { |
|
135 | 135 | ?> |
136 | 136 | <body class="page-<?php print strtolower($current_page); ?>"> |
137 | 137 | <?php |
138 | - } |
|
138 | + } |
|
139 | 139 | ?> |
140 | 140 | <div class="navbar navbar-fixed-top" role="navigation"> |
141 | 141 | <div class="container"> |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | |
155 | 155 | <?php |
156 | 156 | if (isset($top_header)) { |
157 | - if ($top_header != "") |
|
158 | - { |
|
157 | + if ($top_header != "") |
|
158 | + { |
|
159 | 159 | print '<div class="top-header container clear" role="main">'; |
160 | 160 | print '<img src="../images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />'; |
161 | 161 | print '</div>'; |
162 | - } |
|
162 | + } |
|
163 | 163 | } |
164 | 164 | ?> |
165 | 165 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | print '</ul>You <strong>must</strong> add these modules.</div>'; |
87 | 87 | require('../footer.php'); |
88 | - exit; |
|
88 | + exit; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | if (!isset($_SESSION['install']) && !isset($_POST['dbtype']) && (count($error) == 0)) { |
@@ -287,14 +287,14 @@ discard block |
||
287 | 287 | <th>Source name</th> |
288 | 288 | </tr> |
289 | 289 | <?php |
290 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
291 | - $Connection = new Connection(); |
|
292 | - if ($Connection->db != NULL) { |
|
290 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
291 | + $Connection = new Connection(); |
|
292 | + if ($Connection->db != NULL) { |
|
293 | 293 | if ($Connection->tableExists('source_location')) { |
294 | - require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
295 | - $Source = new Source(); |
|
296 | - $alllocations = $Source->getAllLocationInfo(); |
|
297 | - foreach ($alllocations as $location) { |
|
294 | + require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
295 | + $Source = new Source(); |
|
296 | + $alllocations = $Source->getAllLocationInfo(); |
|
297 | + foreach ($alllocations as $location) { |
|
298 | 298 | ?> |
299 | 299 | <tr> |
300 | 300 | <input type="hidden" name="source_id[]" value="<?php print $location['id']; ?>" /> |
@@ -308,9 +308,9 @@ discard block |
||
308 | 308 | </tr> |
309 | 309 | |
310 | 310 | <?php |
311 | - } |
|
311 | + } |
|
312 | + } |
|
312 | 313 | } |
313 | - } |
|
314 | 314 | ?> |
315 | 315 | |
316 | 316 | <tr> |
@@ -495,12 +495,12 @@ discard block |
||
495 | 495 | ?> |
496 | 496 | <tr> |
497 | 497 | <?php |
498 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
498 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
499 | 499 | ?> |
500 | 500 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
501 | 501 | <td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td> |
502 | 502 | <?php |
503 | - } else { |
|
503 | + } else { |
|
504 | 504 | $hostport = explode(':',$source['host']); |
505 | 505 | if (isset($hostport[1])) { |
506 | 506 | $host = $hostport[0]; |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
514 | 514 | <td><input type="number" name="port[]" id="port" value="<?php print $port; ?>" /></td> |
515 | 515 | <?php |
516 | - } |
|
516 | + } |
|
517 | 517 | ?> |
518 | 518 | <td> |
519 | 519 | <select name="format[]" id="format"> |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | <br /> |
789 | 789 | <p> |
790 | 790 | <?php |
791 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
791 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
792 | 792 | ?> |
793 | 793 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
794 | 794 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -798,11 +798,11 @@ discard block |
||
798 | 798 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
799 | 799 | <?php |
800 | 800 | } |
801 | - } else { |
|
801 | + } else { |
|
802 | 802 | ?> |
803 | 803 | <b>PHP GD is not installed, you can t change color of aircraft icon on map</b> |
804 | 804 | <?php |
805 | - } |
|
805 | + } |
|
806 | 806 | ?> |
807 | 807 | </p> |
808 | 808 | <br /> |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | </p> |
822 | 822 | <?php |
823 | 823 | require('../footer.php'); |
824 | - exit; |
|
824 | + exit; |
|
825 | 825 | } |
826 | 826 | |
827 | 827 | $settings = array(); |
@@ -904,8 +904,8 @@ discard block |
||
904 | 904 | |
905 | 905 | $sources = array(); |
906 | 906 | foreach ($source_name as $keys => $name) { |
907 | - 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]); |
|
908 | - 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]); |
|
907 | + 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]); |
|
908 | + 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]); |
|
909 | 909 | } |
910 | 910 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
911 | 911 | |
@@ -1157,14 +1157,14 @@ discard block |
||
1157 | 1157 | |
1158 | 1158 | // Set some defaults values... |
1159 | 1159 | if (!isset($globalAircraftImageSources)) { |
1160 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1161 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1160 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1161 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1162 | 1162 | } |
1163 | 1163 | |
1164 | 1164 | if (!isset($globalSchedulesSources)) { |
1165 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1166 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1167 | - } |
|
1165 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1166 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1167 | + } |
|
1168 | 1168 | |
1169 | 1169 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
1170 | 1170 | |
@@ -1198,12 +1198,12 @@ discard block |
||
1198 | 1198 | print '<ul><div id="step">'; |
1199 | 1199 | $pop = false; |
1200 | 1200 | foreach ($_SESSION['done'] as $done) { |
1201 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1202 | - if ($done == 'Create database') $pop = true; |
|
1201 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1202 | + if ($done == 'Create database') $pop = true; |
|
1203 | 1203 | } |
1204 | 1204 | if ($pop) { |
1205 | - sleep(5); |
|
1206 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
1205 | + sleep(5); |
|
1206 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
1207 | 1207 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
1208 | 1208 | print '</div></ul>'; |
1209 | 1209 | print '<div id="error"></div>'; |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | unset($_COOKIE['install']); |
1266 | 1266 | print '<div class="info column"><ul>'; |
1267 | 1267 | foreach ($_SESSION['done'] as $done) { |
1268 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1268 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1269 | 1269 | } |
1270 | 1270 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
1271 | 1271 | print '</ul></div>'; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | require_once(dirname(__FILE__).'/class.create_db.php'); |
13 | 13 | require_once(dirname(__FILE__).'/class.update_schema.php'); |
14 | 14 | require_once(dirname(__FILE__).'/class.settings.php'); |
15 | -$title="Install"; |
|
15 | +$title = "Install"; |
|
16 | 16 | require(dirname(__FILE__).'/header.php'); |
17 | 17 | require(dirname(__FILE__).'/../require/settings.php'); |
18 | 18 | |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | if (!extension_loaded('curl')) { |
67 | 67 | $error[] = "Curl is not loaded."; |
68 | 68 | } |
69 | -if(function_exists('apache_get_modules') ){ |
|
70 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
69 | +if (function_exists('apache_get_modules')) { |
|
70 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
71 | 71 | $error[] = "mod_rewrite is not available."; |
72 | 72 | } |
73 | 73 | if (!isset($_SERVER['HTACCESS'])) { |
@@ -495,13 +495,13 @@ discard block |
||
495 | 495 | ?> |
496 | 496 | <tr> |
497 | 497 | <?php |
498 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
498 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
499 | 499 | ?> |
500 | 500 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
501 | 501 | <td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td> |
502 | 502 | <?php |
503 | 503 | } else { |
504 | - $hostport = explode(':',$source['host']); |
|
504 | + $hostport = explode(':', $source['host']); |
|
505 | 505 | if (isset($hostport[1])) { |
506 | 506 | $host = $hostport[0]; |
507 | 507 | $port = $hostport[1]; |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | <br /> |
784 | 784 | <p> |
785 | 785 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
786 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
786 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
787 | 787 | </p> |
788 | 788 | <br /> |
789 | 789 | <p> |
@@ -829,68 +829,68 @@ discard block |
||
829 | 829 | $error = ''; |
830 | 830 | |
831 | 831 | if (isset($_POST['dbtype'])) { |
832 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
833 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
834 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
835 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
836 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
837 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
838 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
832 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
833 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
834 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
835 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
836 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
837 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
838 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
839 | 839 | |
840 | 840 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
841 | 841 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
842 | 842 | |
843 | 843 | if ($error == '' && isset($_POST['createdb']) && $dbname != '' && $dbuser != '' && $dbuserpass != '') { |
844 | 844 | if ($dbroot != '' && $dbrootpass != '') { |
845 | - $result = create_db::create_database($dbroot,$dbrootpass,$dbuser,$dbuserpass,$dbname,$dbtype,$dbhost); |
|
845 | + $result = create_db::create_database($dbroot, $dbrootpass, $dbuser, $dbuserpass, $dbname, $dbtype, $dbhost); |
|
846 | 846 | if ($result != '') $error .= $result; |
847 | 847 | } |
848 | 848 | if ($error == '') { |
849 | 849 | //$error .= create_db::import_all_db('../db/'); |
850 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
850 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
851 | 851 | } |
852 | - } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
852 | + } else $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
853 | 853 | |
854 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
855 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
856 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
857 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
858 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
854 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
855 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
856 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
857 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
858 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
859 | 859 | |
860 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
861 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
862 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
863 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
864 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
865 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
866 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
867 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
868 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey)); |
|
860 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
861 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
862 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
863 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
864 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
865 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
866 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
867 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
868 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey)); |
|
869 | 869 | |
870 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
871 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
872 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
873 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
874 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
875 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
870 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
871 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
872 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
873 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
874 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
875 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
876 | 876 | |
877 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
878 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
877 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
878 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
879 | 879 | |
880 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
881 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
882 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
880 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
881 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
882 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
883 | 883 | |
884 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
884 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
885 | 885 | if ($acars == 'acars') { |
886 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
886 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
887 | 887 | } else { |
888 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
888 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
889 | 889 | } |
890 | 890 | |
891 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
892 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
893 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
891 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
892 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
893 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
894 | 894 | |
895 | 895 | $source_name = $_POST['source_name']; |
896 | 896 | $source_latitude = $_POST['source_latitude']; |
@@ -904,8 +904,8 @@ discard block |
||
904 | 904 | |
905 | 905 | $sources = array(); |
906 | 906 | foreach ($source_name as $keys => $name) { |
907 | - 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]); |
|
908 | - 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]); |
|
907 | + 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]); |
|
908 | + 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]); |
|
909 | 909 | } |
910 | 910 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
911 | 911 | |
@@ -918,12 +918,12 @@ discard block |
||
918 | 918 | $sbsurl = $_POST['sbsurl']; |
919 | 919 | */ |
920 | 920 | |
921 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
922 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
923 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
924 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
925 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
926 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
921 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
922 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
923 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
924 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
925 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
926 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
927 | 927 | |
928 | 928 | /* |
929 | 929 | $globalSBS1Hosts = array(); |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | } |
940 | 940 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
941 | 941 | */ |
942 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
942 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
943 | 943 | $host = $_POST['host']; |
944 | 944 | $port = $_POST['port']; |
945 | 945 | $name = $_POST['name']; |
@@ -949,88 +949,88 @@ discard block |
||
949 | 949 | foreach ($host as $key => $h) { |
950 | 950 | if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
951 | 951 | else $cov = 'FALSE'; |
952 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
952 | + if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov); |
|
953 | 953 | } |
954 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
954 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
955 | 955 | |
956 | - $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
|
957 | - $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
|
956 | + $sbstimeout = filter_input(INPUT_POST, 'sbstimeout', FILTER_SANITIZE_NUMBER_INT); |
|
957 | + $settings = array_merge($settings, array('globalSourcesTimeOut' => $sbstimeout)); |
|
958 | 958 | |
959 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
960 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
961 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
959 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
960 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
961 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
962 | 962 | |
963 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
964 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
963 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
964 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
965 | 965 | |
966 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
967 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
968 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
969 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
966 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
967 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
968 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
969 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
970 | 970 | |
971 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
972 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
973 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
971 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
972 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
973 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
974 | 974 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
975 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
976 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
975 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
976 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
977 | 977 | |
978 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
979 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
980 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
981 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
982 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
983 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
984 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
985 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
978 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
979 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
980 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
981 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
982 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
983 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
984 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
985 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
986 | 986 | |
987 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
988 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
987 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
988 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
989 | 989 | |
990 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
991 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
990 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
991 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
992 | 992 | |
993 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
993 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
994 | 994 | if ($archiveyear == "archiveyear") { |
995 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
995 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
996 | 996 | } else { |
997 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
997 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
998 | 998 | } |
999 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1000 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1001 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1002 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
999 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1000 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1001 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1002 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1003 | 1003 | |
1004 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
1005 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
1006 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
1007 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
1004 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
1005 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
1006 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
1007 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
1008 | 1008 | |
1009 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
1010 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
1011 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
1009 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
1010 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
1011 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
1012 | 1012 | |
1013 | 1013 | // Create in settings.php keys not yet configurable if not already here |
1014 | 1014 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1015 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1015 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
1016 | 1016 | |
1017 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
1017 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
1018 | 1018 | if ($archive == 'archive') { |
1019 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
1019 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
1020 | 1020 | } else { |
1021 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
1021 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
1022 | 1022 | } |
1023 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
1023 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
1024 | 1024 | if ($daemon == 'daemon') { |
1025 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
1025 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
1026 | 1026 | } else { |
1027 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
1027 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
1028 | 1028 | } |
1029 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
1029 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
1030 | 1030 | if ($schedules == 'schedules') { |
1031 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
1031 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
1032 | 1032 | } else { |
1033 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
1033 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
1034 | 1034 | } |
1035 | 1035 | |
1036 | 1036 | /* |
@@ -1041,132 +1041,132 @@ discard block |
||
1041 | 1041 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
1042 | 1042 | } |
1043 | 1043 | */ |
1044 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
1045 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1046 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1047 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1048 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1044 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
1045 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
1046 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
1047 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
1048 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
1049 | 1049 | if ($globalivao == 'ivao') { |
1050 | 1050 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
1051 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
1052 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1051 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
1052 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
1053 | 1053 | if ($globalvatsim == 'vatsim') { |
1054 | 1054 | //$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE')); |
1055 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
1056 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1055 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
1056 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
1057 | 1057 | if ($globalphpvms == 'phpvms') { |
1058 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
1059 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1058 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
1059 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
1060 | 1060 | if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') { |
1061 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
1062 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1061 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
1062 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
1063 | 1063 | |
1064 | 1064 | |
1065 | 1065 | |
1066 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
1066 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
1067 | 1067 | if ($notam == 'notam') { |
1068 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
1068 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
1069 | 1069 | } else { |
1070 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
1070 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
1071 | 1071 | } |
1072 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
1072 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
1073 | 1073 | if ($owner == 'owner') { |
1074 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
1074 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
1075 | 1075 | } else { |
1076 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
1076 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
1077 | 1077 | } |
1078 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
1078 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
1079 | 1079 | if ($translate == 'translate') { |
1080 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
1080 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
1081 | 1081 | } else { |
1082 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
1082 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
1083 | 1083 | } |
1084 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
1084 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
1085 | 1085 | if ($estimation == 'estimation') { |
1086 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
1086 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
1087 | 1087 | } else { |
1088 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
1088 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
1089 | 1089 | } |
1090 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
1090 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
1091 | 1091 | if ($metar == 'metar') { |
1092 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
1092 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
1093 | 1093 | } else { |
1094 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
1094 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
1095 | 1095 | } |
1096 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
1096 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
1097 | 1097 | if ($metarcycle == 'metarcycle') { |
1098 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
1098 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
1099 | 1099 | } else { |
1100 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
1100 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
1101 | 1101 | } |
1102 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
1102 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
1103 | 1103 | if ($fork == 'fork') { |
1104 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
1104 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
1105 | 1105 | } else { |
1106 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
1106 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
1107 | 1107 | } |
1108 | 1108 | |
1109 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
1109 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
1110 | 1110 | if ($colormap == 'colormap') { |
1111 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
1111 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
1112 | 1112 | } else { |
1113 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
1113 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
1114 | 1114 | } |
1115 | 1115 | |
1116 | 1116 | if (isset($_POST['aircrafticoncolor'])) { |
1117 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
1118 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
1117 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
1118 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
1119 | 1119 | } |
1120 | 1120 | |
1121 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
1122 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
1121 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
1122 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
1123 | 1123 | |
1124 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
1125 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
1126 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
1127 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
1128 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
1129 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
1124 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
1125 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
1126 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
1127 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
1128 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
1129 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
1130 | 1130 | |
1131 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
1131 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
1132 | 1132 | if ($mappopup == 'mappopup') { |
1133 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
1133 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
1134 | 1134 | } else { |
1135 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
1135 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
1136 | 1136 | } |
1137 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
1137 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
1138 | 1138 | if ($airportpopup == 'airportpopup') { |
1139 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
1139 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
1140 | 1140 | } else { |
1141 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
1141 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
1142 | 1142 | } |
1143 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
1143 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
1144 | 1144 | if ($maphistory == 'maphistory') { |
1145 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
1145 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
1146 | 1146 | } else { |
1147 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
1147 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
1148 | 1148 | } |
1149 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
1149 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
1150 | 1150 | if ($flightroute == 'flightroute') { |
1151 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
1151 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
1152 | 1152 | } else { |
1153 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
1153 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
1154 | 1154 | } |
1155 | 1155 | |
1156 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1156 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
1157 | 1157 | |
1158 | 1158 | // Set some defaults values... |
1159 | 1159 | if (!isset($globalAircraftImageSources)) { |
1160 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1161 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1160 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
1161 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1162 | 1162 | } |
1163 | 1163 | |
1164 | 1164 | if (!isset($globalSchedulesSources)) { |
1165 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1166 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1165 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
1166 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1167 | 1167 | } |
1168 | 1168 | |
1169 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
1169 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
1170 | 1170 | |
1171 | 1171 | if ($error == '') settings::modify_settings($settings); |
1172 | 1172 | if ($error == '') settings::comment_settings($settings_comment); |
@@ -1182,7 +1182,7 @@ discard block |
||
1182 | 1182 | print '<div class="info column"><ul>'; |
1183 | 1183 | |
1184 | 1184 | if (isset($_POST['createdb'])) { |
1185 | - $_SESSION['done'] = array('Create database','Write configuration'); |
|
1185 | + $_SESSION['done'] = array('Create database', 'Write configuration'); |
|
1186 | 1186 | print '<li>Create database....<strong>SUCCESS</strong></li>'; |
1187 | 1187 | } else $_SESSION['done'] = array('Write configuration'); |
1188 | 1188 | print '<li>Write configuration....<img src="../images/loading.gif" /></li></ul></div>'; |
@@ -117,40 +117,64 @@ discard block |
||
117 | 117 | </div> |
118 | 118 | <p> |
119 | 119 | <label for="dbhost">Database hostname</label> |
120 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
120 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
121 | + print $globalDBhost; |
|
122 | +} |
|
123 | +?>" /> |
|
121 | 124 | </p> |
122 | 125 | <p> |
123 | 126 | <label for="dbname">Database name</label> |
124 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
127 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
128 | + print $globalDBname; |
|
129 | +} |
|
130 | +?>" /> |
|
125 | 131 | </p> |
126 | 132 | <p> |
127 | 133 | <label for="dbuser">Database user</label> |
128 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
134 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
135 | + print $globalDBuser; |
|
136 | +} |
|
137 | +?>" /> |
|
129 | 138 | </p> |
130 | 139 | <p> |
131 | 140 | <label for="dbuserpass">Database user password</label> |
132 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
141 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
142 | + print $globalDBpass; |
|
143 | +} |
|
144 | +?>" /> |
|
133 | 145 | </p> |
134 | 146 | </fieldset> |
135 | 147 | <fieldset> |
136 | 148 | <legend>Site configuration</legend> |
137 | 149 | <p> |
138 | 150 | <label for="sitename">Site name</label> |
139 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
151 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
152 | + print $globalName; |
|
153 | +} |
|
154 | +?>" /> |
|
140 | 155 | </p> |
141 | 156 | <p> |
142 | 157 | <label for="siteurl">Site directory</label> |
143 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
158 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
159 | + print $globalURL; |
|
160 | +} |
|
161 | +?>" /> |
|
144 | 162 | <p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
145 | 163 | </p> |
146 | 164 | <p> |
147 | 165 | <label for="timezone">Timezone</label> |
148 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
166 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
167 | + print $globalTimezone; |
|
168 | +} |
|
169 | +?>" /> |
|
149 | 170 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
150 | 171 | </p> |
151 | 172 | <p> |
152 | 173 | <label for="language">Language</label> |
153 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
174 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
175 | + print $globalLanguage; |
|
176 | +} |
|
177 | +?>" /> |
|
154 | 178 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
155 | 179 | </p> |
156 | 180 | </fieldset> |
@@ -171,18 +195,27 @@ discard block |
||
171 | 195 | <div id="mapbox_data"> |
172 | 196 | <p> |
173 | 197 | <label for="mapboxid">Mapbox id</label> |
174 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
198 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
199 | + print $globalMapboxId; |
|
200 | +} |
|
201 | +?>" /> |
|
175 | 202 | </p> |
176 | 203 | <p> |
177 | 204 | <label for="mapboxtoken">Mapbox token</label> |
178 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
205 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
206 | + print $globalMapboxToken; |
|
207 | +} |
|
208 | +?>" /> |
|
179 | 209 | </p> |
180 | 210 | </div> |
181 | 211 | <br /> |
182 | 212 | <div id="google_data"> |
183 | 213 | <p> |
184 | 214 | <label for="googlekey">Google API key</label> |
185 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
215 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
216 | + print $globalGoogleAPIKey; |
|
217 | +} |
|
218 | +?>" /> |
|
186 | 219 | <p class="help-block">Get a key <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">here</a></p> |
187 | 220 | </p> |
188 | 221 | </div> |
@@ -190,7 +223,10 @@ discard block |
||
190 | 223 | <div id="bing_data"> |
191 | 224 | <p> |
192 | 225 | <label for="bingkey">Bing Map key</label> |
193 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
226 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
227 | + print $globalBingMapKey; |
|
228 | +} |
|
229 | +?>" /> |
|
194 | 230 | <p class="help-block">Get a key <a href="https://msdn.microsoft.com/en-us/library/ff428642.aspx">here</a></p> |
195 | 231 | </p> |
196 | 232 | </div> |
@@ -198,7 +234,10 @@ discard block |
||
198 | 234 | <div id="mapquest_data"> |
199 | 235 | <p> |
200 | 236 | <label for="mapquestkey">MapQuest key</label> |
201 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
237 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
238 | + print $globalMapQuestKey; |
|
239 | +} |
|
240 | +?>" /> |
|
202 | 241 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
203 | 242 | </p> |
204 | 243 | </div> |
@@ -206,11 +245,17 @@ discard block |
||
206 | 245 | <div id="here_data"> |
207 | 246 | <p> |
208 | 247 | <label for="hereappid">Here App_Id</label> |
209 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
248 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
249 | + print $globalHereappId; |
|
250 | +} |
|
251 | +?>" /> |
|
210 | 252 | </p> |
211 | 253 | <p> |
212 | 254 | <label for="hereappcode">Here App_Code</label> |
213 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
255 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
256 | + print $globalHereappCode; |
|
257 | +} |
|
258 | +?>" /> |
|
214 | 259 | </p> |
215 | 260 | <p class="help-block">Get a key <a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html">here</a></p> |
216 | 261 | </div> |
@@ -219,42 +264,86 @@ discard block |
||
219 | 264 | <legend>Coverage area</legend> |
220 | 265 | <p> |
221 | 266 | <label for="latitudemax">The maximum latitude (north)</label> |
222 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
267 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
268 | + print $globalLatitudeMax; |
|
269 | +} |
|
270 | +?>" /> |
|
223 | 271 | </p> |
224 | 272 | <p> |
225 | 273 | <label for="latitudemin">The minimum latitude (south)</label> |
226 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
274 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
275 | + print $globalLatitudeMin; |
|
276 | +} |
|
277 | +?>" /> |
|
227 | 278 | </p> |
228 | 279 | <p> |
229 | 280 | <label for="longitudemax">The maximum longitude (west)</label> |
230 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
281 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
282 | + print $globalLongitudeMax; |
|
283 | +} |
|
284 | +?>" /> |
|
231 | 285 | </p> |
232 | 286 | <p> |
233 | 287 | <label for="longitudemin">The minimum longitude (east)</label> |
234 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
288 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
289 | + print $globalLongitudeMin; |
|
290 | +} |
|
291 | +?>" /> |
|
235 | 292 | </p> |
236 | 293 | <p> |
237 | 294 | <label for="latitudecenter">The latitude center</label> |
238 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
295 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
296 | + print $globalCenterLatitude; |
|
297 | +} |
|
298 | +?>" /> |
|
239 | 299 | </p> |
240 | 300 | <p> |
241 | 301 | <label for="longitudecenter">The longitude center</label> |
242 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
302 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
303 | + print $globalCenterLongitude; |
|
304 | +} |
|
305 | +?>" /> |
|
243 | 306 | </p> |
244 | 307 | <p> |
245 | 308 | <label for="livezoom">Default Zoom on live map</label> |
246 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
309 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
310 | + print $globalLiveZoom; |
|
311 | +} else { |
|
312 | + print '9'; |
|
313 | +} |
|
314 | +?>" /> |
|
247 | 315 | </p> |
248 | 316 | <p> |
249 | 317 | <label for="squawk_country">Country for squawk usage</label> |
250 | 318 | <select name="squawk_country" id="squawk_country"> |
251 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
252 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
253 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
254 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
255 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
256 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
257 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
319 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
320 | + print ' selected '; |
|
321 | +} |
|
322 | +?>>UK</option> |
|
323 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
324 | + print ' selected '; |
|
325 | +} |
|
326 | +?>>NZ</option> |
|
327 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
328 | + print ' selected '; |
|
329 | +} |
|
330 | +?>>US</option> |
|
331 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
332 | + print ' selected '; |
|
333 | +} |
|
334 | +?>>AU</option> |
|
335 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
336 | + print ' selected '; |
|
337 | +} |
|
338 | +?>>NL</option> |
|
339 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
340 | + print ' selected '; |
|
341 | +} |
|
342 | +?>>FR</option> |
|
343 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
344 | + print ' selected '; |
|
345 | +} |
|
346 | +?>>TR</option> |
|
258 | 347 | </select> |
259 | 348 | </p> |
260 | 349 | </fieldset> |
@@ -263,15 +352,24 @@ discard block |
||
263 | 352 | <p><i>Only put in DB flights that are inside a circle</i></p> |
264 | 353 | <p> |
265 | 354 | <label for="latitude">Center latitude</label> |
266 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
355 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
356 | + echo $globalDistanceIgnore['latitude']; |
|
357 | +} |
|
358 | +?>" /> |
|
267 | 359 | </p> |
268 | 360 | <p> |
269 | 361 | <label for="longitude">Center longitude</label> |
270 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
362 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
363 | + echo $globalDistanceIgnore['longitude']; |
|
364 | +} |
|
365 | +?>" /> |
|
271 | 366 | </p> |
272 | 367 | <p> |
273 | 368 | <label for="Distance">Distance (in km)</label> |
274 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
369 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
370 | + echo $globalDistanceIgnore['distance']; |
|
371 | +} |
|
372 | +?>" /> |
|
275 | 373 | </p> |
276 | 374 | </fieldset> |
277 | 375 | <fieldset> |
@@ -360,11 +458,17 @@ discard block |
||
360 | 458 | <div id="flightaware_data"> |
361 | 459 | <p> |
362 | 460 | <label for="flightawareusername">FlightAware username</label> |
363 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
461 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
462 | + print $globalFlightAwareUsername; |
|
463 | +} |
|
464 | +?>" /> |
|
364 | 465 | </p> |
365 | 466 | <p> |
366 | 467 | <label for="flightawarepassword">FlightAware password/API key</label> |
367 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
468 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
469 | + print $globalFlightAwarePassword; |
|
470 | +} |
|
471 | +?>" /> |
|
368 | 472 | </p> |
369 | 473 | </div> |
370 | 474 | --> |
@@ -517,20 +621,56 @@ discard block |
||
517 | 621 | ?> |
518 | 622 | <td> |
519 | 623 | <select name="format[]" id="format"> |
520 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
521 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
522 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
523 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
524 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
525 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
526 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
527 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server</option> |
|
528 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
529 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
624 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
625 | + print 'selected'; |
|
626 | +} |
|
627 | +?>>Auto</option> |
|
628 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
629 | + print 'selected'; |
|
630 | +} |
|
631 | +?>>SBS</option> |
|
632 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
633 | + print 'selected'; |
|
634 | +} |
|
635 | +?>>TSV</option> |
|
636 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
637 | + print 'selected'; |
|
638 | +} |
|
639 | +?>>Raw</option> |
|
640 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
641 | + print 'selected'; |
|
642 | +} |
|
643 | +?>>APRS</option> |
|
644 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
645 | + print 'selected'; |
|
646 | +} |
|
647 | +?>>Radarcape deltadb.txt</option> |
|
648 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
649 | + print 'selected'; |
|
650 | +} |
|
651 | +?>>Vatsim</option> |
|
652 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
653 | + print 'selected'; |
|
654 | +} |
|
655 | +?>>Virtual Radar Server</option> |
|
656 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
657 | + print 'selected'; |
|
658 | +} |
|
659 | +?>>phpVMS</option> |
|
660 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
661 | + print 'selected'; |
|
662 | +} |
|
663 | +?>>IVAO</option> |
|
530 | 664 | </select> |
531 | 665 | </td> |
532 | - <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /></td> |
|
533 | - <td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) print 'checked'; ?> /></td> |
|
666 | + <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
667 | + print $source['name']; |
|
668 | +} |
|
669 | +?>" /></td> |
|
670 | + <td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) { |
|
671 | + print 'checked'; |
|
672 | +} |
|
673 | +?> /></td> |
|
534 | 674 | <td><input type="button" id="delhost" value="Delete" onclick="deleteRow(this)" /> <input type="button" id="addhost" value="Add" onclick="insRow()" /></td> |
535 | 675 | </tr> |
536 | 676 | <?php |
@@ -569,11 +709,17 @@ discard block |
||
569 | 709 | <p>Listen UDP server for acarsdec/acarsdeco2/...</p> |
570 | 710 | <p> |
571 | 711 | <label for="acarshost">ACARS UDP host</label> |
572 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
712 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
713 | + print $globalACARSHost; |
|
714 | +} |
|
715 | +?>" /> |
|
573 | 716 | </p> |
574 | 717 | <p> |
575 | 718 | <label for="acarsport">ACARS UDP port</label> |
576 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
719 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
720 | + print $globalACARSPort; |
|
721 | +} |
|
722 | +?>" /> |
|
577 | 723 | </p> |
578 | 724 | </fieldset> |
579 | 725 | </div> |
@@ -627,12 +773,18 @@ discard block |
||
627 | 773 | <div id="schedules_options"> |
628 | 774 | <p> |
629 | 775 | <label for="britishairways">British Airways API Key</label> |
630 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
776 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
777 | + print $globalBritishAirwaysKey; |
|
778 | +} |
|
779 | +?>" /> |
|
631 | 780 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
632 | 781 | </p> |
633 | 782 | <p> |
634 | 783 | <label for="transavia">Transavia Test API Consumer Key</label> |
635 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
784 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
785 | + print $globalTransaviaKey; |
|
786 | +} |
|
787 | +?>" /> |
|
636 | 788 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
637 | 789 | </p> |
638 | 790 | <p> |
@@ -640,10 +792,16 @@ discard block |
||
640 | 792 | <b>Lufthansa API Key</b> |
641 | 793 | <p> |
642 | 794 | <label for="lufthansakey">Key</label> |
643 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
795 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
796 | + print $globalLufthansaKey['key']; |
|
797 | +} |
|
798 | +?>" /> |
|
644 | 799 | </p><p> |
645 | 800 | <label for="lufthansasecret">Secret</label> |
646 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
801 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
802 | + print $globalLufthansaKey['secret']; |
|
803 | +} |
|
804 | +?>" /> |
|
647 | 805 | </p> |
648 | 806 | </div> |
649 | 807 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -663,7 +821,10 @@ discard block |
||
663 | 821 | </p> |
664 | 822 | <p> |
665 | 823 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
666 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
824 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
825 | + print $globalNOTAMSource; |
|
826 | +} |
|
827 | +?>" /> |
|
667 | 828 | </p> |
668 | 829 | <br /> |
669 | 830 | <p> |
@@ -678,14 +839,20 @@ discard block |
||
678 | 839 | <div id="metarsrc"> |
679 | 840 | <p> |
680 | 841 | <label for="metarsource">URL of your METAR source</label> |
681 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
842 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
843 | + print $globalMETARurl; |
|
844 | +} |
|
845 | +?>" /> |
|
682 | 846 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
683 | 847 | </p> |
684 | 848 | </div> |
685 | 849 | <br /> |
686 | 850 | <p> |
687 | 851 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
688 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
852 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
853 | + print $globalBitlyAccessToken; |
|
854 | +} |
|
855 | +?>" /> |
|
689 | 856 | </p> |
690 | 857 | <br /> |
691 | 858 | <p> |
@@ -699,7 +866,12 @@ discard block |
||
699 | 866 | </p> |
700 | 867 | <p> |
701 | 868 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
702 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
869 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
870 | + print $globalArchiveMonths; |
|
871 | +} else { |
|
872 | + echo '0'; |
|
873 | +} |
|
874 | +?>" /> |
|
703 | 875 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
704 | 876 | </p> |
705 | 877 | <p> |
@@ -709,12 +881,22 @@ discard block |
||
709 | 881 | </p> |
710 | 882 | <p> |
711 | 883 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
712 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
884 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
885 | + print $globalArchiveKeepMonths; |
|
886 | +} else { |
|
887 | + echo '0'; |
|
888 | +} |
|
889 | +?>" /> |
|
713 | 890 | <p class="help-block">0 to disable</p> |
714 | 891 | </p> |
715 | 892 | <p> |
716 | 893 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
717 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
894 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
895 | + print $globalArchiveKeepTrackMonths; |
|
896 | +} else { |
|
897 | + echo '0'; |
|
898 | +} |
|
899 | +?>" /> |
|
718 | 900 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
719 | 901 | </p> |
720 | 902 | <br /> |
@@ -723,7 +905,12 @@ discard block |
||
723 | 905 | <input type="checkbox" name="daemon" id="daemon" value="daemon"<?php if ((isset($globalDaemon) && $globalDaemon) || !isset($globalDaemon)) { ?> checked="checked"<?php } ?> onClick="daemon_js()" /> |
724 | 906 | <div id="cronends"> |
725 | 907 | <label for="cronend">Run script for xx seconds</label> |
726 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
908 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
909 | + print $globalCronEnd; |
|
910 | +} else { |
|
911 | + print '0'; |
|
912 | +} |
|
913 | +?>" /> |
|
727 | 914 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
728 | 915 | </div> |
729 | 916 | <p class="help-block">Uncheck if the script is running as cron job</p> |
@@ -764,26 +951,49 @@ discard block |
||
764 | 951 | <br /> |
765 | 952 | <p> |
766 | 953 | <label for="refresh">Show flights detected since xxx seconds</label> |
767 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
954 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
955 | + echo $globalLiveInterval; |
|
956 | +} else { |
|
957 | + echo '200'; |
|
958 | +} |
|
959 | +?>" /> |
|
768 | 960 | </p> |
769 | 961 | <p> |
770 | 962 | <label for="maprefresh">Live map refresh (in seconds)</label> |
771 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
963 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
964 | + echo $globalMapRefresh; |
|
965 | +} else { |
|
966 | + echo '30'; |
|
967 | +} |
|
968 | +?>" /> |
|
772 | 969 | </p> |
773 | 970 | <p> |
774 | 971 | <label for="mapidle">Map idle timeout (in minutes)</label> |
775 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
972 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
973 | + echo $globalMapIdleTimeout; |
|
974 | +} else { |
|
975 | + echo '30'; |
|
976 | +} |
|
977 | +?>" /> |
|
776 | 978 | <p class="help-block">0 to disable</p> |
777 | 979 | </p> |
778 | 980 | <br /> |
779 | 981 | <p> |
780 | 982 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
781 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
983 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
984 | + echo $globalClosestMinDist; |
|
985 | +} else { |
|
986 | + echo '50'; |
|
987 | +} |
|
988 | +?>" /> |
|
782 | 989 | </p> |
783 | 990 | <br /> |
784 | 991 | <p> |
785 | 992 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
786 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
993 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
994 | + echo $globalAircraftSize; |
|
995 | +} |
|
996 | +?>" /> |
|
787 | 997 | </p> |
788 | 998 | <br /> |
789 | 999 | <p> |
@@ -791,7 +1001,12 @@ discard block |
||
791 | 1001 | if (extension_loaded('gd') && function_exists('gd_info')) { |
792 | 1002 | ?> |
793 | 1003 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
794 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
1004 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
1005 | + echo $globalAircraftIconColor; |
|
1006 | +} else { |
|
1007 | + echo '1a3151'; |
|
1008 | +} |
|
1009 | +?>" /> |
|
795 | 1010 | <?php |
796 | 1011 | if (!is_writable('../cache')) { |
797 | 1012 | ?> |
@@ -809,8 +1024,18 @@ discard block |
||
809 | 1024 | <p> |
810 | 1025 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
811 | 1026 | <div class="range"> |
812 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
813 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
1027 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
1028 | + echo $globalAirportZoom; |
|
1029 | +} else { |
|
1030 | + echo '7'; |
|
1031 | +} |
|
1032 | +?>" /> |
|
1033 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
1034 | + echo $globalAirportZoom; |
|
1035 | +} else { |
|
1036 | + echo '7'; |
|
1037 | +} |
|
1038 | +?></output> |
|
814 | 1039 | </div> |
815 | 1040 | </p> |
816 | 1041 | </fieldset> |
@@ -837,19 +1062,27 @@ discard block |
||
837 | 1062 | $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
838 | 1063 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
839 | 1064 | |
840 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
841 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
1065 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
1066 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
1067 | + } |
|
1068 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
1069 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
1070 | + } |
|
842 | 1071 | |
843 | 1072 | if ($error == '' && isset($_POST['createdb']) && $dbname != '' && $dbuser != '' && $dbuserpass != '') { |
844 | 1073 | if ($dbroot != '' && $dbrootpass != '') { |
845 | 1074 | $result = create_db::create_database($dbroot,$dbrootpass,$dbuser,$dbuserpass,$dbname,$dbtype,$dbhost); |
846 | - if ($result != '') $error .= $result; |
|
1075 | + if ($result != '') { |
|
1076 | + $error .= $result; |
|
1077 | + } |
|
847 | 1078 | } |
848 | 1079 | if ($error == '') { |
849 | 1080 | //$error .= create_db::import_all_db('../db/'); |
850 | 1081 | $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
851 | 1082 | } |
852 | - } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
1083 | + } else { |
|
1084 | + $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
1085 | + } |
|
853 | 1086 | |
854 | 1087 | $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
855 | 1088 | $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
@@ -899,15 +1132,23 @@ discard block |
||
899 | 1132 | $source_city = $_POST['source_city']; |
900 | 1133 | $source_country = $_POST['source_country']; |
901 | 1134 | $source_ref = $_POST['source_ref']; |
902 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
903 | - else $source_id = array(); |
|
1135 | + if (isset($source_id)) { |
|
1136 | + $source_id = $_POST['source_id']; |
|
1137 | + } else { |
|
1138 | + $source_id = array(); |
|
1139 | + } |
|
904 | 1140 | |
905 | 1141 | $sources = array(); |
906 | 1142 | foreach ($source_name as $keys => $name) { |
907 | - 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]); |
|
908 | - 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]); |
|
1143 | + if (isset($source_id[$keys])) { |
|
1144 | + $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]); |
|
1145 | + } else { |
|
1146 | + $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]); |
|
1147 | + } |
|
1148 | + } |
|
1149 | + if (count($sources) > 0) { |
|
1150 | + $_SESSION['sources'] = $sources; |
|
909 | 1151 | } |
910 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
911 | 1152 | |
912 | 1153 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
913 | 1154 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -947,9 +1188,14 @@ discard block |
||
947 | 1188 | $sourcestats = $_POST['sourcestats']; |
948 | 1189 | $gSources = array(); |
949 | 1190 | foreach ($host as $key => $h) { |
950 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
951 | - else $cov = 'FALSE'; |
|
952 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
1191 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
1192 | + $cov = 'TRUE'; |
|
1193 | + } else { |
|
1194 | + $cov = 'FALSE'; |
|
1195 | + } |
|
1196 | + if ($h != '') { |
|
1197 | + $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
1198 | + } |
|
953 | 1199 | } |
954 | 1200 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
955 | 1201 | |
@@ -973,7 +1219,9 @@ discard block |
||
973 | 1219 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
974 | 1220 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
975 | 1221 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
976 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1222 | + } else { |
|
1223 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1224 | + } |
|
977 | 1225 | |
978 | 1226 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
979 | 1227 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1012,7 +1260,9 @@ discard block |
||
1012 | 1260 | |
1013 | 1261 | // Create in settings.php keys not yet configurable if not already here |
1014 | 1262 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1015 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1263 | + if (!isset($globalDebug)) { |
|
1264 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1265 | + } |
|
1016 | 1266 | |
1017 | 1267 | $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
1018 | 1268 | if ($archive == 'archive') { |
@@ -1042,24 +1292,38 @@ discard block |
||
1042 | 1292 | } |
1043 | 1293 | */ |
1044 | 1294 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
1045 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1046 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1047 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1048 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1295 | + if ($globalsbs == 'sbs') { |
|
1296 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1297 | + } else { |
|
1298 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1299 | + } |
|
1300 | + if ($globalaprs == 'aprs') { |
|
1301 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1302 | + } else { |
|
1303 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1304 | + } |
|
1049 | 1305 | if ($globalivao == 'ivao') { |
1050 | 1306 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
1051 | 1307 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
1052 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1308 | + } else { |
|
1309 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1310 | + } |
|
1053 | 1311 | if ($globalvatsim == 'vatsim') { |
1054 | 1312 | //$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE')); |
1055 | 1313 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
1056 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1314 | + } else { |
|
1315 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1316 | + } |
|
1057 | 1317 | if ($globalphpvms == 'phpvms') { |
1058 | 1318 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
1059 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1319 | + } else { |
|
1320 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1321 | + } |
|
1060 | 1322 | if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') { |
1061 | 1323 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
1062 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1324 | + } else { |
|
1325 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1326 | + } |
|
1063 | 1327 | |
1064 | 1328 | |
1065 | 1329 | |
@@ -1153,7 +1417,9 @@ discard block |
||
1153 | 1417 | $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
1154 | 1418 | } |
1155 | 1419 | |
1156 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1420 | + if (!isset($globalTransaction)) { |
|
1421 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1422 | + } |
|
1157 | 1423 | |
1158 | 1424 | // Set some defaults values... |
1159 | 1425 | if (!isset($globalAircraftImageSources)) { |
@@ -1168,15 +1434,23 @@ discard block |
||
1168 | 1434 | |
1169 | 1435 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
1170 | 1436 | |
1171 | - if ($error == '') settings::modify_settings($settings); |
|
1172 | - if ($error == '') settings::comment_settings($settings_comment); |
|
1437 | + if ($error == '') { |
|
1438 | + settings::modify_settings($settings); |
|
1439 | + } |
|
1440 | + if ($error == '') { |
|
1441 | + settings::comment_settings($settings_comment); |
|
1442 | + } |
|
1173 | 1443 | if ($error != '') { |
1174 | 1444 | print '<div class="info column">'.$error.'</div>'; |
1175 | 1445 | require('../footer.php'); |
1176 | 1446 | exit; |
1177 | 1447 | } else { |
1178 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
1179 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
1448 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
1449 | + $_SESSION['waypoints'] = 1; |
|
1450 | + } |
|
1451 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
1452 | + $_SESSION['owner'] = 1; |
|
1453 | + } |
|
1180 | 1454 | $_SESSION['install'] = 'database_import'; |
1181 | 1455 | //require('../footer.php'); |
1182 | 1456 | print '<div class="info column"><ul>'; |
@@ -1184,7 +1458,9 @@ discard block |
||
1184 | 1458 | if (isset($_POST['createdb'])) { |
1185 | 1459 | $_SESSION['done'] = array('Create database','Write configuration'); |
1186 | 1460 | print '<li>Create database....<strong>SUCCESS</strong></li>'; |
1187 | - } else $_SESSION['done'] = array('Write configuration'); |
|
1461 | + } else { |
|
1462 | + $_SESSION['done'] = array('Write configuration'); |
|
1463 | + } |
|
1188 | 1464 | print '<li>Write configuration....<img src="../images/loading.gif" /></li></ul></div>'; |
1189 | 1465 | # flush(); |
1190 | 1466 | # @ob_flush(); |
@@ -1199,12 +1475,16 @@ discard block |
||
1199 | 1475 | $pop = false; |
1200 | 1476 | foreach ($_SESSION['done'] as $done) { |
1201 | 1477 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
1202 | - if ($done == 'Create database') $pop = true; |
|
1478 | + if ($done == 'Create database') { |
|
1479 | + $pop = true; |
|
1480 | + } |
|
1203 | 1481 | } |
1204 | 1482 | if ($pop) { |
1205 | 1483 | sleep(5); |
1206 | 1484 | print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
1207 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
1485 | + } else { |
|
1486 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
1487 | + } |
|
1208 | 1488 | print '</div></ul>'; |
1209 | 1489 | print '<div id="error"></div>'; |
1210 | 1490 | /* foreach ($_SESSION['done'] as $done) { |
@@ -68,27 +68,27 @@ discard block |
||
68 | 68 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_import') { |
69 | 69 | if (update_schema::check_version(false) == '0') { |
70 | 70 | if ($globalDBdriver == 'mysql') { |
71 | - $error .= create_db::import_all_db('../db/'); |
|
71 | + $error .= create_db::import_all_db('../db/'); |
|
72 | 72 | } elseif ($globalDBdriver == 'pgsql') { |
73 | - $error .= create_db::import_all_db('../db/pgsql/'); |
|
73 | + $error .= create_db::import_all_db('../db/pgsql/'); |
|
74 | 74 | } |
75 | 75 | if ($error != '') { |
76 | - $_SESSION['error'] = $error; |
|
76 | + $_SESSION['error'] = $error; |
|
77 | 77 | } |
78 | 78 | $_SESSION['done'] = array_merge($_SESSION['done'],array('Create and import tables')); |
79 | 79 | if ($globalSBS1 && !$globalIVAO && !$globalVATSIM && !$globalphpVMS) { |
80 | 80 | $_SESSION['install'] = 'populate'; |
81 | 81 | $_SESSION['next'] = 'Populate aircraft_modes table with externals data for ADS-B'; |
82 | 82 | } else { |
83 | - $_SESSION['install'] = 'sources'; |
|
84 | - $_SESSION['next'] = 'Insert data in source table'; |
|
83 | + $_SESSION['install'] = 'sources'; |
|
84 | + $_SESSION['next'] = 'Insert data in source table'; |
|
85 | 85 | } |
86 | 86 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
87 | 87 | print json_encode($result); |
88 | 88 | } else { |
89 | 89 | $error .= update_schema::check_version(true); |
90 | 90 | if ($error != '') { |
91 | - $_SESSION['error'] = $error; |
|
91 | + $_SESSION['error'] = $error; |
|
92 | 92 | } |
93 | 93 | $_SESSION['done'] = array_merge($_SESSION['done'],array('Update schema if needed')); |
94 | 94 | $_SESSION['install'] = 'sources'; |
@@ -118,25 +118,25 @@ discard block |
||
118 | 118 | $error .= update_db::update_countries(); |
119 | 119 | $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate countries database')); |
120 | 120 | if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
121 | - $_SESSION['install'] = 'notam'; |
|
122 | - $_SESSION['next'] = 'Populate NOTAM table with externals data'; |
|
123 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
124 | - print json_encode($result); |
|
121 | + $_SESSION['install'] = 'notam'; |
|
122 | + $_SESSION['next'] = 'Populate NOTAM table with externals data'; |
|
123 | + $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
124 | + print json_encode($result); |
|
125 | 125 | } elseif (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) { |
126 | - $_SESSION['install'] = 'owner'; |
|
127 | - $_SESSION['next'] = 'Populate owner table with externals data'; |
|
128 | - unset($_SESSION['owner']); |
|
129 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
130 | - print json_encode($result); |
|
126 | + $_SESSION['install'] = 'owner'; |
|
127 | + $_SESSION['next'] = 'Populate owner table with externals data'; |
|
128 | + unset($_SESSION['owner']); |
|
129 | + $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
130 | + print json_encode($result); |
|
131 | 131 | } else { |
132 | - $_SESSION['install'] = 'sources'; |
|
133 | - $_SESSION['next'] = 'Insert data in source table'; |
|
134 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
135 | - print json_encode($result); |
|
132 | + $_SESSION['install'] = 'sources'; |
|
133 | + $_SESSION['next'] = 'Insert data in source table'; |
|
134 | + $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
135 | + print json_encode($result); |
|
136 | 136 | } |
137 | 137 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate') { |
138 | 138 | if (!is_writable('tmp')) { |
139 | - $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
139 | + $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
140 | 140 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
141 | 141 | print json_encode($result); |
142 | 142 | } else { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | } |
153 | 153 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate_flarm') { |
154 | 154 | if (!is_writable('tmp')) { |
155 | - $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
155 | + $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
156 | 156 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
157 | 157 | print json_encode($result); |
158 | 158 | } else { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'routes') { |
187 | 187 | if (!is_writable('tmp')) { |
188 | - $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
188 | + $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
189 | 189 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
190 | 190 | print json_encode($result); |
191 | 191 | } else { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'translation') { |
202 | 202 | if (!is_writable('tmp')) { |
203 | - $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
203 | + $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
204 | 204 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
205 | 205 | print json_encode($result); |
206 | 206 | } else { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'owner') { |
231 | 231 | if (!is_writable('tmp')) { |
232 | - $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
232 | + $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
233 | 233 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
234 | 234 | print json_encode($result); |
235 | 235 | } else { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'notam') { |
246 | 246 | if (!is_writable('tmp')) { |
247 | - $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
247 | + $error = 'The directory <i>install/tmp</i> must be writable.'; |
|
248 | 248 | $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
249 | 249 | print json_encode($result); |
250 | 250 | } else { |
@@ -296,17 +296,17 @@ discard block |
||
296 | 296 | */ |
297 | 297 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'sources') { |
298 | 298 | if (isset($_SESSION['sources']) && count($_SESSION['sources']) > 0) { |
299 | - $sources = $_SESSION['sources']; |
|
299 | + $sources = $_SESSION['sources']; |
|
300 | 300 | |
301 | - include_once('../require/class.Source.php'); |
|
302 | - $globalDebug = FALSE; |
|
303 | - $Source = new Source(); |
|
304 | - $Source->deleteAllLocation(); |
|
305 | - foreach ($sources as $src) { |
|
301 | + include_once('../require/class.Source.php'); |
|
302 | + $globalDebug = FALSE; |
|
303 | + $Source = new Source(); |
|
304 | + $Source->deleteAllLocation(); |
|
305 | + foreach ($sources as $src) { |
|
306 | 306 | if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
307 | - } |
|
308 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table')); |
|
309 | - unset($_SESSION['sources']); |
|
307 | + } |
|
308 | + $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table')); |
|
309 | + unset($_SESSION['sources']); |
|
310 | 310 | } |
311 | 311 | /* |
312 | 312 | if (isset($globalIVAO) && $globalIVAO) $_SESSION['install'] = 'ivao'; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | if ($error != '') { |
76 | 76 | $_SESSION['error'] = $error; |
77 | 77 | } |
78 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Create and import tables')); |
|
78 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Create and import tables')); |
|
79 | 79 | if ($globalSBS1 && !$globalIVAO && !$globalVATSIM && !$globalphpVMS) { |
80 | 80 | $_SESSION['install'] = 'populate'; |
81 | 81 | $_SESSION['next'] = 'Populate aircraft_modes table with externals data for ADS-B'; |
@@ -83,84 +83,84 @@ discard block |
||
83 | 83 | $_SESSION['install'] = 'sources'; |
84 | 84 | $_SESSION['next'] = 'Insert data in source table'; |
85 | 85 | } |
86 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
86 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
87 | 87 | print json_encode($result); |
88 | 88 | } else { |
89 | 89 | $error .= update_schema::check_version(true); |
90 | 90 | if ($error != '') { |
91 | 91 | $_SESSION['error'] = $error; |
92 | 92 | } |
93 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Update schema if needed')); |
|
93 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Update schema if needed')); |
|
94 | 94 | $_SESSION['install'] = 'sources'; |
95 | 95 | $_SESSION['next'] = 'Insert data in source table'; |
96 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
96 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
97 | 97 | print json_encode($result); |
98 | 98 | } |
99 | 99 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'waypoints') { |
100 | 100 | include_once('class.update_db.php'); |
101 | 101 | $error .= update_db::update_waypoints(); |
102 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate waypoints database')); |
|
102 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate waypoints database')); |
|
103 | 103 | |
104 | 104 | $_SESSION['install'] = 'airspace'; |
105 | 105 | $_SESSION['next'] = 'Populate airspace table'; |
106 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
106 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
107 | 107 | print json_encode($result); |
108 | 108 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'airspace') { |
109 | 109 | include_once('class.update_db.php'); |
110 | 110 | $error .= update_db::update_airspace(); |
111 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate airspace database')); |
|
111 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate airspace database')); |
|
112 | 112 | $_SESSION['install'] = 'countries'; |
113 | 113 | $_SESSION['next'] = 'Populate countries table'; |
114 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
114 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
115 | 115 | print json_encode($result); |
116 | 116 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'countries') { |
117 | 117 | include_once('class.update_db.php'); |
118 | 118 | $error .= update_db::update_countries(); |
119 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate countries database')); |
|
119 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate countries database')); |
|
120 | 120 | if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
121 | 121 | $_SESSION['install'] = 'notam'; |
122 | 122 | $_SESSION['next'] = 'Populate NOTAM table with externals data'; |
123 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
123 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
124 | 124 | print json_encode($result); |
125 | 125 | } elseif (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) { |
126 | 126 | $_SESSION['install'] = 'owner'; |
127 | 127 | $_SESSION['next'] = 'Populate owner table with externals data'; |
128 | 128 | unset($_SESSION['owner']); |
129 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
129 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
130 | 130 | print json_encode($result); |
131 | 131 | } else { |
132 | 132 | $_SESSION['install'] = 'sources'; |
133 | 133 | $_SESSION['next'] = 'Insert data in source table'; |
134 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
134 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
135 | 135 | print json_encode($result); |
136 | 136 | } |
137 | 137 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate') { |
138 | 138 | if (!is_writable('tmp')) { |
139 | 139 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
140 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
140 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
141 | 141 | print json_encode($result); |
142 | 142 | } else { |
143 | 143 | include_once('class.update_db.php'); |
144 | 144 | $globalDebug = FALSE; |
145 | 145 | $error .= update_db::update_ModeS(); |
146 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate aircraft_modes table with externals data for ADS-B')); |
|
146 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate aircraft_modes table with externals data for ADS-B')); |
|
147 | 147 | |
148 | 148 | $_SESSION['install'] = 'populate_flarm'; |
149 | 149 | $_SESSION['next'] = 'Populate aircraft_modes table with externals data for FLARM'; |
150 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
150 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
151 | 151 | print json_encode($result); |
152 | 152 | } |
153 | 153 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate_flarm') { |
154 | 154 | if (!is_writable('tmp')) { |
155 | 155 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
156 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
156 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
157 | 157 | print json_encode($result); |
158 | 158 | } else { |
159 | 159 | include_once('class.update_db.php'); |
160 | 160 | $globalDebug = FALSE; |
161 | 161 | $error .= update_db::update_ModeS_flarm(); |
162 | 162 | $error .= update_db::update_ModeS_ogn(); |
163 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate aircraft_modes table with externals data for FLARM')); |
|
163 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate aircraft_modes table with externals data for FLARM')); |
|
164 | 164 | |
165 | 165 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
166 | 166 | $_SESSION['install'] = 'vatsim'; |
@@ -180,34 +180,34 @@ discard block |
||
180 | 180 | $_SESSION['install'] = 'routes'; |
181 | 181 | $_SESSION['next'] = 'Populate routes table with externals data'; |
182 | 182 | } |
183 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
183 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
184 | 184 | print json_encode($result); |
185 | 185 | } |
186 | 186 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'routes') { |
187 | 187 | if (!is_writable('tmp')) { |
188 | 188 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
189 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
189 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
190 | 190 | print json_encode($result); |
191 | 191 | } else { |
192 | 192 | include_once('class.update_db.php'); |
193 | 193 | $globalDebug = FALSE; |
194 | 194 | $error .= update_db::update_routes(); |
195 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate routes table with externals data')); |
|
195 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate routes table with externals data')); |
|
196 | 196 | $_SESSION['install'] = 'translation'; |
197 | 197 | $_SESSION['next'] = 'Populate translation table with externals data'; |
198 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
198 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
199 | 199 | print json_encode($result); |
200 | 200 | } |
201 | 201 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'translation') { |
202 | 202 | if (!is_writable('tmp')) { |
203 | 203 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
204 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
204 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
205 | 205 | print json_encode($result); |
206 | 206 | } else { |
207 | 207 | include_once('class.update_db.php'); |
208 | 208 | $globalDebug = FALSE; |
209 | 209 | $error .= update_db::update_translation(); |
210 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate translation table with externals data')); |
|
210 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate translation table with externals data')); |
|
211 | 211 | |
212 | 212 | if ($_SESSION['waypoints'] == 1) { |
213 | 213 | $_SESSION['install'] = 'waypoints'; |
@@ -224,48 +224,48 @@ discard block |
||
224 | 224 | $_SESSION['install'] = 'sources'; |
225 | 225 | $_SESSION['next'] = 'Insert data in source table'; |
226 | 226 | } |
227 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
227 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
228 | 228 | print json_encode($result); |
229 | 229 | } |
230 | 230 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'owner') { |
231 | 231 | if (!is_writable('tmp')) { |
232 | 232 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
233 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
233 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
234 | 234 | print json_encode($result); |
235 | 235 | } else { |
236 | 236 | include_once('class.update_db.php'); |
237 | 237 | $globalDebug = FALSE; |
238 | 238 | $error = update_db::update_owner(); |
239 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate owner table with externals data')); |
|
239 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate owner table with externals data')); |
|
240 | 240 | $_SESSION['install'] = 'sources'; |
241 | 241 | $_SESSION['next'] = 'Insert data in source table'; |
242 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
242 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
243 | 243 | print json_encode($result); |
244 | 244 | } |
245 | 245 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'notam') { |
246 | 246 | if (!is_writable('tmp')) { |
247 | 247 | $error = 'The directory <i>install/tmp</i> must be writable.'; |
248 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
248 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
249 | 249 | print json_encode($result); |
250 | 250 | } else { |
251 | 251 | include_once('class.update_db.php'); |
252 | 252 | $globalDebug = FALSE; |
253 | 253 | if (isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
254 | 254 | $error .= update_db::update_notam(); |
255 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate notam table with externals data')); |
|
255 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate notam table with externals data')); |
|
256 | 256 | } else { |
257 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Populate notam table with externals data (no source defined)')); |
|
257 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Populate notam table with externals data (no source defined)')); |
|
258 | 258 | } |
259 | 259 | if (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) { |
260 | 260 | $_SESSION['install'] = 'owner'; |
261 | 261 | $_SESSION['next'] = 'Populate owner table'; |
262 | 262 | unset($_SESSION['owner']); |
263 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
263 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
264 | 264 | print json_encode($result); |
265 | 265 | } else { |
266 | 266 | $_SESSION['install'] = 'sources'; |
267 | 267 | $_SESSION['next'] = 'Insert data in source table'; |
268 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
268 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
269 | 269 | print json_encode($result); |
270 | 270 | } |
271 | 271 | } |
@@ -303,9 +303,9 @@ discard block |
||
303 | 303 | $Source = new Source(); |
304 | 304 | $Source->deleteAllLocation(); |
305 | 305 | foreach ($sources as $src) { |
306 | - if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
|
306 | + if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'], $src['latitude'], $src['longitude'], $src['altitude'], $src['city'], $src['country'], $src['source'], 'antenna.png'); |
|
307 | 307 | } |
308 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table')); |
|
308 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert data in source table')); |
|
309 | 309 | unset($_SESSION['sources']); |
310 | 310 | } |
311 | 311 | /* |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | $_SESSION['install'] = 'finish'; |
331 | 331 | $_SESSION['next'] = 'finish'; |
332 | 332 | } |
333 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
333 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
334 | 334 | print json_encode($result); |
335 | 335 | } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'vatsim') { |
336 | 336 | include_once('../install/class.create_db.php'); |
@@ -340,36 +340,36 @@ discard block |
||
340 | 340 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
341 | 341 | if (file_exists('tmp/ivae_feb2013.zip')) { |
342 | 342 | $error .= update_db::update_IVAO(); |
343 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert IVAO data')); |
|
343 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert IVAO data')); |
|
344 | 344 | } else { |
345 | 345 | $error .= update_db::update_vatsim(); |
346 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data')); |
|
346 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data')); |
|
347 | 347 | } |
348 | 348 | } elseif (isset($globalVATSIM) && $globalVATSIM) { |
349 | 349 | $error .= update_db::update_vatsim(); |
350 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data')); |
|
350 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data')); |
|
351 | 351 | } elseif (isset($globalIVAO) && $globalIVAO) { |
352 | 352 | if (file_exists('tmp/ivae_feb2013.zip')) { |
353 | 353 | $error .= update_db::update_IVAO(); |
354 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert IVAO data')); |
|
354 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert IVAO data')); |
|
355 | 355 | } else { |
356 | 356 | $error .= update_db::update_vatsim(); |
357 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data (IVAO not found)')); |
|
357 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data (IVAO not found)')); |
|
358 | 358 | } |
359 | 359 | } elseif (isset($globalphpVMS) && $globalphpVMS) { |
360 | - $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert phpVMS data')); |
|
360 | + $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert phpVMS data')); |
|
361 | 361 | } |
362 | 362 | //$_SESSION['install'] = 'routes'; |
363 | 363 | //$_SESSION['next'] = 'Populate routes table with externals data'; |
364 | 364 | $_SESSION['install'] = 'finish'; |
365 | 365 | $_SESSION['next'] = 'finish'; |
366 | 366 | |
367 | - $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']); |
|
367 | + $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']); |
|
368 | 368 | print json_encode($result); |
369 | 369 | } else { |
370 | 370 | //unset($_SESSION['install']); |
371 | 371 | $_SESSION['error'] = 'Unknwon task : '.$_SESSION['install']; |
372 | - $result = array('error' => 'Unknwon task : '.$_SESSION['install'],'done' => $_SESSION['done'],'next' => 'finish','install' => 'finish'); |
|
372 | + $result = array('error' => 'Unknwon task : '.$_SESSION['install'], 'done' => $_SESSION['done'], 'next' => 'finish', 'install' => 'finish'); |
|
373 | 373 | print json_encode($result); |
374 | 374 | } |
375 | 375 | ?> |
376 | 376 | \ No newline at end of file |
@@ -164,15 +164,21 @@ discard block |
||
164 | 164 | |
165 | 165 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
166 | 166 | $_SESSION['install'] = 'vatsim'; |
167 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
168 | - else $_SESSION['next'] = 'Insert VATSIM data'; |
|
167 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
168 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
169 | + } else { |
|
170 | + $_SESSION['next'] = 'Insert VATSIM data'; |
|
171 | + } |
|
169 | 172 | } elseif (isset($globalVATSIM) && $globalVATSIM) { |
170 | 173 | $_SESSION['install'] = 'vatsim'; |
171 | 174 | $_SESSION['next'] = 'Insert VATSIM data'; |
172 | 175 | } elseif (isset($globalIVAO) && $globalIVAO) { |
173 | 176 | $_SESSION['install'] = 'vatsim'; |
174 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
175 | - else $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
177 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
178 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
179 | + } else { |
|
180 | + $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
181 | + } |
|
176 | 182 | } elseif (isset($globalphpVMS) && $globalphpVMS) { |
177 | 183 | $_SESSION['install'] = 'vatsim'; |
178 | 184 | $_SESSION['next'] = 'Insert phpVMS data'; |
@@ -303,7 +309,9 @@ discard block |
||
303 | 309 | $Source = new Source(); |
304 | 310 | $Source->deleteAllLocation(); |
305 | 311 | foreach ($sources as $src) { |
306 | - if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
|
312 | + if (isset($src['latitude']) && $src['latitude'] != '') { |
|
313 | + $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png'); |
|
314 | + } |
|
307 | 315 | } |
308 | 316 | $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table')); |
309 | 317 | unset($_SESSION['sources']); |
@@ -314,15 +322,21 @@ discard block |
||
314 | 322 | */ |
315 | 323 | if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) { |
316 | 324 | $_SESSION['install'] = 'vatsim'; |
317 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
318 | - else $_SESSION['next'] = 'Insert VATSIM data'; |
|
325 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
326 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
327 | + } else { |
|
328 | + $_SESSION['next'] = 'Insert VATSIM data'; |
|
329 | + } |
|
319 | 330 | } elseif (isset($globalVATSIM) && $globalVATSIM) { |
320 | 331 | $_SESSION['install'] = 'vatsim'; |
321 | 332 | $_SESSION['next'] = 'Insert VATSIM data'; |
322 | 333 | } elseif (isset($globalIVAO) && $globalIVAO) { |
323 | 334 | $_SESSION['install'] = 'vatsim'; |
324 | - if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data'; |
|
325 | - else $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
335 | + if (file_exists('tmp/ivae_feb2013.zip')) { |
|
336 | + $_SESSION['next'] = 'Insert IVAO data'; |
|
337 | + } else { |
|
338 | + $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)'; |
|
339 | + } |
|
326 | 340 | } elseif (isset($globalphpVMS) && $globalphpVMS) { |
327 | 341 | $_SESSION['install'] = 'vatsim'; |
328 | 342 | $_SESSION['next'] = 'Insert phpVMS data'; |
@@ -4,13 +4,13 @@ |
||
4 | 4 | * This Script will try to find all real arrival airports for all flights in DB |
5 | 5 | * |
6 | 6 | */ |
7 | - require_once('../require/settings.php'); |
|
8 | - if ($globalInstalled) { |
|
9 | - echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
10 | - exit; |
|
11 | - } |
|
12 | - require('../require/class.Spotter.php'); |
|
13 | - $Spotter = new Spotter(); |
|
14 | - $Spotter->updateArrivalAirports(); |
|
7 | + require_once('../require/settings.php'); |
|
8 | + if ($globalInstalled) { |
|
9 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
10 | + exit; |
|
11 | + } |
|
12 | + require('../require/class.Spotter.php'); |
|
13 | + $Spotter = new Spotter(); |
|
14 | + $Spotter->updateArrivalAirports(); |
|
15 | 15 | |
16 | 16 | ?> |
17 | 17 | \ No newline at end of file |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $Common = new Common(); |
13 | 13 | $settings_filename = '../require/settings.php'; |
14 | 14 | $content = file_get_contents($settings_filename); |
15 | - $fh = fopen($settings_filename,'w'); |
|
15 | + $fh = fopen($settings_filename, 'w'); |
|
16 | 16 | foreach ($settings as $settingname => $value) { |
17 | 17 | if ($value == 'TRUE' || $value == 'FALSE') { |
18 | 18 | $pattern = '/\R\$'.$settingname." = ".'(TRUE|FALSE)'."/"; |
@@ -78,21 +78,21 @@ discard block |
||
78 | 78 | $replace = "\n".'\$'.$settingname." = '".$value."'"; |
79 | 79 | } |
80 | 80 | $rep_cnt = 0; |
81 | - $content = preg_replace($pattern,$replace,$content,1,$rep_cnt); |
|
81 | + $content = preg_replace($pattern, $replace, $content, 1, $rep_cnt); |
|
82 | 82 | |
83 | 83 | /// If setting was a string and is now an array |
84 | 84 | if ($rep_cnt == 0 && is_array($value)) { |
85 | 85 | $pattern = '/\R\$'.$settingname." = '".'(.*)'."'/"; |
86 | - $content = preg_replace($pattern,$replace,$content,1,$rep_cnt); |
|
86 | + $content = preg_replace($pattern, $replace, $content, 1, $rep_cnt); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | // If setting is not in settings.php (for update) |
90 | 90 | if ($rep_cnt == 0) { |
91 | - $content = preg_replace('/\?>/',$replace.";\n?>",$content,1,$rep_cnt); |
|
91 | + $content = preg_replace('/\?>/', $replace.";\n?>", $content, 1, $rep_cnt); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | } |
95 | - fwrite($fh,$content); |
|
95 | + fwrite($fh, $content); |
|
96 | 96 | fclose($fh); |
97 | 97 | } |
98 | 98 | |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | $Common = new Common(); |
105 | 105 | $settings_filename = '../require/settings.php'; |
106 | 106 | $content = file_get_contents($settings_filename); |
107 | - $fh = fopen($settings_filename,'w'); |
|
107 | + $fh = fopen($settings_filename, 'w'); |
|
108 | 108 | foreach ($settings as $settingname) { |
109 | 109 | $pattern = '/\R\$'.$settingname." = /"; |
110 | 110 | $replace = '//$'.$settingname." = "; |
111 | - $content = preg_replace($pattern,$replace,$content); |
|
111 | + $content = preg_replace($pattern, $replace, $content); |
|
112 | 112 | } |
113 | - fwrite($fh,$content); |
|
113 | + fwrite($fh, $content); |
|
114 | 114 | fclose($fh); |
115 | 115 | } |
116 | 116 | } |
@@ -70,7 +70,9 @@ |
||
70 | 70 | } |
71 | 71 | } |
72 | 72 | } |
73 | - if (!isset($array_value)) $array_value = ''; |
|
73 | + if (!isset($array_value)) { |
|
74 | + $array_value = ''; |
|
75 | + } |
|
74 | 76 | $replace = "\n".'\$'.$settingname." = array(".$array_value.")"; |
75 | 77 | unset($array_value); |
76 | 78 | } else { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $metar_info = $METAR->getMETAR($airport_icao); |
47 | 47 | //print_r($metar_info); |
48 | 48 | if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']); |
49 | - //print_r($metar_parse); |
|
49 | + //print_r($metar_parse); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | function drawChart6() { |
100 | 100 | var data = google.visualization.arrayToDataTable([ |
101 | 101 | ["'._("Date").'","'._("Departure").'","'._("Arrival").'"], '; |
102 | - $airport_data = ''; |
|
103 | - foreach($all_data as $data) |
|
104 | - { |
|
105 | - $airport_data .= '[ "'.$data['date'].'",'.$data['departure'].','.$data['arrival'].'],'; |
|
106 | - } |
|
107 | - $airport_data = substr($airport_data, 0, -1); |
|
108 | - print $airport_data.']); |
|
102 | + $airport_data = ''; |
|
103 | + foreach($all_data as $data) |
|
104 | + { |
|
105 | + $airport_data .= '[ "'.$data['date'].'",'.$data['departure'].','.$data['arrival'].'],'; |
|
106 | + } |
|
107 | + $airport_data = substr($airport_data, 0, -1); |
|
108 | + print $airport_data.']); |
|
109 | 109 | |
110 | 110 | var options = { |
111 | 111 | legend: {position: "none"}, |
@@ -5,17 +5,17 @@ discard block |
||
5 | 5 | require_once('require/class.Stats.php'); |
6 | 6 | require_once('require/class.METAR.php'); |
7 | 7 | |
8 | -if (!isset($_GET['airport'])){ |
|
8 | +if (!isset($_GET['airport'])) { |
|
9 | 9 | header('Location: '.$globalURL.'/airport'); |
10 | 10 | } else { |
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | //calculuation for the pagination |
13 | - if(!isset($_GET['limit'])) |
|
13 | + if (!isset($_GET['limit'])) |
|
14 | 14 | { |
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | $limit_next = $limit_end + $absolute_difference; |
29 | 29 | $limit_previous_1 = $limit_start - $absolute_difference; |
30 | 30 | $limit_previous_2 = $limit_end - $absolute_difference; |
31 | - $airport_icao = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
31 | + $airport_icao = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
32 | 32 | $page_url = $globalURL.'/airport/'.$airport_icao; |
33 | 33 | |
34 | 34 | if (isset($_GET['sort'])) { |
35 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, $_GET['sort']); |
|
35 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, $_GET['sort']); |
|
36 | 36 | } else { |
37 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, ''); |
|
37 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, ''); |
|
38 | 38 | } |
39 | 39 | $airport_array = $Spotter->getAllAirportInfo($airport_icao); |
40 | 40 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | //print_r($metar_parse); |
50 | 50 | } |
51 | 51 | |
52 | - $title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
52 | + $title = sprintf(_("Detailed View for %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
53 | 53 | |
54 | 54 | require_once('header.php'); |
55 | 55 | print '<div class="select-item">'; |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | print '<option></option>'; |
59 | 59 | $airport_names = $Spotter->getAllAirportNames(); |
60 | 60 | ksort($airport_names); |
61 | - foreach($airport_names as $airport_name) |
|
61 | + foreach ($airport_names as $airport_name) |
|
62 | 62 | { |
63 | - if($airport_icao == $airport_name['airport_icao']) |
|
63 | + if ($airport_icao == $airport_name['airport_icao']) |
|
64 | 64 | { |
65 | 65 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
66 | 66 | } else { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | var data = google.visualization.arrayToDataTable([ |
101 | 101 | ["'._("Date").'","'._("Departure").'","'._("Arrival").'"], '; |
102 | 102 | $airport_data = ''; |
103 | - foreach($all_data as $data) |
|
103 | + foreach ($all_data as $data) |
|
104 | 104 | { |
105 | 105 | $airport_data .= '[ "'.$data['date'].'",'.$data['departure'].','.$data['arrival'].'],'; |
106 | 106 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | print _("Dew point:").' '.$metar_parse['dew'].' °C'." - "; |
154 | 154 | } |
155 | 155 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
156 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
156 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
157 | 157 | print _("Humidity:").' '.$humidity.'%'." - "; |
158 | 158 | } |
159 | 159 | if (isset($metar_parse['QNH'])) { |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | print '<div class="table column">'; |
170 | 170 | if ($airport_array[0]['iata'] != "NA") |
171 | 171 | { |
172 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
172 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
173 | 173 | } |
174 | 174 | include('table-output.php'); |
175 | 175 | print '<div class="pagination">'; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -45,7 +45,9 @@ discard block |
||
45 | 45 | $METAR = new METAR(); |
46 | 46 | $metar_info = $METAR->getMETAR($airport_icao); |
47 | 47 | //print_r($metar_info); |
48 | - if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
48 | + if (isset($metar_info[0]['metar'])) { |
|
49 | + $metar_parse = $METAR->parse($metar_info[0]['metar']); |
|
50 | + } |
|
49 | 51 | //print_r($metar_parse); |
50 | 52 | } |
51 | 53 | |
@@ -90,7 +92,9 @@ discard block |
||
90 | 92 | $all_data = $Stats->getLast7DaysAirports($airport_icao); |
91 | 93 | if (isset($globalTimezone)) { |
92 | 94 | date_default_timezone_set($globalTimezone); |
93 | - } else date_default_timezone_set('UTC'); |
|
95 | + } else { |
|
96 | + date_default_timezone_set('UTC'); |
|
97 | + } |
|
94 | 98 | if (count($all_data) > 0) { |
95 | 99 | print '<div id="chart6" class="chart" width="100%"></div> |
96 | 100 | <script> |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | ["'._("Month").'", "'._("# of Flights").'"], '; |
24 | 24 | |
25 | 25 | $date_data = ''; |
26 | -foreach($date_array as $date_item) |
|
26 | +foreach ($date_array as $date_item) |
|
27 | 27 | { |
28 | 28 | $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
29 | 29 | } |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | print '</thead>'; |
61 | 61 | print '<tbody>'; |
62 | 62 | $i = 1; |
63 | - foreach($date_array as $date_item) |
|
63 | + foreach ($date_array as $date_item) |
|
64 | 64 | { |
65 | 65 | print '<tr>'; |
66 | 66 | print '<td><strong>'.$i.'</strong></td>'; |
67 | 67 | print '<td>'; |
68 | - print '<a href="'.$globalURL.'/date/'.date('Y-m-d',strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
68 | + print '<a href="'.$globalURL.'/date/'.date('Y-m-d', strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
69 | 69 | print '</td>'; |
70 | 70 | print '<td>'; |
71 | 71 | print $date_item['date_count']; |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | require_once('require/class.Language.php'); |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | 15 | } else $spotter_array = array(); |
16 | 16 | |
17 | 17 | if (!empty($spotter_array)) |
18 | 18 | { |
19 | - $title = sprintf(_("Most Common Time of Day between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
19 | + $title = sprintf(_("Most Common Time of Day between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="info column">'; |
22 | 22 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | include('route-sub-menu.php'); |
28 | 28 | print '<div class="column">'; |
29 | 29 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
30 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
30 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
31 | 31 | |
32 | 32 | $hour_array = $Spotter->countAllHoursByRoute($_GET['departure_airport'], $_GET['arrival_airport']); |
33 | 33 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | var data = google.visualization.arrayToDataTable([ |
40 | 40 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
41 | 41 | $hour_data = ''; |
42 | - foreach($hour_array as $hour_item) |
|
42 | + foreach ($hour_array as $hour_item) |
|
43 | 43 | { |
44 | 44 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
45 | 45 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | function drawChart() { |
35 | 35 | var data = google.visualization.arrayToDataTable([ |
36 | 36 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
37 | - $hour_data = ''; |
|
37 | + $hour_data = ''; |
|
38 | 38 | foreach($hour_array as $hour_item) |
39 | 39 | { |
40 | 40 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -12,7 +12,9 @@ |
||
12 | 12 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | -} else $spotter_array = array(); |
|
15 | +} else { |
|
16 | + $spotter_array = array(); |
|
17 | +} |
|
16 | 18 | |
17 | 19 | if (!empty($spotter_array)) |
18 | 20 | { |