-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
73 lines (59 loc) · 1.67 KB
/
Copy pathindex.php
File metadata and controls
73 lines (59 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
<?php
include "includes/base.php";
?>
<html>
<head>
<title>CS3380 Project</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
<?php include("includes/header.php");?>
<?//php include("includes/nav.php")?>
<div id='section'>
<div class='container'>
<br>
<?php
if (isset($_SESSION['error']) || isset($_SESSION['success'])) {
if ($_SESSION['error']) {
echo "<div class='btn btn-danger col-md-4 form-control'>". $_SESSION['error']. "</div>";
echo "<br><br>";
$_SESSION['error'] = '';
}
else if($_SESSION['success']) {
print "<div class='btn btn-success form-control'>". $_SESSION['success']. "</div>";
echo "<br><br>";
$_SESSION['success'] = '';
}
}
?>
<?php
if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username']) && $_SESSION['UserType']=='user')
{
?>
<h1>User Area</h1>
<p>Welcome, <b><?php echo $_SESSION['Username'] ?></b>.</p>
<?php
}
elseif(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username']) && $_SESSION['UserType']=='admin')
{
?>
<h1>Admin Area</h1>
<p>Welcome, Admin! You have super privileges.</p>
<?php
}
else {
?>
<h2>CS3380: Logboat Project Homepage</h2>
<p>Please login.</p>
<?php
}
?>
</div>
</div>
<?php include("includes/footer.php");?>
</body>
</html>
<?php
mysqli_close($link);
?>