Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Learn_Hacking_Web/html/index.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
82 lines (71 sloc)
3.57 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Start the session | |
session_start(); | |
if(isset($_COOKIE["PHPSESSID"])){ | |
header('Set-Cookie: PHPSESSID='.$_COOKIE["PHPSESSID"].'; SameSite=Lax'); | |
} | |
?> | |
<!-- Code at https://github.coventry.ac.uk/CUEH/Learn_Hacking_Web --> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | |
<link href="/bootstrap.min.css" rel="stylesheet"> | |
<title>Learn Hacking (Again)</title> | |
</head> | |
<body> | |
<div class="container"> | |
<header class="p-3 mb-3 border-bottom" style="background-color: #e3f2fd;"> | |
<div class="container"> | |
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> | |
<a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"> | |
<img class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap" src="/images/HoodieHacker.svg"></img> | |
</a> | |
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0"> | |
<li><a href="/" class="nav-link px-2 link-secondary">Overview</a></li> | |
<li><a href="/topics.php" class="nav-link px-2 link-dark">Topics</a></li> | |
<li><a href="/enquire.php" class="nav-link px-2 link-dark">Enquiries</a></li> | |
<?php | |
if (isset($_SESSION["userid"])){ | |
//Good god, I hate the jankyness of PHP sometimes | |
echo '<li><a href="/profile.php" class="nav-link px-2 link-dark">Profile</a></li>'; | |
echo '<li><a href="/logout.php" class="nav-link px-2 link-dark">Logout</a></li>'; | |
} | |
else{ | |
echo '<li><a href="/login.php" class="nav-link px-2 link-dark">Login</a></li>'; | |
} | |
?> | |
</ul> | |
<form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3"> | |
<input type="search" class="form-control" placeholder="Search..." aria-label="Search"> | |
</form> | |
</div> | |
</div> | |
</header> | |
<h1>Learn Hacking (Yet Again)</h1> | |
<p>Welcome to our new site around learning cyber secuity topics.</p> | |
<p>Given the issues with the <strong>Learning Engagement Platform</strong>, and the <wiki> we | |
are have decided to enforce a login system... | |
</p> | |
<h3>Want to learn more</h3> | |
<p>See the: | |
<ul> | |
<li><a href="/topics.php">Topics we offer</a></li> | |
<li><a href="/enquire.php">Enquire about the Course</a></li> | |
</ul> | |
</p> | |
</div> | |
<!-- Optional JavaScript; choose one of the two! --> | |
<!-- Option 1: Bootstrap Bundle with Popper --> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> | |
<!-- Option 2: Separate Popper and Bootstrap JS --> | |
<!-- | |
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script> | |
--> | |
</body> | |
</html> |