Skip to content

Commit

Permalink
Make admin page redirect if you don't have permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon committed Jun 14, 2017
1 parent 166cd7c commit cf8fbf4
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 cf8fbf4

Please sign in to comment.