> 4,14,3,2,8,44
>
> If the user is allowed to see page 4, then he would be able to see all
pages
> that contains a 4, so it does not work correctly.

This code should be what you need:

If the user is allowed to see page 4, then he would be able to see all pages
that contains a 4, so it does not work correctly.<br><br>


<cfset newlist = "4,14,3,2,8,44">
<cfset pageid = "4">

<!--- Display correct page IDs to include --->
<cfloop index="t" list=#newlist#>
 <cfif Find(pageid, t)>
  <cfoutput>include pageid #t# <br></cfoutput>
 </cfif>
</cfloop>

<cfif Find(pageid, newlist) EQ "0">
<cfoutput> #application.error#</cfoutput>
</cfif>

<BR><BR>

<!--- Display error cause 7 isn't in the list --->
<cfset newlist = "4,14,3,2,8,44">
<cfset pageid = "7">

<!--- Display correct page IDs to include --->
<cfloop index="t" list=#newlist#>
 <cfif Find(pageid, t)>
  <cfoutput>include pageid #t# <br></cfoutput>
 </cfif>
</cfloop>

<cfif Find(pageid, newlist) EQ "0">
<cfoutput> #application.error#</cfoutput>
</cfif>

let me know is something is not clear....


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to