Problems setting access levels
I need to set access levels based on the following values:
<?php echo $_SESSION['UserLevel']; ?> - check for membership registration
<?php echo $_SESSION['OrderSubscLevel']; ?> - what level subscription is current
<?php echo $_SESSION['SubscActive']; ?> - has the subscription run out or is active
I have written a script that sets the additional 2 SESSION variables because they come from orders table used by the cart system. I have tested the script and at login the values are available.
The problem that I am having is in getting the different user levels to interact properly.
There are 5 levels of interactivity within the site.
1- non member - values for this user are
<?php echo $_SESSION['UserLevel']; ?> - 0
<?php echo $_SESSION['OrderSubscLevel']; ?> - 0
<?php echo $_SESSION['SubscActive']; ?> - 0
2- member (free service) - user level 1
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 0
<?php echo $_SESSION['SubscActive']; ?> - 0
3- first level subscription (paid service) -
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 2
<?php echo $_SESSION['SubscActive']; ?> - 1
4- second level subscription
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 3
<?php echo $_SESSION['SubscActive']; ?> - 1
5- third level subscription
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 4
<?php echo $_SESSION['SubscActive']; ?> - 1
Content available to each successive level still needs to be open to the higher levels.
I just don't seem to find any combination of these that will work. It seems like as soon as any "allow" criteria is hit all the others are just ignored. I need all 3 criteria to be met before allowing access.
I have tried to set groups for this but when I try to define a group based on either of the two variables I set in my script Security Assist Groups Manager gives this error:
uilnitialize error.
Error: The object is not currently contained in a document