-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
74 lines (59 loc) · 1.31 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
69
70
71
72
73
74
<?php
session_start();
//$_SESSION['id'] = 1;
/* Define ABSPATH */
define('ABSPATH', TRUE);
/* Define SITE HOME url */
if (($_SERVER['HTTP_HOST']) == 'cse328.local') {
define('SITE_URL', 'http://cse328.local');
}else{
define('SITE_URL', '#');
}
require_once("db/connection.php");
require_once('inc/function.php');
if ( isset($_SESSION['id']) == 1 AND isset( $_GET['page'] ) ) {
switch ( $_GET['page'] ) {
case 'dashboard' :
require_once('inc/home.php');
break;
case 'task' :
require_once('inc/tasks.php');
break;
case 'assigned' :
require_once('inc/assigned_to_me.php');
break;
case 'chat' :
require_once('chat/users.php');
break;
case 'profile' :
require_once('inc/profile.php');
break;
default:
require_once('inc/home.php');
break;
}
} else {
get_header('login');
if ( isset($_GET['action']) ) {
switch ( $_GET['action'] ) {
case 'register' :
require_once("inc/register.php");
break;
case 'forgot-password' :
require_once("inc/forgot-password.php");
break;
case 'forgot-password-next' :
require_once("inc/forgot-password-next.php");
break;
case 'new-password' :
require_once("inc/new-password.php");
break;
default:
require_once("inc/login.php");
break;
}
}else {
require_once("inc/login.php");
}
get_footer('login');
}