diff options
Diffstat (limited to 'includes/templates')
-rw-r--r-- | includes/templates/404.php | 12 | ||||
-rw-r--r-- | includes/templates/header.php | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/includes/templates/404.php b/includes/templates/404.php new file mode 100644 index 0000000..d4d5128 --- /dev/null +++ b/includes/templates/404.php @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <title>cflip.net forum</title> + <link rel="stylesheet" href="styles/style.css"> +</head> +<body> + <?php include_once 'header.php'; ?> + <h1>Page Not Found</h1> + <p>The page you requested does not exist.</p> +</body> +</html> diff --git a/includes/templates/header.php b/includes/templates/header.php new file mode 100644 index 0000000..1db9cda --- /dev/null +++ b/includes/templates/header.php @@ -0,0 +1,18 @@ +<h1>cflip.net forum<sup style="font-size: small;">beta</sup></h1> +[<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> |