Hi,
I believe that the Sentry has already covered the check that they are logged in. Have a look in the Sentry.php file around the line 56-83. That code is checking if the user is logged in. That means that you can cut the following out of your page:
PHP Code:
if ($_SESSION['user']=="" OR $_SESSION['pass']=="")
{ header("Location: login.php"); die(); }
Really you should remove this:
PHP Code:
// if (!$theSentry->checkLogin(2) ){ header("Location: login.php"); die(); }
if (!$theSentry->checkLogin(2) ){}
if ($_SESSION['user']=="" OR $_SESSION['pass']=="")
{ header("Location: login.php"); die(); }
And replace it with the default code:
PHP Code:
require_once('../includes/Sentry.php');
$theSentry = new Sentry();
if (!$theSentry->checkLogin(2) ){ header("Location: login.php"); die(); }
Hope this helps,
Marzar
Edit: I just re-read your original post and realised what you are try to do.
The sentry code should redirect the user if they are logged in and are level 2 or 1 in this case. If you want more levels to be allowed access to this page then increase the checkLogin(__) number.