@@ -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"> |
@@ -879,7 +879,7 @@ discard block |
||
| 879 | 879 | <br /> |
| 880 | 880 | <p> |
| 881 | 881 | <?php |
| 882 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 882 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 883 | 883 | ?> |
| 884 | 884 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 885 | 885 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -889,11 +889,11 @@ discard block |
||
| 889 | 889 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
| 890 | 890 | <?php |
| 891 | 891 | } |
| 892 | - } else { |
|
| 892 | + } else { |
|
| 893 | 893 | ?> |
| 894 | 894 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
| 895 | 895 | <?php |
| 896 | - } |
|
| 896 | + } |
|
| 897 | 897 | ?> |
| 898 | 898 | </p> |
| 899 | 899 | <br /> |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | </p> |
| 918 | 918 | <?php |
| 919 | 919 | require('../footer.php'); |
| 920 | - exit; |
|
| 920 | + exit; |
|
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | $settings = array(); |
@@ -1008,8 +1008,8 @@ discard block |
||
| 1008 | 1008 | |
| 1009 | 1009 | $sources = array(); |
| 1010 | 1010 | foreach ($source_name as $keys => $name) { |
| 1011 | - 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]); |
|
| 1012 | - 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]); |
|
| 1011 | + 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]); |
|
| 1012 | + 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]); |
|
| 1013 | 1013 | } |
| 1014 | 1014 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1015 | 1015 | |
@@ -1391,14 +1391,14 @@ discard block |
||
| 1391 | 1391 | |
| 1392 | 1392 | // Set some defaults values... |
| 1393 | 1393 | if (!isset($globalAircraftImageSources)) { |
| 1394 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1395 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1394 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1395 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1396 | 1396 | } |
| 1397 | 1397 | |
| 1398 | 1398 | if (!isset($globalSchedulesSources)) { |
| 1399 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1400 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1401 | - } |
|
| 1399 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1400 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1401 | + } |
|
| 1402 | 1402 | |
| 1403 | 1403 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1404 | 1404 | |
@@ -1450,21 +1450,21 @@ discard block |
||
| 1450 | 1450 | $popi = false; |
| 1451 | 1451 | $popw = false; |
| 1452 | 1452 | foreach ($_SESSION['done'] as $done) { |
| 1453 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1454 | - if ($done == 'Create database') $pop = true; |
|
| 1455 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1456 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1457 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1453 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1454 | + if ($done == 'Create database') $pop = true; |
|
| 1455 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1456 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1457 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1458 | 1458 | } |
| 1459 | 1459 | if ($pop) { |
| 1460 | - sleep(5); |
|
| 1461 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1460 | + sleep(5); |
|
| 1461 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1462 | 1462 | } else if ($popi) { |
| 1463 | - sleep(5); |
|
| 1464 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1463 | + sleep(5); |
|
| 1464 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1465 | 1465 | } else if ($popw) { |
| 1466 | - sleep(5); |
|
| 1467 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1466 | + sleep(5); |
|
| 1467 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1468 | 1468 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1469 | 1469 | print '</div></ul>'; |
| 1470 | 1470 | print '<div id="error"></div>'; |
@@ -1527,7 +1527,7 @@ discard block |
||
| 1527 | 1527 | unset($_COOKIE['install']); |
| 1528 | 1528 | print '<div class="info column"><ul>'; |
| 1529 | 1529 | foreach ($_SESSION['done'] as $done) { |
| 1530 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1530 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1531 | 1531 | } |
| 1532 | 1532 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1533 | 1533 | print '</ul></div>'; |