@@ -317,18 +317,18 @@ discard block |
||
| 317 | 317 | </tr> |
| 318 | 318 | <!-- |
| 319 | 319 | <?php |
| 320 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 321 | - $Connection = new Connection(); |
|
| 320 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 321 | + $Connection = new Connection(); |
|
| 322 | 322 | ?> |
| 323 | 323 | --> |
| 324 | 324 | <?php |
| 325 | - if ($Connection->db != NULL) { |
|
| 325 | + if ($Connection->db != NULL) { |
|
| 326 | 326 | if ($Connection->tableExists('source_location')) { |
| 327 | - require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
| 328 | - $Source = new Source(); |
|
| 329 | - //$alllocations = $Source->getAllLocationInfo(); |
|
| 330 | - $alllocations = $Source->getLocationInfobyType(''); |
|
| 331 | - foreach ($alllocations as $location) { |
|
| 327 | + require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
| 328 | + $Source = new Source(); |
|
| 329 | + //$alllocations = $Source->getAllLocationInfo(); |
|
| 330 | + $alllocations = $Source->getLocationInfobyType(''); |
|
| 331 | + foreach ($alllocations as $location) { |
|
| 332 | 332 | ?> |
| 333 | 333 | <tr> |
| 334 | 334 | <input type="hidden" name="source_id[]" value="<?php print $location['id']; ?>" /> |
@@ -342,9 +342,9 @@ discard block |
||
| 342 | 342 | </tr> |
| 343 | 343 | |
| 344 | 344 | <?php |
| 345 | - } |
|
| 345 | + } |
|
| 346 | + } |
|
| 346 | 347 | } |
| 347 | - } |
|
| 348 | 348 | ?> |
| 349 | 349 | |
| 350 | 350 | <tr> |
@@ -452,12 +452,12 @@ discard block |
||
| 452 | 452 | ?> |
| 453 | 453 | <tr> |
| 454 | 454 | <?php |
| 455 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 455 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 456 | 456 | ?> |
| 457 | 457 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 458 | 458 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 459 | 459 | <?php |
| 460 | - } else { |
|
| 460 | + } else { |
|
| 461 | 461 | $hostport = explode(':',$source['host']); |
| 462 | 462 | if (isset($hostport[1])) { |
| 463 | 463 | $host = $hostport[0]; |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
| 471 | 471 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
| 472 | 472 | <?php |
| 473 | - } |
|
| 473 | + } |
|
| 474 | 474 | ?> |
| 475 | 475 | <td> |
| 476 | 476 | <select name="format[]" id="format"> |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | <br /> |
| 881 | 881 | <p> |
| 882 | 882 | <?php |
| 883 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 883 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 884 | 884 | ?> |
| 885 | 885 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 886 | 886 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -890,11 +890,11 @@ discard block |
||
| 890 | 890 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
| 891 | 891 | <?php |
| 892 | 892 | } |
| 893 | - } else { |
|
| 893 | + } else { |
|
| 894 | 894 | ?> |
| 895 | 895 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
| 896 | 896 | <?php |
| 897 | - } |
|
| 897 | + } |
|
| 898 | 898 | ?> |
| 899 | 899 | </p> |
| 900 | 900 | <br /> |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | </p> |
| 919 | 919 | <?php |
| 920 | 920 | require('../footer.php'); |
| 921 | - exit; |
|
| 921 | + exit; |
|
| 922 | 922 | } |
| 923 | 923 | // ' |
| 924 | 924 | $settings = array(); |
@@ -1009,8 +1009,8 @@ discard block |
||
| 1009 | 1009 | |
| 1010 | 1010 | $sources = array(); |
| 1011 | 1011 | foreach ($source_name as $keys => $name) { |
| 1012 | - 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]); |
|
| 1013 | - 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]); |
|
| 1012 | + 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]); |
|
| 1013 | + 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]); |
|
| 1014 | 1014 | } |
| 1015 | 1015 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1016 | 1016 | |
@@ -1392,14 +1392,14 @@ discard block |
||
| 1392 | 1392 | |
| 1393 | 1393 | // Set some defaults values... |
| 1394 | 1394 | if (!isset($globalAircraftImageSources)) { |
| 1395 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1396 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1395 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1396 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1397 | 1397 | } |
| 1398 | 1398 | |
| 1399 | 1399 | if (!isset($globalSchedulesSources)) { |
| 1400 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1401 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1402 | - } |
|
| 1400 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1401 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1402 | + } |
|
| 1403 | 1403 | |
| 1404 | 1404 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1405 | 1405 | |
@@ -1446,21 +1446,21 @@ discard block |
||
| 1446 | 1446 | $popi = false; |
| 1447 | 1447 | $popw = false; |
| 1448 | 1448 | foreach ($_SESSION['done'] as $done) { |
| 1449 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1450 | - if ($done == 'Create database') $pop = true; |
|
| 1451 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1452 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1453 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1449 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1450 | + if ($done == 'Create database') $pop = true; |
|
| 1451 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1452 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1453 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1454 | 1454 | } |
| 1455 | 1455 | if ($pop) { |
| 1456 | - sleep(5); |
|
| 1457 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1456 | + sleep(5); |
|
| 1457 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1458 | 1458 | } else if ($popi) { |
| 1459 | - sleep(5); |
|
| 1460 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1459 | + sleep(5); |
|
| 1460 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1461 | 1461 | } else if ($popw) { |
| 1462 | - sleep(5); |
|
| 1463 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1462 | + sleep(5); |
|
| 1463 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1464 | 1464 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1465 | 1465 | print '</div></ul>'; |
| 1466 | 1466 | print '<div id="error"></div>'; |
@@ -1523,7 +1523,7 @@ discard block |
||
| 1523 | 1523 | unset($_COOKIE['install']); |
| 1524 | 1524 | print '<div class="info column"><ul>'; |
| 1525 | 1525 | foreach ($_SESSION['done'] as $done) { |
| 1526 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1526 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1527 | 1527 | } |
| 1528 | 1528 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1529 | 1529 | print '</ul></div>'; |