Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
ckainc #1
Login using XForms
I'm having problems with a login page. Every time I leave the protected page
and return it makes me re-login. This did not happen with flash or html forms.
Here is my code for my Application.cfc, UserLoginForm.cfm, and
ForceUserLogin.cfm files:
Application.cfc:
<cfcomponent>
<cfset this.name="KillgoreSecure">
<cfset this.sessionManagement=true>
<cffunction name="onRequestStart" output="false" returntype="void">
<cfinclude template="ForceUserLogin.cfm">
</cffunction>
</cfcomponent>
UserLoginForm.cfm:
<html>
<head>
<title>Please Log In</title>
</head>
<body onLoad="document.LoginForm.userLogin.focus();">
<cfform action="#CGI.SCRIPT_NAME#?#cgi.QUERY_STRING#" name="LoginForm"
method="post" format="xml" skin="lightgray" width="150">
<cfformgroup type="vertical" label="Please Log In">
<input type="hidden" name="userLogin_required">
<input type="hidden" name="userPassword_required">
<cfinput type="text" name="userLogin" size="20" value="" maxlength="100"
required="yes"
message="Please type your username." width="100" label="Username:">
<cfinput type="password" name="userpassword" size="12" value=""
maxlength="100" required="yes"
message="Please type your password." width="75" label="Password:">
<cfinput type="submit" value="Submit" name="btnSubmit">
</cfformgroup>
</cfform>
</body>
</html>
ForceUserLogin.cfm:
<cflogin>
<cfif not (isDefined("Form.userLogin") and isDefined("Form.userPassword"))>
<cfinclude template="UserLoginForm.cfm">
<cfabort>
<cfelse>
<cfquery name="getUser" datasource="KillgDB">
Select * from Master
Where UserLogin = '#Form.UserLogin#'
And UserPassword = '#Form.UserPassword#'
</cfquery>
<cfif getUser.recordCount eq 1>
<cfloginuser name="#getuser.FacilityID#,#getuser.Facility#"
password="#Form.userPassword#"
roles="Admin">
<cfelse>
Invalid username and/or password. Please try again.
<cfinclude template="UserLoginForm.cfm">
<cfabort>
</cfif>
</cfif>
</cflogin>
Any help would be appreciated
Thanks
ckainc Guest
-
Implement XFORMS on ASP
Hi, I'm looking for a means to generate hundreds of ASP webforms using declarative language. I've put my attention on XFORMS. I understand... -
XFORMS
Hi, When specifying the skin='none' in the cfform how can i see the generated XML (XFORMS)? <cfform name='testXForm' format='XML' skin='none'> ... -
XForms ?
Is it possible to use the cfform tag to proccess XForm XML written outside of coldFusion? -
xforms and xsl
Hi, I was wondering it there a way to view the XML that the cfforms tags generate prior to being transformed by the XSL file that is automatically... -
Lyx and xforms!!
Hi all, I have this problem: I have Redhat 7.3 installed and i'm trying to install Lyx. I downloaded lyx-1.3.2.tar.gz e I launched ./configure...



Reply With Quote

