
<?php
//AUTHORIZATION/ACCESS CONTROL
//CHECK WHETHER THE USER IS LOGGED IN OR NOT
 if(!isset($_SESSION['user']))//if user session is not set
  {
   //USER IS NOT LOGGED IN
   // Redirect to login page with msg
   $_SESSION['not-login-msg'] = "<div class='error text-center'>Please login to Access Admin Panel.</div>";
   //redirect to login page
   header('location:'.SITEURL.'backend/login.php');
  }
 ?>
