Hello,
Please help restrict my Administrator pages (about 20 pages) from the rest of the other users.
I have my Access database with a table of users that includes a field for UserLevels.
if the UserLevel is 3 and above, that user should be able to access the 20 cfm pages available only for administrators.
Please I would like to request some code and where to put it. Please be clear as possible. It's the end of the week again and I have to come up with the login module by tommorow afternoon. Please, I hope you understand.
Thanks in advance.
PS. All users of my application will have to login. But only Administratrs have the access to the Admin pages.
By the way, i use the basic session method in Ben forta's book. So, those CFlogout, CFlogin is a bit different from what i am doing.
and after u authenticate him with the database values...
create a session variable session.userlevel with the appropriate value
just put a if condition on top of the 20 files...
<cfif IsDefined(Session.UserLeve
Show him some data saying no access to this page
</cfabort>
</cfif>
now put this code in a common file that is UserAccess.cfm
and include this file in the top of the 20 files
Regards
Hart