-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
49 lines (36 loc) · 1.32 KB
/
Copy pathinit.php
File metadata and controls
49 lines (36 loc) · 1.32 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
<?php
define('DB_HOST', 'localhost');
define('DB_USERNAME', 'wemast_user');
define('DB_PASSWORD', 'NKA-s7W');
define('DB_NAME', 'wemast');
define('DB_TYPE', 'pgsql');
// return the full path application directory
define('ROOT', str_replace('\\', '/', dirname(__FILE__)) . '/');
// return the application directory name.
define('ROOT_DIR_NAME', basename(ROOT));
define('SITE_NAME', "SDG Portal");
// Get Site Address Dynamically
$site_addr = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']);
//Must end with /
$site_addr = rtrim($site_addr, "/\\") . "/";
define('SITE_ADDR', $site_addr);
// Application Default Color (Mostly Used By Mobile)
define('META_THEME_COLOR', "#000000");
// Application Files and Directories
define('IMG_DIR', "assets/img/");
define('SITE_FAVICON', IMG_DIR . "sdgs.png");
define('SITE_LOGO', IMG_DIR . "SDG_logo.png");
define('CSS_DIR', SITE_ADDR . "assets/css/");
define('JS_DIR', SITE_ADDR . "assets/js/");
define('HELPERS_DIR', 'helpers/');
/**
* Initialize The Helper Class From helper Dir
* @return null
*/
function autoloadHelper($className) {
$filename = HELPERS_DIR . $className . ".php";
if (is_readable($filename)) {
require $filename;
}
}
spl_autoload_register("autoloadHelper");