OK,
I have an array of accessible directories for a user set in a session variable like:
$_SESSION['allowed'] = array("adm","adve");
At the top of each page, I am checking this array against the current directory of the page like:
$currDir = basename(getcwd());
Pseudocode
IF $currDir Not In $_Session['allowed']
Redirect to 403
ELSE
Display Page
I am terrible with arrays, so any help is greatly appreciated. Thanks.