This repository has been archived by the owner on Sep 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
70 lines (53 loc) · 1.97 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
<?php
/* openGuildHall
* Copyright (C) 2011 Ryan Capote <trooper777@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program;
* if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Bootstrap file. All requests get routed through this page. This page does a lot of heavy lifting setting
* up the router, database configuration, and the front controller.
*/
/**
* \mainpage
*
* \section Introduction Introduction
* This is the developer documentation for openGuildHall. If you would like information on
* installing, customizing, or using openGuildHall please refer to the main website.
*
*
*/
define('VERSION', '0.2a');
define('VERSION_STRING', 'openGuildHall v0.2a');
define('SITE_PATH', '/');
define('ROOT_PATH', dirname(__FILE__));
define ('DEBUG', true);
define('ALLOW', 'ALLOW');
define('DENY', 'DENY');
session_start();
if(file_exists('Config/Config.php')) {
require 'Config/Config.php';
}
require 'System/Autoloader.php';
Autoloader::registerAutoloader();
Autoloader::addPath('System/');
Autoloader::addPath('Application/Plugins/');
if(isset($dbConfig)) {
MySQL::getInstance()->setDbConfig($dbConfig);
MySQL::getInstance()->openConnection();
}
$front = FrontController::getInstance();
require 'Config/Autoload.php';
$front->addPlugin('UpdateLastSeen');
$front->dispatchRequest();
// Closes the open connection if one exists
MySQL::getInstance()->closeConnection();