yes, I did.
here is the code that goes in each page, obvously the array values will vary.
global $access;
$access = array ("member", "admin", "webadmin");
then the function is:
function allow_access()
{
global $access;
global $auth;
global $admEmail;
echo "auth=$auth";
if (!$auth)
{ //if their access level isn't set
error_format();
echo "Your authorisation level has not yet been set.<br/>";
echo "Please contact the $admEmail to request this is updated";
end_format();
exit;
}
else
{ //check their authorisation against the page access
echo "access = $access";
for ($i=1;$i<count($access);$i++)
{
if ($auth !== $access)
{
error_format();
echo "Sorry, you are not authorised to access this page. <br/>";
echo "Please contact the $admEmail to request this is updated";
end_format();
exit;
}
}
}
}