-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
108 lines (97 loc) · 2.55 KB
/
index.php
File metadata and controls
108 lines (97 loc) · 2.55 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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
session_start();
header('Content-Type: text/html; charset=en_GB');
define("_EXCEPTIONAL",1);
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Exceptional Emails</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="Socialite/socialite.min.js"></script>
<link rel="stylesheet" href="Socialite/demo/demo.css">
<!-- Bootstrap -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="jquery.sparkline.min.js"></script>
<html itemscope itemtype="http://schema.org/Article">
<meta itemprop="name" content="Exceptional Emails">
<meta itemprop="description" content="Alerts you about the emails you didn't get">
<meta itemprop="image" content="http://libertus.co.uk/images/medium-logo.png">
</head>
<body>
<div class="container">
<?php
include "utils.php";
include "header.php";
global $mdb;
$m = new MongoClient(); // connect to the back end database
$mdb = $m->selectDB("exceptionalemails");
//TODO add a bit of error handling if the database is MIA
//is there a session open?
//if there isn't we display welcome and registration page
//we get the user id associated with the session
global $userid;
global $userRef;
include "login.php";
include "logout.php";
include "menu.php";//the menu is different for logged in users
//what command has been passed on the query string?
$action = '';
if(isset($_REQUEST['action']))
{
$action = $_REQUEST['action'];
}
switch($action){
case "dashboard":
include "dashboard.php";
break;
case "expected":
include "expectedemails.php";
break;
case "received":
include "receivedemails.php";
break;
case "register":
include "register.php";
break;
case "registersave":
include "registersave.php";
break;
case "alertsave":
include "alertsave.php";
break;
case "confirm":
include "registerconfirm.php";
break;
case "events":
include "events.php";
break;
case "object":
include "renderobjectread.php";
break;
case "tandc":
include "tandc.php";
break;
case "login":
if($userRef){
}else{
include "welcome.php";
}
break;
case "logout":
include "logout.php";
break;
case "faq":
include "faq.php";
break;
default:
include "welcome.php";
}
?>
</div> <!-- /container -->
<?php include "footer.php"; ?>
</body>
</html>