SteelDragon
Programmer
Ok, I have a problem that is two fold.
1) I have 2 CFIF statements (see below) and I want to use them to send a person to a location based on their membership in a group. So far CF picks up the first CFIF, but not the second. It immediatly goes to the CFElse if the first CFIF is not true. How can i do this where if one CFIF is not true, it goes to the second CFIF, and THEN goes to the Else if none of the conditions are met.
2) I have setup security on this site, and I want the session variables to allow a user to move from one page to another, I have it setup now so when the user logs in they are sent to a specific URL, how can I make this look at the requested URL, and then log them in and send them there instead of hard coding it? I have put example code for each below:
1)
<cftry>
<cfif CheckUser.WebCustomer is -1>
<cflocation url="../Scripts/cgi-bin/cgirdir.exe?PartnerFTP" addtoken="no">
<cfif CheckUser.WebPartner is -1>
<cflocation url="../Scripts/cgi-bin/cgirdir.exe?CustomerFTP" addtoken="no">
<cfelse>
<cflocation url=" addtoken="no">
</CFIF></cfif>
2)
<CFIF SESSION.LOGGEDIN>
<SCRIPT LANGUAGE="JavaScript">
self.location ='support_search.cfm';
</SCRIPT>
<CFELSE>
<CFOUTPUT>
<SCRIPT>
alert("Your login was unsuccessful because #Reason# Please try your login again."
;
self.location="login.cfm";
</SCRIPT>
</CFOUTPUT>
1) I have 2 CFIF statements (see below) and I want to use them to send a person to a location based on their membership in a group. So far CF picks up the first CFIF, but not the second. It immediatly goes to the CFElse if the first CFIF is not true. How can i do this where if one CFIF is not true, it goes to the second CFIF, and THEN goes to the Else if none of the conditions are met.
2) I have setup security on this site, and I want the session variables to allow a user to move from one page to another, I have it setup now so when the user logs in they are sent to a specific URL, how can I make this look at the requested URL, and then log them in and send them there instead of hard coding it? I have put example code for each below:
1)
<cftry>
<cfif CheckUser.WebCustomer is -1>
<cflocation url="../Scripts/cgi-bin/cgirdir.exe?PartnerFTP" addtoken="no">
<cfif CheckUser.WebPartner is -1>
<cflocation url="../Scripts/cgi-bin/cgirdir.exe?CustomerFTP" addtoken="no">
<cfelse>
<cflocation url=" addtoken="no">
</CFIF></cfif>
2)
<CFIF SESSION.LOGGEDIN>
<SCRIPT LANGUAGE="JavaScript">
self.location ='support_search.cfm';
</SCRIPT>
<CFELSE>
<CFOUTPUT>
<SCRIPT>
alert("Your login was unsuccessful because #Reason# Please try your login again."
self.location="login.cfm";
</SCRIPT>
</CFOUTPUT>