summaryrefslogtreecommitdiff
path: root/header.php
diff options
context:
space:
mode:
Diffstat (limited to 'header.php')
-rw-r--r--header.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/header.php b/header.php
new file mode 100644
index 0000000..935f063
--- /dev/null
+++ b/header.php
@@ -0,0 +1,28 @@
+<?php
+session_start();
+?>
+
+<!DOCTYPE html>
+<html>
+<head>
+ <title>cflip.net forum Beta</title>
+ <link rel="stylesheet" href="styles/style.css">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+</head>
+<body>
+<div id="wrapper">
+ <h1 id="title">cflip.net forum</h1>
+ <nav>
+ <a href="index.php">Home</a>
+ <a href="create_topic.php">Create a topic</a>
+
+ <div id="user">
+ <?php
+ if (isset($_SESSION['signed_in'])) {
+ echo 'Signed in as <b>' . $_SESSION['user_name'] . '</b>. <a href="includes/signout_inc.php">Log out</a>';
+ } else {
+ echo '<a href="signin.php">Sign in</a> or <a href="register.php">Register an account</a>';
+ }
+ ?>
+ </div>
+ </nav> \ No newline at end of file