introduced activated only page
This commit is contained in:
15
secure.php
15
secure.php
@@ -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>
|
||||
|
Reference in New Issue
Block a user