introduced activated only page
This commit is contained in:
		
							
								
								
									
										15
									
								
								activatedarea.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								activatedarea.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
 | 
			
		||||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
<title>Activated Area</title>
 | 
			
		||||
<link rel="stylesheet" href="ressources/css/bootstrap.min.css" crossorigin="anonymous">
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
<script src="ressources/js/bootstrap.min.js"></script>
 | 
			
		||||
<?php
 | 
			
		||||
session_start();
 | 
			
		||||
if($_SESSION['activated'] == 0) {
 | 
			
		||||
    die ("Not activated yet")
 | 
			
		||||
}
 | 
			
		||||
echo "heres the fun world"
 | 
			
		||||
?>
 | 
			
		||||
							
								
								
									
										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