|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: |
// the form
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Reset Password</title>
</head>
<body>
<cfform id="form" name="form" method="post" action="setpassword.cfm">
<br />
<cfset application.captcha = createObject("component", "captcha.captchaService").init(configFile="captcha/captcha.xml") />
<cfset application.captcha.setup()>
<table width="75%" align="center" border="1" cellspacing="0">
<tr>
<th width="53%" height="20" bgcolor="#CCCCCC" scope="row">Please Enter Your e-mail address</th>
<td width="47%"><cfinput type="text" name="email" message="Please Enter your e-mail address with the format mail@host.ext" validate="email" required="yes" id="textfield" size="50" /></td>
</tr>
<tr>
<th height="21" bgcolor="#CCCCCC" scope="row"> Enter The Text Shown in The Picture</th>
<td width="47%"> <cfinput type="text" name="captcha" size="50" required="yes" message="Enter the text on the picture"/><br /><br />
<!--- Captcha --->
<cfset captcha = application.captcha.createHashReference()>
<cfoutput>
<img src="Captcha.cfm?hash=#captcha.hash#">
<input name="hashval" type="hidden" value="#captcha.hash#" /></cfoutput>
</td>
</tr>
</table>
<p align="center">
<cfinput type="submit" name="button" id="button" value="Submit" />
</p>
</cfform>
</body>
</html>
// validation code
<!----Find record with this user name/password------->
<cfif isDefined("form.email") >
<cfif #form.hashval# is #form.captcha#>
<cfquery name="getEmail" datasource="kpimage">
select AUT_email, TBL_author.AUT_ID, TBL_author.AUT_fname, TBL_author.AUT_lname from TBL_author where AUT_email='#form.email#'
</cfquery>
<!----Find record with this user e-mail------->
<cfif getEmail.recordCount eq 1>
<!----storing the last and first name of the user------->
<cfset Session.fName=getEmail.AUT_fname>
<cfset Session.lName=getEmail.AUT_lname>
<cfset Session.email=getEmail.AUT_email>
<cfset Session.AUT_ID=getEmail.AUT_ID>
<!----We verify if the user already have a Reset Key ------->
<cfquery name="check" datasource="kpimage">
SELECT AUT_ID, ResetKey
FROM TBL_PasswordReset
WHERE (AUT_ID = #Session.AUT_ID#)
</cfquery>
<cfif check.recordCount eq 1>
<!----Send the link to the address------->
<cfmail to="#form.email#" from="bugwood@uga.edu" subject="Reset your password" type="html" server="email.uga.edu" >
Please follow this link to reset your password: <a href="http://beta.forestryimages.org/project/resetform.cfm?id=#check.ResetKey#">http://beta.forestryimages.org/project/resetform.cfm</a>
</cfmail>
<p align="center">An e-mail has been sent to <cfoutput>#form.email#</cfoutput></p>
<cfinclude template="emailform.cfm" >
<cfelseif check.recordCount eq 0>
<cfset userid=#CreateUUID()#>
<!----Storing new data in the table------->
<cfquery name="insertId" datasource="kpimage">
insert into TBL_PasswordReset(AUT_ID, RDate, ResetKey) VALUES (#Session.AUT_ID#, #Now()#, '#userid#')
</cfquery>
<!----Send the link to the address------->
<cfmail to="#form.email#" from="bugwood@uga.edu" subject="Reset your password" type="html" server="email.uga.edu" >
Please follow this link to reset your password: <a href="http://beta.forestryimages.org/project/resetform.cfm?id=#userid#">http://beta.forestryimages.org/project/resetform.cfm</a>
</cfmail>
<p align="center">An e-mail has been sent to <cfoutput>#form.email#</cfoutput></p>
<cfinclude template="emailform.cfm" >
</cfif>
<cfelse>
<p align="center">You do not have an account with us, please contact the administrator</p>
<cfinclude template="emailform.cfm" >
</cfif>
<cfelse>
<p align="center">The text you entered doesn't match the one on the picture, please try again...</p>
<cfinclude template="emailform.cfm" >
</cfif>
<cfelse>
<cflocation url="emailform.cfm" addtoken="no">
</cfif>
// Captcha.cfm
<cfset variables.captcha = application.captcha.createCaptchaFromHashReference("stream",url.hash) />
<cfcontent type="image/jpg" variable="#variables.captcha.stream#" reset="false" />
<cfif not application.captcha.validateCaptcha(form.hashval, form.captcha)>
Invalid
</cfif>
|
Advertisement
| Hall of Fame |