mirror of
https://github.com/Ekokumppanit/Lentolaskuri.git
synced 2026-01-26 03:03:58 +00:00
- Made the application more configurable by the user - Made installation easier - API location is now dynamic based on window.location - Cleaned up some older code that was pointing to dev stuff - Now includes the SQL-table required to run the application - Application now exposes config to console for easier debugging - Search now supports user specified table name - Updated the OpenFlights airport data file source
32 lines
838 B
PHP
32 lines
838 B
PHP
<?php
|
|
/**
|
|
* Database configuration
|
|
*
|
|
* Configure these and open the project in your browser,
|
|
* install script takes care of the rest.
|
|
*
|
|
* @category Lentolaskuri
|
|
* @package Lentolaskuri
|
|
* @author Ismo Vuorinen <ismo@ivuorinen.net>
|
|
* @license http://www.gnu.org/licenses/agpl.html GNU Affero General Public License
|
|
* @link https://github.com/Ekokumppanit/Lentolaskuri
|
|
*/
|
|
$config = array(
|
|
'server' => 'localhost',
|
|
'db' => 'database',
|
|
'user' => 'username',
|
|
'password' => 'password',
|
|
'table' => 'airports',
|
|
'create_table' => true
|
|
);
|
|
|
|
// ----
|
|
|
|
$mysqli = new mysqli($config['server'], $config['user'], $config['password'], $config['db']);
|
|
|
|
/* check connection */
|
|
if (mysqli_connect_errno()) {
|
|
printf("Connect failed: %s\n", mysqli_connect_error());
|
|
exit();
|
|
}
|