Changeset 468 for trunk/lib/Captcha.inc.php
- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/lib/Captcha.inc.php
r396 r468 54 54 class Captcha { 55 55 56 var$secret_key = 'some random seed text for the md5';57 var$random_number;58 var$ascii_numbers = array(56 public $secret_key = 'some random seed text for the md5'; 57 public $random_number; 58 public $ascii_numbers = array( 59 59 array( 60 60 ' ##### ', … … 147 147 * @since 20 Jan 2006 13:08:22 148 148 */ 149 function Captcha()149 public function __construct() 150 150 { 151 151 $app =& App::getInstance(); … … 164 164 * @since 07 Dec 2005 21:59:25 165 165 */ 166 function getAsciiNumber($num=null)166 public function getAsciiNumber($num=null) 167 167 { 168 168 $app =& App::getInstance(); … … 200 200 * @since 07 Dec 2005 22:09:04 201 201 */ 202 function printAsciiNumber()202 public function printAsciiNumber() 203 203 { 204 204 $ascii = $this->getAsciiNumber($this->random_number); … … 213 213 * @since 07 Dec 2005 22:09:04 214 214 */ 215 function printForm()215 public function printForm() 216 216 { 217 217 $hash = $this->_getMD5key($this->random_number); … … 231 231 * @since 07 Dec 2005 22:19:33 232 232 */ 233 function valid()233 public function valid() 234 234 { 235 235 $number = getFormData('sc-captcha-input'); … … 251 251 * @since 07 Dec 2005 21:40:25 252 252 */ 253 function _getRandomNumber()253 public function _getRandomNumber() 254 254 { 255 255 return mb_substr(strval(rand(10000, 99999)), 0, rand(3, 5)); … … 265 265 * @since 07 Dec 2005 21:53:35 266 266 */ 267 function _getMD5key($input)267 public function _getMD5key($input) 268 268 { 269 269 return md5($this->secret_key . $input); … … 272 272 } 273 273 274 ?>
Note: See TracChangeset
for help on using the changeset viewer.