-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.php
32 lines (27 loc) · 1.24 KB
/
common.php
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
<?php
### Include every class and function set we use
require_once(LOC_CLASSES."ToolChest.class.php"); //Include ToolChest Utilities
require_once(LOC_CLASSES."Blunder.class.php"); //Include Blunder Error Handler
require_once(LOC_CLASSES."OOPSQL.class.php"); //Include OOPSQL MySQLi Database Handler
require_once(LOC_CLASSES."BluePrint.class.php"); //Include BluePrint Template Engine
require_once(LOC_CLASSES."TimeMachine.class.php"); //Include TimeMachine TimeZone/Time COnversion Manager
### Instantiate the major classes here
$utils=new ToolChest(); //Instantiate Blunder Error Handler
$elog=new Blunder(NULL,LOC_LOGPATH); //Instantiate Blunder Error Handler
if(DB_ENABLE==true)
{
$dbo=OOPSQL::getInstance(); //Create MySQL DB Instance
$dbo->connect($CFG[LOC]["DB_HOSTNAME"], $CFG[LOC]["DB_USERNAME"], $CFG[LOC]["DB_PASSWORD"], $CFG[LOC]["DB_DATABASE"]); //Connect to DB and get Connection Object
}
$template=new BluePrint(THEME_PATH); //BluePrint Theme Switcher
/* Make Konstruct paths available to BluePrint */
$KonstructBPPaths=array(
"BASE_URL"=>$CFG[LOC]["BASE_URL"],
"URL_CSS"=>URL_CSS,
"URL_IMAGES"=>URL_IMAGES,
"URL_JS"=>URL_JS,
"CURRENT_DATETIME"=>date("Y-m-s H:i:s"),
"PHP_VERSION"=>phpversion()
);
$template->multiSet($KonstructBPPaths);
?>