Skip to content

Commit

Permalink
Merge pull request #2 from ValarDragon/master
Browse files Browse the repository at this point in the history
Make admin page redirect if you don't have permission.
  • Loading branch information
LukeLaScala authored Jun 15, 2017
2 parents 848d6ef + cf8fbf4 commit 7c77429
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions view/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
* Date: 2/5/17
* Time: 7:07 PM
*/

if(!isset($_SESSION['user']['admin']))
{
header('Location: https://ctflearn.com/index.php', true, 302);
die();
}
if(!$_SESSION['user']['admin'])
{
header('Location: https://ctflearn.com/index.php', true, 302);
die();
}
?>

<html>
<head>
<?php include 'head.php'?>
<?php include 'head.php' ?>
</head>
<body>
<div class="container section">
Expand Down

0 comments on commit 7c77429

Please sign in to comment.