RE: CFIF logic problem

2005-07-21 Thread Ian Vaughan
] Sent: 20 July 2005 16:05 To: CF-Talk Subject: RE: CFIF logic problem However The cfif url.no IS 3 etc displays dynamic content out of the database based on the url.no=. So for example http://sitename/test.cfm?no=3 Would bring back the content ' NEWS' While http://sitename/test.cfm?no=2 Would

RE: CFIF logic problem

2005-07-21 Thread Ian Vaughan
With the example below if I visit http://sitename/test.cfm?no=3 and I am not logged in to view the content on that page. i.e. (session.permission) has not been set The page content displays and does not redirect ? How could I modify the cfif below to check that if a user visits

RE: CFIF logic problem

2005-07-21 Thread Kerry
works fine for me! Test not logged in: cfparam name=url.no default=0 cfset request.restrict = 3 cfset session.permission = notadmin cfif listfind(request.restrict,url.no) and comparenocase(session.permission,admin) neq 0 cflocation url=index.cfm /cfif Page contentbr cfoutput

CFIF logic problem

2005-07-20 Thread Ian Vaughan
Hi Is my logic correct in the code below ? cfif url.no IS 3 cflocation url=index.cfm cfelseif (url.no IS 3) and (session.permission is admin) Page Content cfelse /cfif What I want is if the url is http://sitename/test.cfm?no=3 Then it will transfer back to the index.cfm page. However if

Re: CFIF logic problem

2005-07-20 Thread Ray Champagne
Because the url.no is always three in your example. The if statement always will dump out after the first conditional, since it is always true. switch 'em around: cfif (url.no IS 3) and (session.permission is admin) Page Content cfelseif url.no IS 3 cflocation url=index.cfm

Re: CFIF logic problem

2005-07-20 Thread J.J. Merrick
Problem lies in that url.no is alway 3 and it will process the first line. Do this... cfif url.no EQ 3 and session.permission NEQ admin cflocation url=index.cfm cfelseif (url.no IS 3) and (session.permission is admin) Page Content cfelse /cfif You have to add the not admin to give it a

CFIF logic problem

2005-07-20 Thread Larry Lyons
Hi Is my logic correct in the code below ? cfif url.no IS 3 cflocation url=index.cfm cfelseif (url.no IS 3) and (session.permission is admin) Page Content cfelse /cfif What I want is if the url is http://sitename/test.cfm?no=3 Then it will transfer back to the index.cfm page. However if

RE: CFIF logic problem

2005-07-20 Thread Ian Vaughan
[mailto:[EMAIL PROTECTED] Sent: 20 July 2005 15:01 To: CF-Talk Subject: CFIF logic problem Hi Is my logic correct in the code below ? cfif url.no IS 3 cflocation url=index.cfm cfelseif (url.no IS 3) and (session.permission is admin) Page Content cfelse /cfif What I want is if the url is http

Re: CFIF logic problem

2005-07-20 Thread Clint Tredway
=3 then apply the logic so that if a user has not logged in and they do not have a session.permission is admin then use cflocation back to the index.cfm page -Original Message- From: Larry Lyons [mailto:[EMAIL PROTECTED] Sent: 20 July 2005 15:01 To: CF-Talk Subject: CFIF logic

RE: CFIF logic problem

2005-07-20 Thread Kerry
:[EMAIL PROTECTED] Sent: 20 July 2005 16:05 To: CF-Talk Subject: RE: CFIF logic problem However The cfif url.no IS 3 etc displays dynamic content out of the database based on the url.no=. So for example http://sitename/test.cfm?no=3 Would bring back the content ' NEWS' While http://sitename