php-gallery/account/account.php

70 lines
2.7 KiB
PHP
Raw Normal View History

2022-07-25 17:28:55 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2022-08-03 16:46:50 +00:00
<title>Lynx Gallery</title>
2022-08-09 20:09:20 +00:00
<!-- Stylesheets -->
<link rel="stylesheet" href="../css/master.css">
2022-08-09 20:09:20 +00:00
<link rel="stylesheet" href="../css/normalise.css">
<!-- Google Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@600">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
2022-08-03 16:46:50 +00:00
<!-- JQuery -->
2022-08-09 20:09:20 +00:00
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
<script src="../Sniffle/sniffle.js"></script>
<link rel='stylesheet' href='../Sniffle/sniffle.css'>
<!-- Flyout script! -->
<script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'>
2022-07-25 17:28:55 +00:00
</head>
<body>
<?php
include "../ui/required.php";
2022-08-03 16:46:50 +00:00
include "../ui/nav.php";
?>
2022-07-25 17:28:55 +00:00
2022-07-27 11:46:10 +00:00
<div class="account-root default-window">
2022-07-25 17:28:55 +00:00
<h2>Account settings</h2>
<?php
if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
2022-07-26 13:27:27 +00:00
echo "<p>O hi ".$_SESSION["username"].".</p>";
// Join code
if ($_SESSION["id"] == 1) {
2022-07-28 21:18:14 +00:00
echo "<h3 class='space-top'>Invite Codes</h3>";
$token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0");
while ($token = mysqli_fetch_array($token_request)) {
2022-07-28 21:18:14 +00:00
echo "<p class='text-box space-top center alert-default'>".$token['code']."</p>";
}
}
2022-07-28 21:18:14 +00:00
echo "<h3 class='space-top'>Danger ahead</h3>";
// Reset password
echo "<p class='text-box space-top-large center alert-default'>Resetting your password regularly is a good way of keeping your account safe</p>";
echo "<a class='btn alert-low space-top-small' href='https://superdupersecteteuploadtest.fluffybean.gay/account/password-reset.php'><img class='svg' src='../assets/icons/password.svg'>Reset Password</a>";
// Logout
echo "<p class='text-box space-top-large center alert-default'>Don't leave! I'm with the science team!</p>";
echo "<a class='btn alert-low space-top-small' href='https://superdupersecteteuploadtest.fluffybean.gay/account/logout.php'><img class='svg' src='../assets/icons/sign-out.svg'>Logout</a>";
2022-07-25 17:28:55 +00:00
} else {
echo "<p class='space-bottom-large'>You must be logged in to change your account settings!</p>";
echo "<a class='btn alert-high space-top-large' href='https://superdupersecteteuploadtest.fluffybean.gay/account/login.php'>Login!</a>";
2022-07-25 17:28:55 +00:00
}
?>
</div>
<?php include "../ui/footer.php"; ?>
2022-07-25 17:28:55 +00:00
</body>
</html>