forked from Leantime/leantime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
45 lines (34 loc) · 1.2 KB
/
index.php
File metadata and controls
45 lines (34 loc) · 1.2 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
<?php
define('RESTRICTED', TRUE);
define('ROOT', dirname(__FILE__));
include_once '../config/settings.php';
include_once '../src/core/class.autoload.php';
include_once '../config/configuration.php';
$config = new leantime\core\config();
if(isset($config->appUrl) && $config->appUrl != ""){
define('BASE_URL', $config->appUrl);
define('CURRENT_URL', $config->appUrl.$settings->getRequestURI());
} else{
define('BASE_URL', $settings->getBaseURL());
define('CURRENT_URL', $settings->getFullURL());
}
$login = leantime\core\login::getInstance(leantime\core\session::getSID());
ob_start();
$loginContent = '';
if($login->logged_in()!==true){
$loginContent = ob_get_clean();
ob_start();
}
//Bootstrap application
$application = new leantime\core\application(
new leantime\core\config(),
$settings,
$login,
leantime\core\frontcontroller::getInstance(ROOT),
new leantime\core\language(),
new leantime\domain\services\projects(),
new leantime\domain\repositories\setting());
$application->start();
if(ob_get_length() > 0) {
ob_end_flush();
}