-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.php
More file actions
77 lines (61 loc) · 2.95 KB
/
settings.php
File metadata and controls
77 lines (61 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* settings.php
*
* This is the settings file of this project. This file must be required in index.php in order to be included everywhere in this software.
* Globals and project settings will be declared here.
*
* @author MigDinny (https://github.com/MigDinny)
*/
/* Settings >> SETUP */
// >>>>>>>>>>>>>>>>>>> CUSTOMIZABLE BELOW!
// Switch on/off ERROR REPORTING (1 = on, 0 = off) (can be overridden by php.ini)
error_reporting(1);
// App Folder >> folder in which this app is
$appFolder = 'LibreAtlas';
// App Name >> which will appear everywhere
$appname = 'LibreAtlas';
// Google Maps API KEY >> get your own at https://developers.google.com/maps/documentation/javascript/adding-a-google-map#key
$maps_api_key = '';
// Database credentials
$username = 'root';
$password = 'root';
$databaseName = 'libreatlas';
$host = 'localhost';
$encoding = 'utf8';
// Dashboard access
$dashboardUsername = 'admin';
$dashboardPassword = 'admin';
// >>>>>>>>>>>>>>>>>>> DO NOT CHANGE BELOW!
session_start();
/* Constants & Globals Declaration */
// Constants for internal use ONLY
$GLOBALS['dashboard_username'] = $dashboardUsername;
$GLOBALS['dashboard_password'] = $dashboardPassword;
$GLOBALS['appname'] = $appname;
$GLOBALS['maps_api_key'] = $maps_api_key;
$GLOBALS['root'] = $_SERVER['DOCUMENT_ROOT'] . '/' . $appFolder; // ex: C:/wamp64/www/LibreAtlas
$GLOBALS['core'] = $GLOBALS['root'] . '/core'; // ex: C:/wamp64/www/LibreAtlas/core
$GLOBALS['classes'] = $GLOBALS['core'] . '/classes'; // ex: C:/wamp64/www/LibreAtlas/core/classes
$GLOBALS['contents'] = $GLOBALS['core'] . '/contents'; // ex: C:/wamp64/www/LibreAtlas/core/contents
$GLOBALS['sources'] = $GLOBALS['core'] . '/sources'; // ex: C:/wamp64/www/LibreAtlas/core/sources
// These client_ constants are used in client-sided assets like scripts/styles. We cannot use the above. All paths are relative to index.php.
// If a / is added (like: /contents) the the paths are relative to root folder instead index.php
$GLOBALS['client_core'] = 'core'; // ex: atlas.librehealth.io/core
$GLOBALS['client_contents'] = $GLOBALS['client_core'] . '/' . 'contents'; // ex: atlas.librehealth.io/core/contents
$GLOBALS['client_sources'] = $GLOBALS['client_core'] . '/' . 'sources'; // ex: atlas.librehealth.io/core/sources
/* Loading all libraries needed for the program to run */
require_once($GLOBALS['classes'] . '/meekrodb.2.3.class.php');
require_once($GLOBALS['classes'] . '/Session.class.php');
require_once($GLOBALS['classes'] . '/RequestHandler.class.php');
require_once($GLOBALS['classes'] . '/Wizard.class.php');
require_once($GLOBALS['classes'] . '/Marker.class.php');
require_once($GLOBALS['classes'] . '/RestApi.class.php');
require_once($GLOBALS['classes'] . '/Dashboard.class.php');
/* Setting up the Database Handler */
DB::$user = $username;
DB::$password = $password;
DB::$dbName = $databaseName;
DB::$host = $host;
DB::$encoding = $encoding;
?>