The application.cfm file in the subdirectories check for the existenc
e and
value of the client variable that gives that client or class of clien
t
privilege to that directory.

If the appropriate variables are not set and/or the value is not corr
ect it
sends them back to the root.

I am not sure if every application.cfm file needs to have a cfapplica
tion
tag or not.

Thanks,

Eric

----- Original Message -----
From: Steve Oliver <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Wednesday, January 30, 2002 10:09 AM
Subject: RE: Application framework and sessions?


> 1) Why put application.cfm's in your subdirectories since CF will u
se
> the one in the root anyways. But if you have to, then yes you need 
to
> put a cfapplication tag in each one.
>
> 2) No you don't need to lock client variables.
>
> ______________________
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -----Original Message-----
> From: ehoma [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 30, 2002 12:53 PM
> To: CF-Talk
> Subject: Application framework and sessions?
>
>
> Hi,
>
> I have a question about using the application framework and session
s.  I
> have an application that has a shopping cart.  I have an applicatio
n.cfm
> file in the root directory so that session variables are created ri
ght
> away
> and use them to keep track of the items placed in the cart.
>
> The cfapplication file looks like this:
>
> <CFAPPLICATION NAME="xxxx"
>    SESSIONMANAGEMENT="Yes"
>    SETCLIENTCOOKIES="Yes"
>    SESSIONTIMEOUT="#CreateTimeSpan(0, 1, 0, 0)#"
>    APPLICATIONTIMEOUT="#CreateTimeSpan(2, 0, 0, 0)#"
>    CLIENTMANAGEMENT="Yes"
>    CLIENTSTORAGE="xxxx">
>
> <CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes">
> <CFIF NOT #ISDEFINED("Application.Started")#>
> <CFSET APPLICATION.TITLE = "xxxx">
> <CFSET APPLICATION.STARTED = TRUE>
> </CFIF>
> </CFLOCK>
>
> <CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes">
> <CFIF NOT #ISDEFINED("SESSION.STARTED")#>
> <CFSET SESSION.STARTED = TRUE>
> </CFIF>
> </CFLOCK>
>
> <CFLOCK NAME="session.sessionID" TYPE="exclusive" TIMEOUT="10
">
> <CFIF ISDEFINED('SESSION.CFID') AND ISDEFINED('SESSION.CFTOKEN')>
>  <CFSET TEMPID = SESSION.CFID>
>  <CFSET TEMPTOKEN = SESSION.CFTOKEN>
>  <CFCOOKIE NAME="CFID" VALUE="#tempID#">
>  <CFCOOKIE NAME="CFTOKEN" VALUE="#tempToken#">
> </CFIF>
> </CFLOCK>
>
> I then go through a login process when they are ready to check out.
  The
> login process takes place in a subdirectory.  I've created an
> application.cfm file in that subdirectory.  In it I force them to g
o
> through
> the login form and the login check unless the a variable
> client.logged_in is
> set.  Once they are successfully logged in the client.logged_in val
ue
> lets
> them carry on with their checkout.
>
> My question is this:
>
> In my subdirectory cfapplication.cfm file do I need to have a
> cfapplication
> tag just like the one in the file in the root?  Or, can the
> cfapplication.cfm file just contain something like this:
>
> <CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes">
> <CFIF NOT #ISDEFINED("Application.Started")#>
> <cflocation url="http://www.xxxx.com/index.cfm"; addtoken="No">
> <cfabort>
> </CFIF>
> </CFLOCK>
>
> <CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes">
> <CFIF NOT ISDEFINED("Session.Started")>
> <cflocation url="http://www.xxxx.com/index.cfm"; addtoken="No">
> <cfabort>
> </CFIF>
> </CFLOCK>
>
> <CFLOCK TIMEOUT="30" THROWONTIMEOUT="Yes">
> <CFIF NOT ISDEFINED("CLIENT.USER_NAME")>
> <cflocation url="http://www.xxxx.com/subdirectory/index.cfm";
> addtoken="No">
> <cfabort>
> </CFIF>
> </CFLOCK>
>
> Also, do I need to lock the client variable?
>
>
> Thanks,
>
> Eric Homa
>
>
>
>
> ___________________________________________________________________
___
> Dedicated Windows 2000 Server
>   PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
>   Instant Activation � $99/Month � Free Setup
>   http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>


______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to