This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package berry | |
| import org.springframework.web.multipart.MultipartFile | |
| import org.codehaus.groovy.grails.web.context.ServletContextHolder | |
| import grails.util.GrailsUtil | |
| class FileUploadService { | |
| boolean transactional = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <img src="${resource(dir:'assets', file: 'myfile.jpg')}" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Copyright (c) 2009 Jordan Kasper | |
| * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) | |
| * Copyright notice and license must remain intact for legal use | |
| * Requires: jQuery 1.2+ | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
| * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | |
| * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) 2006 Damien Miller <djm@mindrot.org> | |
| // | |
| // Permission to use, copy, modify, and distribute this software for any | |
| // purpose with or without fee is hereby granted, provided that the above | |
| // copyright notice and this permission notice appear in all copies. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.scs.telecpa | |
| import com.scs.utils.BCrypt | |
| import grails.converters.JSON | |
| class CaptchaController { | |
| def index = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.berry | |
| import com.berry.BCrypt | |
| import grails.converters.JSON | |
| class CaptchaController { | |
| def index = { | |
| // Generate the SALT to be used for encryption and place in session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "text":"heart", | |
| "images":[ | |
| { | |
| "hash":"$2a$10$GTcG7U1rt7XFBi4JVImT2Oo.E3D8FCzha2772XuXm7v28Kx2LNL5S", | |
| "file":"images/captchaImages/99.png" | |
| }, | |
| { | |
| "hash":"$2a$10$GTcG7U1rt7XFBi4JVImT2Oa5Y/I/cXOUj30kffPqyX0qxTnAACX6O", | |
| "file":"images/captchaImages/43.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <g:form action="pickup"> | |
| <div class="stylized myform" style="width:542px;"> | |
| <h2>Your pickup code will be given to you by your loan consultant</h2> | |
| <g:if test="${flash.message}"> | |
| <div class="error"> | |
| ${flash.message} | |
| </div> | |
| </g:if> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- PLACE IN HEADER --> | |
| <script type="text/javascript" src="${resource(dir:'js',file:'jquery.simpleCaptcha-0.2.js')}"></script> | |
| <style type="text/css"> | |
| img.simpleCaptcha { | |
| margin: 2px !important; | |
| cursor: pointer; | |
| } | |
| img.simpleCaptchaSelected { | |
| margin-bottom: 0px; | |
| border-bottom: 2px solid red; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def pickup = { | |
| def captchaOK = true | |
| def pickupCode = params.pickupCode ?: '' | |
| def lastFourDigits = params.lastFourDigits ?: '' | |
| // Determine if the captcha is picked correctly | |
| if (params.captchaSelection != session.selectedCaptchaText) { | |
| captchaOK = false |