-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathindex.php
More file actions
38 lines (31 loc) · 1.1 KB
/
Copy pathindex.php
File metadata and controls
38 lines (31 loc) · 1.1 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
<?php
#Application name: PhpCollab
#Status page: 0
#Path by root: index.php
/**
* Do Setup Check
*/
try {
if (!file_exists("includes/settings.php")) {
header('Location: installation/setup.php');
} else {
$checkSession = "false";
$indexRedirect = "true";
require_once 'includes/library.php';
//case session fails or auth is false
if ( $session == "false" || !$session->get('auth') || $session->get('auth') === false ) {
phpCollab\Util::headerFunction("general/login.php");
}
if ( $session->get('auth') === true ) {
phpCollab\Util::headerFunction("general/home.php");
}
// Default case just in case the above falls through
phpCollab\Util::headerFunction("general/login.php");
}
} catch (Exception $exception) {
require_once dirname(__FILE__) . "/views/fatal_error.php";
$date = new DateTime();
$now = $date->format("[Y-m-d\TH:i:s.uP]");
error_log($now . " FATAL ERROR: " . $exception . "\n");
error_log($now . " FATAL ERROR: " . $exception . "\n", 3, "./logs/phpcollab.log");
}