-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
94 lines (84 loc) · 2.08 KB
/
index.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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* @package QUINN
* @abstract FRANK - loader file
* @author monk-ee https://github.com/monk-ee
* @version alpha
* @copyright 2011 Exploding Box Productions
*/
/**
* Setup File Paths
*/
define('INCLUDES', dirname(__FILE__));
define('INCLUDES_CLASSES', INCLUDES . '/lib');
/**
* PHP 5.3+ Date Default
* In case it has not been set in the php.ini (or set to the wrong thing)
*/
date_default_timezone_set('Australia/Brisbane');
/**
* Make very sure that clients never see error messages but warnings are logged
*/
ini_set('display_errors', false);
ini_set('log_errors', true);
/**
* start object caching for FirePHP
*/
ob_start();
/**
* Begin session
*/
session_start();
/**
* Server Configuration data
*/
include("config.php");
/**
* AUTOLOADER for lib class files
*/
spl_autoload_register('__autoload_classes');
function __autoload_classes($class) {
if(file_exists($f = INCLUDES_CLASSES . '/' . $class . '.inc'))
require $f;
}
/**
* DEBUG
*/
if (DEBUG) {
error_reporting(E_ALL);
$firephp = FirePHP::getInstance(true);
$firephp->setEnabled(true);
$firephp->registerErrorHandler();
$firephp->registerExceptionHandler();
} else {
error_reporting(0);
FB::setEnabled(false);
}
/**
* Database Global
*/
$GLOBALS['dbcon'] = new mysqliConnect();
$GLOBALS['dbcon']->__construct("set names 'utf8';");
$GLOBALS['dbcon']->__construct("set time_zone = 'Australia/Brisbane';");
/**
* Session Global
*/
$GLOBALS['session'] = new sessionManage();
/**
* PreFunction Hooks
*/
//FrankHook::add('before_handler', function() {
//no one home
// });
/**
* ROUTES - define the routes here
*/
$site = new FrankApplication(array(
array('/', 'MainHandler'),
array('/ajax', 'AjaxHandler'),
));
/**
* SERVE Pages
*/
$site->serve();
?>