-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-light.php
More file actions
61 lines (42 loc) · 1.3 KB
/
bootstrap-light.php
File metadata and controls
61 lines (42 loc) · 1.3 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
<? /* Bolt it on
------------------------------
** ClientCare bootstrap file
------------------------------
** Here we go */
// Initiate session
session_start();
// Define PATH as this file's directory
define( 'PATH', dirname(__FILE__) . '/' );
// Define stucture APP path
define( 'APP', 'app' );
// Define stucture LIBRARY path
define( 'SYSTEM', 'system' );
// Define stucture LIBRARY path
define( 'LIBRARY', SYSTEM.'/library' );
// Define stucture ADMIN path
define( 'ADMIN', APP.'/admin' );
// Define the config file
if (file_exists(dirname(PATH).'/config/config.php')) {
/** The config file resides one level above the main directory */
require_once(dirname(PATH).'/config/config.php');
};
// URL - Edit root URL
$app_url = $db->get_var("SELECT site_url FROM app_sites");
// Define parent URL
define( 'URL', $app_url);
// Load in the classes
require_once(SYSTEM . '/system_classes.php' );
// Setup the page class
$page = new Page($db);
// Check to see if there is a page asssociated to the URL
if(isset($_GET['pagename'])){
$pagemap = $page->page_map($_GET['pagename']);
} else {
}
// Setup the user class
$user = new User($db);
$user->login_submit();
// Load in the functions
require_once(SYSTEM . '/system_functions.php' );
// Load in the helpers
require_once(SYSTEM . '/system_helpers.php' );