summaryrefslogtreecommitdiff
path: root/includes/templates/header.php
blob: 5070cfef1827f9c0601070b1e7286c801ab81c91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<header>
<h1>cflip.net forum<sup style="font-size: small;">beta</sup></h1>
<p>
[<a href="/">Home</a>]
[<a href="/search.php?type=thread&sort=lr">All Threads</a>]
[<a href="/search.php?type=post&sort=cd">All Posts</a>]
[<a href="/create_thread.php">Create a thread</a>]
<span style="float:right;">
	<?php
	include_once './includes/Session.php';
	include_once './includes/model/User.php';

	if (Session::get()->is_signed_in()) {
		$user = Session::get()->get_current_user();
		echo '[<a href="viewuser.php?id=' . $user->id . '">' . $user->name . '\'s Profile</a>] [<a href="signout.php">Log out</a>]';
	} else {
		echo '[<a href="signin.php">Sign in</a>] or [<a href="register.php">Register an account</a>]';
	}
	?>
</span>
</p>
</header>