introduced activated only page

This commit is contained in:
Thies Mueller
2021-01-10 14:12:52 +01:00
parent a0f9dfe0ce
commit ae886df878
2 changed files with 29 additions and 1 deletions

View File

@@ -12,11 +12,24 @@ if(!isset($_SESSION['userid'])) {
die('Please <a href="login.php">login</a>');
}
$username = $_SESSION['username'];
$activated = $_SESSION['activated'];
echo "Hi ".$username."!";
if(isset($_GET['activation_req'])) {
echo '<div class="alert alert-danger" role="alert">Your account isnt activated yet!</div><br>';
}
?>
<br><br>
<a href="profile.php"><button class="btn btn-primary">Profile</button></a>
<br><br><br><br>
<br><br>
<?php
if ($activated == 0) {
echo '<a href="?activation_req=1"><button class="btn btn-primary disabled">Activated Area</button></a>';
}
if ($activated == 1) {
echo '<a href="activatedarea.php"><button class="btn btn-primary">Activated Area</button></a>';
}
?>
<br><br>
<a href="logout.php"><button class="btn btn-danger">LOGOUT</button></a>
</body>
</html>