There's not a tag named <CFIFELSE> as far as i know ... that might be the
problem use <CFELSEIF> or <CFELSE>
Allan Pichler
Machine Dreams Inc.
-----Original Message-----
From: Tariq Ahmed [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 21, 2000 4:45 PM
To: CF-Server
Subject: Re: Help; CFIF
Joshua. This is caused by improperly nested or unmatched
CFIF/CELSE/CFELSEIF statements.
I think the problem is at the end. The last </CFIF> closes the
CFIFELSE. But nothing is closing the inner CFIF after the CFIFELSE.
<CFIF '#CheckID.password#' is '#form.password#' and "#rights#" is
0></CFOUTPUT>
<!--- Password Right! --->
<cfset session.ID = #checkid.ID#>
<cfset session.UserName = #checkid.UserName#>
<cfset session.IP = #remote_addr#>
<cfset session.Host = #remote_host#>
<cfset session.Browser = #HTTP_USER_AGENT#>
<cflocation url="default.cfm" addtoken="No">
<CFIFELSE>
<CFOUTPUT QUERY="CHECKID">
<CFIF '#CHECKID.PASSWORD#' IS '#FORM.PASSWORD#' AND
"#RIGHTS#" IS
1></CFOUTPUT>
<CFLOCATION URL="ADMIN.CFM" ADDTOKEN="No">
<CFELSE>
<!--- Password Wrong --->
<CFIF isdefined("session.attempt")>
<cfset session.attempt = #session.attempt#
+ 1>
<CFELSE>
<cfset session.attempt = 1>
</cfif>
<cflocation url="login.cfm" addtoken="No">
</cfif>
On Thu, 21 Dec 2000, Joshua Tipton wrote:
> Please help me with this I cannot fingure out why it keeps on kicking back
> this error. What it does is compares the id and the password then it
checks
> to see the users rights level if they have the level then it will send
them
> to the page if it does not have the level then it will go to the next
cfif.
> Please help me. The error message is below.
>
>
> Joshua Tipton
>
>
============================================================================
> =================================================
>
> Login Page
> --------------------------------------------------------------------------
--
> ------------------------------------------------
> <HTML>
> <HEAD>
>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
>
> <TITLE>Login - Fire Drill</TITLE>
> </HEAD>
>
> <BODY style="Font-Family: Arial, Helvetica, sans-serif;" topmargin=0
> leftmargin=0
background="../../Content/Graphics/SteelPlates/Background.gif"
> onload="vbscript: frmLogin.UserName.focus()">
> <cfparam name="session.url" default="default.cfm">
> <SCRIPT LANGUAGE="JavaScript"
> SRC="../../../../Sergraphics/Scripts/insideUPS.js"
> TYPE="text/javascript"></SCRIPT>
> <SCRIPT LANGUAGE="VBScript">
> <!--
> Sub btnHome_Onclick
> window.location.replace("http://www.ser.ups.com")
> End Sub
>
> Sub btnBack_OnClick
> window.location.replace("../")
> End Sub
> -->
> </SCRIPT>
>
> <cfif isdefined("session.UserName")>
> <cfset login="#session.UserName#">
> <cfelse>
> <cfset login="">
> </CFIF>
>
> <CFFORM NAME="frmLogin" ACTION="checkid.cfm" METHOD="post">
> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
> <TR>
> <TD>
> <IMG
>SRC="../../../Content/Graphics/SteelPlates/Sqr_Plate1_1.gif"
> width=39 height=300 BORDER=0 ALT="">
> </TD>
> <TD background="../../../Content/Graphics/SteelPlates/Sqr_Plate1_2.gif"
> width="220" VALIGN="top">
>
> <table width="220" border="0" align="center">
> <tr>
> <td ALIGN="middle" VALIGN="top" colspan="2">
> <br><strong><font size="4" color="White">Central
Florida<br>Fire
> Drill Recap</font></strong><br>
> </td>
> </tr>
> <tr>
> <td colspan="2" VALIGN="center" style="background-color: Black;"
> align="middle">
> <strong><font color="#ff0000">This site is for use by
><br>authorized
> employees only.</FONT></STRONG>
> </td>
> </tr>
> <tr>
> <td align="middle">
> <b><font color="#000000">User Name:</font></b>
> </td>
> <td>
> <cfoutput><input type="text" name="UserName" id="UserName"
> value="#Login#" size="10" maxlength="10"></cfoutput>
> </td>
> </tr>
> <tr>
> <td align="middle">
> <b><font color="#000000">Password:</font></b>
> </td>
> <td>
> <INPUT TYPE="password" NAME="password" size="10"
>maxlength="10">
> </td>
> </tr>
> <tr>
> <td align="middle" colspan="2">
> <input type="submit" value="Login"> <input type="reset"
> value="Clear">
> </td>
> </tr>
> <tr>
> <td colspan="2" align="center" valign="top">
> <CFIF NOT isdefined("session.attempt")><cfset session.attempt
=1></CFIF>
> <font size="+1" color="Red">Attempt #
> <cfoutput>#session.attempt#</CFOUTPUT></font>
> </td>
> </tr>
> <tr>
> <td align="center" valign="top">
> <button name="btnBack"><-- Back</button>
> </td>
> <td align="center" valign="top">
> <button name="btnHome">|<u>^</u>| Home</button>
> </td>
> </tr>
> </table>
>
> </TD>
> <TD>
> <IMG
>SRC="../../../Content/Graphics/SteelPlates/Sqr_Plate1_3.gif"
> width="40" height="300" BORDER="0">
> </TD>
> </TR>
> </TABLE>
>
>
>
> </CFFORM>
> <SCRIPT LANGUAGE="JavaScript" SRC="../../Content/scripts/FBot.js"
> TYPE="text/javascript"></SCRIPT>
> </BODY>
> </HTML>
> --------------------------------------------------------------------------
--
> ------------------------------------------------
> --------------------------------------------------------------------------
--
> ------------------------------------------------
> Checkid Page
> --------------------------------------------------------------------------
--
> ------------------------------------------------
> <HTML>
> <HEAD>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
>
>
> <TITLE>Password Verification Check</TITLE>
> </HEAD>
>
> <body bgcolor="#FFFFFF">
> <CFQUERY NAME="CheckID" DATASOURCE="#application.datasource#"
DBTYPE="ODBC"
> USERNAME="webuser" PASSWORD="webuser">
> select *
> from Users
> where UserName='#form.UserName#'
> </CFQUERY>
>
> <CFIF #CheckID.recordcount# is 0>
> <!--- User Not Found --->
> <CFIF isdefined("session.attempt")>
> <cfset session.attempt = #session.attempt# + 1>
> <CFELSE>
> <cfset session.attempt = 1>
> </cfif>
> <cflocation url="login.cfm" addtoken="No">
>
> <!--- User Found, Check Password --->
> <cfoutput query="checkid">
> <CFIF '#CheckID.password#' is '#form.password#' and "#rights#" is
> 0></CFOUTPUT>
> <!--- Password Right! --->
> <cfset session.ID = #checkid.ID#>
> <cfset session.UserName = #checkid.UserName#>
> <cfset session.IP = #remote_addr#>
> <cfset session.Host = #remote_host#>
> <cfset session.Browser = #HTTP_USER_AGENT#>
>
> <cflocation url="default.cfm" addtoken="No">
> <CFIFELSE>
> <CFOUTPUT QUERY="CHECKID">
> <CFIF '#CHECKID.PASSWORD#' IS '#FORM.PASSWORD#' AND "#RIGHTS#" IS
> 1></CFOUTPUT>
> <CFLOCATION URL="ADMIN.CFM" ADDTOKEN="No">
> <CFELSE>
> <!--- Password Wrong --->
> <CFIF isdefined("session.attempt")>
> <cfset session.attempt = #session.attempt# + 1>
> <CFELSE>
> <cfset session.attempt = 1>
> </cfif>
>
> <cflocation url="login.cfm" addtoken="No">
> </cfif>
>
> </BODY>
> </HTML>
> --------------------------------------------------------------------------
--
> ------------------------------------------------
>
>
>
> Error Diagnostic Information
> Context validation error in tag CFIF
>
> The tag is not correctly positioned relative to other tags in the
template:
> tag CFIF must have some content. This means that there must be at least
one
> tag, some text, or even just whitespace characters between the <CFIF> and
> </CFIF> markers.
>
> This problem may be due to a CFML comment that has no end comment mark.
>
> The error occurred while processing an element with a general identifier
of
> (CFIF), occupying document position (29:2) to (29:69).
>
> The specific sequence of files included or processed is:
> C:\InetPub\wwwroot\central_florida\TSG\APPS\firedrill\checkid.cfm
>
>
> Date/Time: 12/21/00 19:43:25
> Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
> Remote Address: 10.19.186.151
> HTTP Referer:
> http://10.19.66.200/central_florida/TSG/APPS/firedrill/login.cfm
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com