Addition:
Is this the best way to do mini sites (makes things unique by creating SESSION.#SiteName# plus cookie.#SiteName#, or is there another that is more simpler) so that no other can access each other's site and forces them to login with they change the URL?



Yes SESSION Management is ok and on, since it worked b4..cause the situation was I was setting sessions and cookies (and decided to switch to sessions fully), but we have multiple sites, and if they logged into their mini site then they changed the url and could switch sites...so I created a global variable in serverSpecificVars.cfm with the script below, with each site having their own request.sessionVar


serverSpecificVars.cfm: ===================== <cfscript> request.sessionVar = "bsp"; ... ... </cfscript>

 now does it need "##" or does it work without?


Application: ========================

 <cfapplication name="MyClient" sessionmanagement="yes"
 sessiontimeout="#CreateTimeSpan(0,0,30,0)#">

 <cfinclude template="config/_serverSpecificVars.cfm">


<cfif Not IsDefined("SESSION.#request.sessionVar#")> <!--- Set Session For Client ---> <cfscript> SESSION["#request.sessionVar#"] = StructNew(); SESSION["#request.sessionVar#"].USER_LOGGEDIN ="false"; SESSION["#request.sessionVar#"].USER_UN = ""; SESSION["#request.sessionVar#"].USER_USERID = ""; SESSION["#request.sessionVar#"].JOB_JOBID = ""; SESSION["#request.sessionVar#"].CANDIDATE_ID = ""; SESSION["#request.sessionVar#"].Agree = ""; </cfscript>

 </cfif>


Now for this not to throw an error I have to put this line of code outside the CFIF <cfset SESSION["#request.sessionVar#"].USER_LOGGEDIN ="false">

 <cfif NOT SESSION[request.sessionVar].USER_LOGGEDIN>
     <cflocation addtoken="no" url="signin.cfm">
 </cfif>



 Details Page:

 <cfif SESSION["#request.sessionVar#"].Agree NEQ "Yes">
   <cflocation addtoken="no" url="index.cfm">
 </cfif>

 Plus I include header.cfm with the following code, it worked b4 this,
 and help stay logged out and you could not go back, but now it says

 Element AGREE is undefined in a CFML structure referenced as part of an
 expression

<CFHEADER NAME="Expires" VALUE="Tue, 01 Jan 1985 00:00:01 GMT">
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="cache-control" VALUE="no-cache, no-store, must-revalidate">



<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1985 00:00:01 GMT"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="cache-control" CONTENT="no-cache, no-store, must-revalidate"> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

 Thanks in advanced

 Carl



Mark Stanton wrote:

Hey Carl

On its own the code you have there looks fine to me, I'd say there is
something that was not posted that's causing the problem.

What happens when you dump the session scope? Is request.sessionVar
getting changed somewhere along the line? Have you got sessions
enabled?




--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to