-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.php
More file actions
64 lines (51 loc) · 2.66 KB
/
Copy pathheader.php
File metadata and controls
64 lines (51 loc) · 2.66 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta -->
<meta charset="utf-8"/>
<meta content="initial-scale=1, width=device-width" name="viewport"/>
<!-- documentation at http://getbootstrap.com/, alternative themes at https://www.bootstrapcdn.com/bootswatch/ -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="styles.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title><?= htmlspecialchars($title) ?></title>
</head>
<body>
<div class="container">
<!-- start of nav bar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button aria-expanded="false" class="navbar-toggle collapsed" data-target="#navbar" data-toggle="collapse" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php"><span class="blue">home</span></a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<?php if(!empty($_SESSION['id'])): ?>
<ul class="nav navbar-nav navbar-right">
<li><a href="logout.php">Log Out</a></li>
</ul>
<?php else: ?>
<ul class="nav navbar-nav navbar-right">
<li><a href="register.php">Register</a></li>
<li><a href="login.php">Log In</a></li>
</ul>
<?php endif ?>
</div>
</div>
</nav>
<!-- End of nav bar -->
<main>
<!-- Display message -->
<?php
if(isset($_SESSION['message']))
{
printf("<div class='message %s'>%s</div>", $_SESSION['message']['type'], $_SESSION['message']['message']);
unset($_SESSION['message']);
}
?>