Alright so I'm trying to make a modular-type script that checks a few things
check to see if module exists
check to see if variable $mod has a name
the user has access
The code keeps skipping down to the last if...else saying that I don't have access, when the access check is correct. So I don't know what is up
<?php
include "classes.php";
$access = new AccessLevel();
$dir = "/modules/$mod/index.php";
if ( $mod = "" || !file_exists($dir) )
{
echo "Module does not exist";
}
else if ( file_exists($dir) && access->Check(0, 0) )
{
include "$dir";
}
else
{
echo "You do not have access to this area.";
}
?>
There is the script. It is small and ghetto...but this thing is just starting.