Instead of doing a series of <cfif>s as suggested a couple of times,
wouldn't it be easier to use switch and case ..

<cfif IsDefined('session.accesslevel')>
<cfswitch expression="session.accesslevel">

<cfcase value=1>
<cfinclude template="level1.cfm">
</cfcase>

<cfcase value=2>
<cfinclude template="level2.cfm">
</cfcase>

<cfcase value=3>
<cfinclude template="level3.cfm">
</cfcase>

<cfcase value=4>
<cfinclude template="level4.cfm">
</cfcase>

<cfcase value=5>
<cfinclude template="level5.cfm">
</cfcase>

<cfdefaultcase>
<cfinclude template="login.cfm">
</cfdefaultcase>

</cfswitch>

<cfelse>
<cfinclue template="login.cfm">
</cfif>

The login.cfm would run a query against the database and based on what it
finds in the recordset, it would set the session.accesslevel.

You could use cookies, of course, in place of the session scope.

H.

=========================
Howard Owens
Web Producer
InsideVC.com
mailto:[EMAIL PROTECTED]
=========================

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to