Cold Fusion (LUCEE) password protect website with [login to view URL]
$30-250 USD
Paid on delivery
I have an old web based application that I had hosted on a legacy Railo server. I want to port this application to a server running LUCEE Lucee 5.2.2.71. The password protection used to run fine with [url removed, login to view] however i now need to do the same with [url removed, login to view] so I'm looking for somebody that can help me with this.
The old code below. (3 files)
[url removed, login to view], [url removed, login to view], [url removed, login to view]
[url removed, login to view]
*******************************************
<!--- Create the application --->
<cfapplication name="MyApp"
clientmanagement="Yes"
sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
applicationtimeout="#CreateTimeSpan(0,0,30,0)#" />
<!--- Now define that this user is logged out by default --->
<CFPARAM NAME="[url removed, login to view]" DEFAULT="false" />
<!--- Now define this user id to zero by default, this will be used later on to access specific information about this user. --->
<CFPARAM NAME="session.XML_ID" DEFAULT="0" />
<cfif [url removed, login to view] neq "true">
<cfif ListLast(CGI.SCRIPT_NAME, "/") EQ "[url removed, login to view]">
<cfelseif ListLast(CGI.SCRIPT_NAME, "/") EQ "[url removed, login to view]">
<cfelse>
<!--- this user is not logged in, alert user and redirect to the [url removed, login to view] page --->
<script>
alert("You must login to access this area!");
self.location="[url removed, login to view]";
</script>
</cfif>
</cfif>
end of [url removed, login to view]
*******************************************
[url removed, login to view]
<center>
<br>Â <br>
<br>Â <br>
<form action="[url removed, login to view]" method="post">
Login: <input type="text" name="firstname" value=""><BR />
Password: <input type="password" name="user_pass" value=""><BR />
<input type="hidden" name="secondname" value=""><BR />
<input type="hidden" name="email" value=""><BR />
<input type="hidden" name="company" value=""><BR />
<input type="submit" name="login_user" value="Log In"><BR />
</form>
</center>
end of [url removed, login to view]
*********************************************
[url removed, login to view]
<!--- Get all records from the database that match this users credentials --->
<cfquery name="sessionvariables" datasource="whatever">
SELECT *
FROM login_admin
WHERE firstname = '#firstname#'
AND user_pass = '#user_pass#'
</cfquery>
<cfoutput query="sessionvariables">
<cfset [url removed, login to view] = '#firstname# #lastname#' />
<cfset [url removed, login to view] = '#email#' />
<cfset [url removed, login to view] = '#company#' />
</cfoutput>
<cfquery name="qVerify" datasource="whatever">
SELECT XML_ID, firstname, lastname, user_pass, email, company
FROM login_admin
WHERE firstname = '#firstname#'
AND user_pass = '#user_pass#'
</cfquery>
<cfif [url removed, login to view]>
<!--- This user has logged in correctly, change the value of the [url removed, login to view] value --->
<cfset [url removed, login to view] = "True" />
<cfset session.XML_ID = qVerify.XML_ID />
<!--- Now welcome user and redirect to "<strong>[url removed, login to view]</strong>" --->
<script>
alert("Welcome to the Page...");
self.location="[url removed, login to view]";
</script>
<cfelse>
<!--- this user did not log in correctly, alert and redirect to the login page --->
<script>
alert("Wrong Password... !!!");
self.location="[url removed, login to view]";
</script>
</cfif>
Project ID: #15089027