@@ -1,30 +1,30 @@ |
||
| 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.create_db.php'); |
|
| 9 | - echo "Create and import all tables..."; |
|
| 10 | - create_db::import_all_db('../db/'); |
|
| 11 | - echo "Done !\n"; |
|
| 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.create_db.php'); |
|
| 9 | + echo "Create and import all tables..."; |
|
| 10 | + create_db::import_all_db('../db/'); |
|
| 11 | + echo "Done !\n"; |
|
| 12 | 12 | |
| 13 | - require('class.update_db.php'); |
|
| 14 | - echo "Populate all tables...\n"; |
|
| 15 | - update_db::update_all(); |
|
| 16 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
| 17 | - update_db::update_waypoints(); |
|
| 18 | - echo "Done !\n"; |
|
| 19 | - echo "Install airspace..."; |
|
| 20 | - update_db::update_airspace(); |
|
| 21 | - echo "Done !\n"; |
|
| 22 | - echo 'All is now installed ! Thanks'."\n"; |
|
| 23 | - if ($globalSBS1) { |
|
| 24 | - echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 25 | - } |
|
| 26 | - if ($globalACARS) { |
|
| 27 | - echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 28 | - } |
|
| 13 | + require('class.update_db.php'); |
|
| 14 | + echo "Populate all tables...\n"; |
|
| 15 | + update_db::update_all(); |
|
| 16 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
| 17 | + update_db::update_waypoints(); |
|
| 18 | + echo "Done !\n"; |
|
| 19 | + echo "Install airspace..."; |
|
| 20 | + update_db::update_airspace(); |
|
| 21 | + echo "Done !\n"; |
|
| 22 | + echo 'All is now installed ! Thanks'."\n"; |
|
| 23 | + if ($globalSBS1) { |
|
| 24 | + echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 25 | + } |
|
| 26 | + if ($globalACARS) { |
|
| 27 | + echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | 30 | ?> |
| 31 | 31 | \ No newline at end of file |
@@ -1,37 +1,37 @@ |
||
| 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 | - echo "Populate all tables...\n"; |
|
| 10 | - update_db::update_all(); |
|
| 11 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
| 12 | - update_db::update_waypoints(); |
|
| 13 | - echo "Done !\n"; |
|
| 14 | - echo "Install airspace..."; |
|
| 15 | - update_db::update_airspace(); |
|
| 16 | - echo "Done !\n"; |
|
| 17 | - echo "Install countries..."; |
|
| 18 | - update_db::update_countries(); |
|
| 19 | - echo "Done !\n"; |
|
| 20 | - if (isset($globalOwner) && $globalOwner) { |
|
| 3 | + require_once('../require/settings.php'); |
|
| 4 | + if ($globalInstalled) { |
|
| 5 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
| 6 | + exit; |
|
| 7 | + } |
|
| 8 | + require('class.update_db.php'); |
|
| 9 | + echo "Populate all tables...\n"; |
|
| 10 | + update_db::update_all(); |
|
| 11 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
| 12 | + update_db::update_waypoints(); |
|
| 13 | + echo "Done !\n"; |
|
| 14 | + echo "Install airspace..."; |
|
| 15 | + update_db::update_airspace(); |
|
| 16 | + echo "Done !\n"; |
|
| 17 | + echo "Install countries..."; |
|
| 18 | + update_db::update_countries(); |
|
| 19 | + echo "Done !\n"; |
|
| 20 | + if (isset($globalOwner) && $globalOwner) { |
|
| 21 | 21 | echo "Install private owners..."; |
| 22 | 22 | update_db::update_owner(); |
| 23 | - echo "Done !\n"; |
|
| 24 | - } |
|
| 25 | - /* |
|
| 23 | + echo "Done !\n"; |
|
| 24 | + } |
|
| 25 | + /* |
|
| 26 | 26 | if (isset($globalIVAO) && $globalIVAO) { |
| 27 | 27 | echo "Install IVAO airlines and logos..."; |
| 28 | 28 | update_db::update_IVAO(); |
| 29 | 29 | echo "Done !\n"; |
| 30 | 30 | } |
| 31 | 31 | */ |
| 32 | - if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
| 32 | + if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') { |
|
| 33 | 33 | echo "Install NOTAM from notaminfo.com..."; |
| 34 | - update_db:update_notam(); |
|
| 35 | - echo "Done !\n"; |
|
| 36 | - } |
|
| 34 | + update_db:update_notam(); |
|
| 35 | + echo "Done !\n"; |
|
| 36 | + } |
|
| 37 | 37 | ?> |
| 38 | 38 | \ No newline at end of file |
@@ -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 | |
@@ -6,27 +6,27 @@ discard block |
||
| 6 | 6 | public static function import_file($filename) { |
| 7 | 7 | $filename = filter_var($filename,FILTER_SANITIZE_STRING); |
| 8 | 8 | $Connection = new Connection(); |
| 9 | - //Connection::$db->beginTransaction(); |
|
| 10 | - $templine = ''; |
|
| 11 | - $lines = file($filename); |
|
| 12 | - foreach ($lines as $line) |
|
| 13 | - { |
|
| 14 | - if (substr($line,0,2) == '--' || $line == '') continue; |
|
| 15 | - $templine .= $line; |
|
| 16 | - if (substr(trim($line), -1,1) == ';') |
|
| 17 | - { |
|
| 18 | - try { |
|
| 19 | - $sth = $Connection->db->prepare($templine); |
|
| 9 | + //Connection::$db->beginTransaction(); |
|
| 10 | + $templine = ''; |
|
| 11 | + $lines = file($filename); |
|
| 12 | + foreach ($lines as $line) |
|
| 13 | + { |
|
| 14 | + if (substr($line,0,2) == '--' || $line == '') continue; |
|
| 15 | + $templine .= $line; |
|
| 16 | + if (substr(trim($line), -1,1) == ';') |
|
| 17 | + { |
|
| 18 | + try { |
|
| 19 | + $sth = $Connection->db->prepare($templine); |
|
| 20 | 20 | $sth->execute(); |
| 21 | - } catch(PDOException $e) { |
|
| 21 | + } catch(PDOException $e) { |
|
| 22 | 22 | return "error (import ".$filename.") : ".$e->getMessage()."\n"; |
| 23 | - } |
|
| 24 | - $templine = ''; |
|
| 25 | - } |
|
| 23 | + } |
|
| 24 | + $templine = ''; |
|
| 25 | + } |
|
| 26 | 26 | } |
| 27 | - //Connection::$db->commit(); |
|
| 28 | - $Connection->db = null; |
|
| 29 | - return ''; |
|
| 27 | + //Connection::$db->commit(); |
|
| 28 | + $Connection->db = null; |
|
| 29 | + return ''; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public static function import_all_db($directory) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | //foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $filename) |
| 36 | 36 | while(false !== ($filename = readdir($dh))) |
| 37 | 37 | { |
| 38 | - if (preg_match('/\.sql$/',$filename)) $error .= create_db::import_file($directory.$filename); |
|
| 38 | + if (preg_match('/\.sql$/',$filename)) $error .= create_db::import_file($directory.$filename); |
|
| 39 | 39 | } |
| 40 | 40 | return $error; |
| 41 | 41 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $host = filter_var($host,FILTER_SANITIZE_STRING); |
| 51 | 51 | // Dirty hack |
| 52 | 52 | if ($host != 'localhost' && $host != '127.0.0.1') { |
| 53 | - $grantright = $_SERVER['SERVER_ADDR']; |
|
| 53 | + $grantright = $_SERVER['SERVER_ADDR']; |
|
| 54 | 54 | } else $grantright = 'localhost'; |
| 55 | 55 | try { |
| 56 | 56 | $dbh = new PDO($db_type.':host='.$host,$root,$root_pass); |
@@ -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>'; |
@@ -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'; |
@@ -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 |
@@ -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"}, |