-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
78 lines (61 loc) · 1.67 KB
/
index.php
File metadata and controls
78 lines (61 loc) · 1.67 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
<!DOCTYPE html>
<?php
include("session.php");
// Check if the user has already logged in
if (isset($userEmail, $password) ) {
require("databaseAccess.php");
header("location:userPage.php");
}
//If user isn't logged in, don't show the calendar
if (!isset($userEmail, $password)) {
//Get the navigation bar variable to choose what page to show
if (isset ($_GET['s'])) {
$s = $_GET['s'];
} elseif (isset($_POST['s'])) {
$s = $_POST['s'];
} else {
$s = NULL;
}
//Determines which webpage to display
switch ($s) {
case 'createUser':
$page = 'createUser.php';
$pageTitle = "Create User";
break;
case 'userEntry':
$page = 'userEntryTest.html';
$pageTitle = "Just a user entry test";
break;
case 'login':
$page = 'login.html';
$pageTitle = "Login";
break;
case 'CalendarT':
$page = 'calendar.php';
$pageTitle = "Test the Calendar";
break;
case 'logout':
$page = '/php/logout.php';
$pageTitle = 'Logout';
break;
case 'forgotPassword':
$page = 'FGPassword.php';
$pageTitle = 'Forgot Password!';
break;
default:
$page = "home.html";
$pageTitle = "Welcome";
break;
}
include("project/php/includes.inc");
if ($s == 'CalendarT') {
echo "<script src=\"project/js/jquery.calendario.js\"></script>";
}
include("project/php/navbar.inc");
include("project/" . $page);
}
?>
<?php
//}
//include("project/php/footer.inc");
?>