Flight search not displayed using XML.

pull/173/head
Joe Prochazka 2016-04-23 05:11:02 -04:00
rodzic 7339e13a1b
commit 4634f14dad
3 zmienionych plików z 18 dodań i 12 usunięć

Wyświetl plik

@ -69,6 +69,10 @@
require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."settings.class.php");
$settings = new settings();
if ($name == "dataStorage") {
return $settings::db_driver;
}
if ($settings::db_driver == 'xml') {
// XML
$theseSettings = simplexml_load_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."data".DIRECTORY_SEPARATOR."settings.xml");

Wyświetl plik

@ -31,18 +31,18 @@
class settings {
// Database Settings
const db_driver = 'mysql';
const db_database = 'adsb';
const db_username = 'adsbuser';
const db_password = 'password';
const db_host = 'localhost';
const db_driver = 'xml';
const db_database = '';
const db_username = '';
const db_password = '';
const db_host = '';
const db_prefix = 'adsb_';
// Security Settings
const sec_length = 6;
// PDO Settings
const pdo_debug = TRUE;
const pdo_debug = FALSE;
}
?>

Wyświetl plik

@ -54,13 +54,15 @@
{if setting:enableDump1090 eq TRUE}<li id="dump1090-link"><a href="/dump1090.php">Live Dump1090 Map</a></li>{/if}
{if setting:enableDump978 eq TRUE}<li id="dump978-link"><a href="/dump978.php">Live Dump978 Map</a></li>{/if}
{if setting:enablePfclient eq TRUE}<li id="planefinder-link"><a href="{page:baseurl}:30053" target="_blank">Plane Finder Client</a></li>{/if}
</ul>
<form name="search" method="post" action="flights.php" class="navbar-form navbar-right">
<div class="form-group">
<input type="text" name="flight" placeholder="Flight" class="form-control">
</div>
<button type="submit" class="btn btn-success">Search</button>
</ul>
{if setting:dataStorage neq "xml"}
<form name="search" method="post" action="flights.php" class="navbar-form navbar-right">
<div class="form-group">
<input type="text" name="flight" placeholder="Flight" class="form-control">
</div>
<button type="submit" class="btn btn-success">Search</button>
</form>
{/if}
</div>
</div>
</nav>