-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.php
30 lines (25 loc) · 1.02 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
<?php
include('config.php');
function global_exception_handler($exception) {
error_log("Exception unhandled:" . $exception->getMessage());
die();
}
set_exception_handler('global_exception_handler');
function autoload($name){
$name = str_replace('\\', '/', $name);
$class_path = dirname(__FILE__).'/include/classes/';
static $class_extension = '.php';
if(file_exists($class_path . $name . $class_extension))
require_once($class_path . $name . $class_extension);
}
spl_autoload_register('autoload');
AutoConfig::addFile('autodiscover.xml', 'ConfigOutlook');
AutoConfig::addFile('/autodiscover.xml', 'ConfigOutlook');
AutoConfig::addFile('autodiscover/autodiscover.xml', 'ConfigOutlook');
AutoConfig::addFile('/autodiscover/autodiscover.xml', 'ConfigOutlook');
AutoConfig::addFile('mail/config-v1.1.xml', 'ConfigMozilla');
AutoConfig::addFile('/mail/config-v1.1.xml', 'ConfigMozilla');
AutoConfig::setDefault('autodiscover.xml');
$config = AutoConfig::get(strtolower($_GET['file']));
$config->response();
?>