@@ -204,13 +204,13 @@ discard block |
||
| 204 | 204 | <p> |
| 205 | 205 | <label for="siteurl">Site directory</label> |
| 206 | 206 | <?php |
| 207 | - // Try to detect site directory |
|
| 208 | - if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
|
| 207 | + // Try to detect site directory |
|
| 208 | + if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
|
| 209 | 209 | if (isset($_SERVER['REQUEST_URI'])) { |
| 210 | 210 | $URL = $_SERVER['REQUEST_URI']; |
| 211 | 211 | $globalURL = str_replace('/install','',str_replace('/install/','',str_replace('/install/index.php','',$URL))); |
| 212 | 212 | } |
| 213 | - } |
|
| 213 | + } |
|
| 214 | 214 | ?> |
| 215 | 215 | <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
| 216 | 216 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
@@ -389,17 +389,17 @@ discard block |
||
| 389 | 389 | </tr> |
| 390 | 390 | |
| 391 | 391 | <?php |
| 392 | - if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 392 | + if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 393 | 393 | ?> |
| 394 | 394 | <!-- |
| 395 | 395 | <?php |
| 396 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 397 | - $Connection = new Connection(); |
|
| 396 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 397 | + $Connection = new Connection(); |
|
| 398 | 398 | ?> |
| 399 | 399 | --> |
| 400 | 400 | <?php |
| 401 | 401 | if ($Connection->db != NULL) { |
| 402 | - if ($Connection->tableExists('source_location')) { |
|
| 402 | + if ($Connection->tableExists('source_location')) { |
|
| 403 | 403 | require_once(dirname(__FILE__).'/../require/class.Source.php'); |
| 404 | 404 | $Source = new Source(); |
| 405 | 405 | //$alllocations = $Source->getAllLocationInfo(); |
@@ -419,9 +419,9 @@ discard block |
||
| 419 | 419 | |
| 420 | 420 | <?php |
| 421 | 421 | } |
| 422 | - } |
|
| 422 | + } |
|
| 423 | + } |
|
| 423 | 424 | } |
| 424 | - } |
|
| 425 | 425 | ?> |
| 426 | 426 | |
| 427 | 427 | <tr> |
@@ -549,12 +549,12 @@ discard block |
||
| 549 | 549 | ?> |
| 550 | 550 | <tr> |
| 551 | 551 | <?php |
| 552 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 552 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 553 | 553 | ?> |
| 554 | 554 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 555 | 555 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 556 | 556 | <?php |
| 557 | - } else { |
|
| 557 | + } else { |
|
| 558 | 558 | $hostport = explode(':',$source['host']); |
| 559 | 559 | if (isset($hostport[1])) { |
| 560 | 560 | $host = $hostport[0]; |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
| 568 | 568 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
| 569 | 569 | <?php |
| 570 | - } |
|
| 570 | + } |
|
| 571 | 571 | ?> |
| 572 | 572 | <td> |
| 573 | 573 | <select name="format[]" id="format"> |
@@ -711,9 +711,9 @@ discard block |
||
| 711 | 711 | </thead> |
| 712 | 712 | <tbody> |
| 713 | 713 | <?php |
| 714 | - if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 714 | + if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 715 | 715 | foreach ($globalNewsFeeds as $type => $feedslng) { |
| 716 | - foreach ($feedslng as $lng => $feeds) { |
|
| 716 | + foreach ($feedslng as $lng => $feeds) { |
|
| 717 | 717 | foreach ($feeds as $feed) { |
| 718 | 718 | ?> |
| 719 | 719 | <tr> |
@@ -738,9 +738,9 @@ discard block |
||
| 738 | 738 | |
| 739 | 739 | <?php |
| 740 | 740 | } |
| 741 | - } |
|
| 741 | + } |
|
| 742 | + } |
|
| 742 | 743 | } |
| 743 | - } |
|
| 744 | 744 | ?> |
| 745 | 745 | <tr> |
| 746 | 746 | <td><input type="url" name="newsurl[]" /></td> |
@@ -1145,7 +1145,7 @@ discard block |
||
| 1145 | 1145 | <p class="help-block">tsk file can be loaded using http://yourflightairmap/tsk=http://yourtskfile</p> |
| 1146 | 1146 | </p> |
| 1147 | 1147 | <?php |
| 1148 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1148 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1149 | 1149 | ?> |
| 1150 | 1150 | <br /> |
| 1151 | 1151 | <p> |
@@ -1176,14 +1176,14 @@ discard block |
||
| 1176 | 1176 | </p> |
| 1177 | 1177 | <?php |
| 1178 | 1178 | } |
| 1179 | - } else { |
|
| 1179 | + } else { |
|
| 1180 | 1180 | ?> |
| 1181 | 1181 | <br /> |
| 1182 | 1182 | <p> |
| 1183 | 1183 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
| 1184 | 1184 | </p> |
| 1185 | 1185 | <?php |
| 1186 | - } |
|
| 1186 | + } |
|
| 1187 | 1187 | ?> |
| 1188 | 1188 | <br /> |
| 1189 | 1189 | <p> |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | </p> |
| 1207 | 1207 | <?php |
| 1208 | 1208 | require('../footer.php'); |
| 1209 | - exit; |
|
| 1209 | + exit; |
|
| 1210 | 1210 | } |
| 1211 | 1211 | // ' |
| 1212 | 1212 | $settings = array(); |
@@ -1307,8 +1307,8 @@ discard block |
||
| 1307 | 1307 | |
| 1308 | 1308 | $sources = array(); |
| 1309 | 1309 | foreach ($source_name as $keys => $name) { |
| 1310 | - 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]); |
|
| 1311 | - 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]); |
|
| 1310 | + 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]); |
|
| 1311 | + 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]); |
|
| 1312 | 1312 | } |
| 1313 | 1313 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1314 | 1314 | |
@@ -1318,13 +1318,13 @@ discard block |
||
| 1318 | 1318 | |
| 1319 | 1319 | $newsfeeds = array(); |
| 1320 | 1320 | foreach($newsurl as $newskey => $url) { |
| 1321 | - if ($url != '') { |
|
| 1321 | + if ($url != '') { |
|
| 1322 | 1322 | $type = $newstype[$newskey]; |
| 1323 | 1323 | $lng = $newslng[$newskey]; |
| 1324 | 1324 | if (isset($newsfeeds[$type][$lng])) { |
| 1325 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1325 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1326 | 1326 | } else $newsfeeds[$type][$lng] = array($url); |
| 1327 | - } |
|
| 1327 | + } |
|
| 1328 | 1328 | } |
| 1329 | 1329 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
| 1330 | 1330 | |
@@ -1796,14 +1796,14 @@ discard block |
||
| 1796 | 1796 | |
| 1797 | 1797 | // Set some defaults values... |
| 1798 | 1798 | if (!isset($globalAircraftImageSources)) { |
| 1799 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1800 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1799 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1800 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1801 | 1801 | } |
| 1802 | 1802 | |
| 1803 | 1803 | if (!isset($globalSchedulesSources)) { |
| 1804 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1805 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1806 | - } |
|
| 1804 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1805 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1806 | + } |
|
| 1807 | 1807 | |
| 1808 | 1808 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1809 | 1809 | |
@@ -1851,21 +1851,21 @@ discard block |
||
| 1851 | 1851 | $popi = false; |
| 1852 | 1852 | $popw = false; |
| 1853 | 1853 | foreach ($_SESSION['done'] as $done) { |
| 1854 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1855 | - if ($done == 'Create database') $pop = true; |
|
| 1856 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1857 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1858 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1854 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1855 | + if ($done == 'Create database') $pop = true; |
|
| 1856 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1857 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1858 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1859 | 1859 | } |
| 1860 | 1860 | if ($pop) { |
| 1861 | - sleep(5); |
|
| 1862 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1861 | + sleep(5); |
|
| 1862 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1863 | 1863 | } else if ($popi) { |
| 1864 | - sleep(5); |
|
| 1865 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1864 | + sleep(5); |
|
| 1865 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1866 | 1866 | } else if ($popw) { |
| 1867 | - sleep(5); |
|
| 1868 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1867 | + sleep(5); |
|
| 1868 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1869 | 1869 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1870 | 1870 | print '</div></ul>'; |
| 1871 | 1871 | print '<div id="error"></div>'; |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | unset($_COOKIE['install']); |
| 1932 | 1932 | print '<div class="info column"><ul>'; |
| 1933 | 1933 | foreach ($_SESSION['done'] as $done) { |
| 1934 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1934 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1935 | 1935 | } |
| 1936 | 1936 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1937 | 1937 | print '</ul></div>'; |