-
Notifications
You must be signed in to change notification settings - Fork 0
/
manageaccounts.php
executable file
·47 lines (44 loc) · 1.63 KB
/
manageaccounts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!-- V0LT - Marathon -->
<?php
session_start(); // Start a PHP session.
if ($_SESSION['authid'] == "marathon" and $_SESSION['loggedin'] == 1) { // Check to see if the user is logged in.
$username = $_SESSION['username']; // Set the '$username' variable to the currently signed in user's username.
} else {
header("Location: login.php"); // Redirect the user to the login page.
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marathon - Manage Accounts</title>
<link rel="stylesheet" href="./assets/css/main.css">
</head>
<body>
<div class="centered">
<?php include('./import_databases.php'); ?>
</div>
<main>
<a class="button" role="button" href="index.php">Back</a>
<div class="centered header">
<h1>Marathon</h1>
<h2>Manage Accounts</h2>
<a class="button" role="button" href="signup.php">Create Account</a>
</div>
<hr class="separator-thin">
<div class="centered">
<?php
foreach ($authentication_database as $key => $element) {
echo "<div class='horizontal-tile'>";
echo "<h3><b>Username</b>: " . $key . "</h3>";
echo "<a class='button' role='button' href='deleteaccount.php?user=" . $key . "'>Delete</a>";
echo "</div>";
echo "<br><br>";
}
?>
</div>
</main>
</body>
</html>