-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathindex.php
executable file
·43 lines (36 loc) · 1.14 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
<?php
/*
* @author Kiril Kirkov
* https://github.com/issue-tracking-system/Project-Management-Software
*/
session_start();
define('APPLICATION_LOADED', true);
define('HAS_SUBDOMAIN_SUPPORT', false);
if(!HAS_SUBDOMAIN_SUPPORT) {
define('ACCOUNT_DOMAIN', 'global');
define('COMPANY_NAME', 'Issue Tracking System');
}
require_once 'inc/db.php';
require_once 'classes/class.main.php';
if(HAS_SUBDOMAIN_SUPPORT) {
require_once 'classes/class.subdomain.php';
} else {
define('ACCOUNT_ID', '1');
}
if (DEBUG_MODE === false) {
error_reporting(E_ALL ^ E_NOTICE | E_WARNING);
}
try {
if (!isset($_GET['page'])) {
$_GET['page'] = 'login';
}
$main = new Main();
$main->run($_GET['page'], !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
} catch (Exception $e) {
if (DEBUG_MODE === true) {
echo 'New Exception: ' . $e->getMessage();
} else {
writeLog('Time: ' . date("Y.m.d H.m.s", time()) . "\nDomain:" . $_SERVER['HTTP_HOST'] . "\nNew Exception:" . $e->getMessage() . "\n\n");
include '_html_parts/exeption_page.php';
}
}