-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
35 lines (33 loc) · 1.22 KB
/
header.php
File metadata and controls
35 lines (33 loc) · 1.22 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
<script src="header.js" defer></script>
<base href="/form/">
<link rel="stylesheet" href="header.css">
<header>
<nav>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="topic.php">Topics</a></li>
<?php
if (isset($_SESSION["username"])) {
echo "<li><a href='create_post.php'>Post</a></li>";
echo "<li><a href='profile.php'>{$_SESSION["username"]}</a></li>";
echo "<li><a href='logout.php'>Logout</a></li>";
} else {
echo "<li><a href='#' id='loginBtn'>Login</a></li>";
echo "<li><a href='#' id='registerBtn'>Register</a></li>";
}
?>
</ul>
</nav>
</header>
<div id="loginModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<iframe src="login.php"></iframe>
</div>
</div>
<div id="registerModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<iframe src="register.php"></iframe>
</div>
</div>