<?php ob_start(); require_once 'authenticator.php'; require_once 'database-queries.php'; $authenticator = new AuthenticatorHelper(); $database = new DatabaseHelper(); $databaseQueries = new DatabaseQueries(); // Abstracting the custom stylesheets. $url = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '/') + 1); $stylesheet = substr($url, 0, -4); ?> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="A Socially Moderated Pun Competition"> <meta name="author" content="Glenn Forrest"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" /> <title>Pungent</title> <!-- Favicon --> <link rel="apple-touch-icon" sizes="57x57" href="images/favicon/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="images/favicon/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="images/favicon/apple-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="images/favicon/apple-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="images/favicon/apple-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="images/favicon/apple-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="images/favicon/apple-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="images/favicon/apple-icon-152x152.png">
<?php //Require security helper functions require_once 'authenticator.php'; require_once 'database-queries.php'; //Secured content, redirect unauthenticated users $authenticator = new AuthenticatorHelper(); $databaseQueries = new DatabaseQueries(); if (!$authenticator->isAdmin()) { header('Location: /index.php?not-admin=yes'); } switch ($_GET['action']) { case 'home': header('Location: index.php'); break; case 'topic': header('Location: topic.php?topic=' . $databaseQueries->getChallenge('topic_challenge')['topic_id']); break; case 'image-page': header('Location: image.php?image=' . $databaseQueries->getChallenge('image_challenge')['image_id']); break; case 'about': header('Location: about.php'); break; case 'profile': header('Location: profile.php?username='******'username']); break; case 'sitemap': header('Location: sitemap.php'); break; case 'login':
<?php // Require security helpers require_once 'authenticator.php'; $authenticator = new AuthenticatorHelper(); // Secured content, redirect unauthenticated users $authenticator->redirectUnauthenticatedUser(); //$db = new DatabaseHelper(); include 'header.php'; ?> <!-- Page Content --> <div class="container page-content text-center"> <h2>Sitemap</h2> <div> <ul> <li><a href="landing-page.html">Landing page</a></li> <li><a href="index.html">Home Page</a></li> <li><a href="challenges.html">Challenges</a></li> <li><a href="topic.html">Topic</a></li> <li><a href="topic-archive.html">Topic-Archive</a></li> <li><a href="image.html">Image</a></li> <li><a href="image-archive.html">Image-Archive</a></li> <li><a href="about.html">About</a></li> <li><a href="profile.html">Profile</a></li> <li><a href="administration.html">Administration</a></li> </ul> <?php include 'footer.php';