XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
xoopscaptchamethod.php
Go to the documentation of this file.
1
<?php
2
/*
3
You may not change or alter any portion of this comment or credits
4
of supporting developers from this source code or any supporting source code
5
which is considered copyrighted (c) material of the original comment or credit authors.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
32
abstract
class
XoopsCaptchaMethod
33
{
37
public
$handler
;
38
42
public
$config
;
43
47
public
$code
;
48
54
public
function
__construct
(
$handler
= null)
55
{
56
$this->handler =
$handler
;
57
}
58
64
public
function
isActive
()
65
{
66
return
true
;
67
}
68
76
public
function
loadConfig
(
$name
=
''
)
77
{
78
if
(!is_object($this->handler))
79
$this->
config
= array();
80
else
81
$this->
config
= empty(
$name
)
82
? $this->handler->config
83
: array_merge($this->handler->config, $this->handler->loadConfig(
$name
));
84
}
85
91
public
function
getCode
()
92
{
93
return
strval($this->code);
94
}
95
101
public
function
render
()
102
{
103
return
''
;
104
}
105
109
public
function
renderValidationJS
()
110
{
111
return
''
;
112
}
113
121
public
function
verify
($sessionName = null)
122
{
123
$is_valid =
false
;
124
if
(!empty(
$_SESSION
[
"{$sessionName}_code"
])) {
125
$func = !empty($this->
config
[
'casesensitive'
]) ?
'strcmp'
:
'strcasecmp'
;
126
$is_valid = !$func(trim(@$_POST[$sessionName]),
$_SESSION
[
"{$sessionName}_code"
]);
127
}
128
return
$is_valid;
129
}
130
134
public
function
destroyGarbage
()
135
{
136
return
true
;
137
}
138
139
}
$_SESSION
$_SESSION['RF']["verify"]
Definition:
dialog.php:4
XoopsCaptchaMethod\verify
verify($sessionName=null)
Definition:
xoopscaptchamethod.php:121
XoopsCaptchaMethod\renderValidationJS
renderValidationJS()
Definition:
xoopscaptchamethod.php:109
config
XoopsCaptchaMethod
Definition:
xoopscaptchamethod.php:32
XoopsCaptchaMethod\isActive
isActive()
Definition:
xoopscaptchamethod.php:64
XoopsCaptchaMethod\render
render()
Definition:
xoopscaptchamethod.php:101
XoopsCaptchaMethod\$config
$config
Definition:
xoopscaptchamethod.php:42
XoopsCaptchaMethod\__construct
__construct($handler=null)
Definition:
xoopscaptchamethod.php:54
XoopsCaptchaMethod\loadConfig
loadConfig($name= '')
Definition:
xoopscaptchamethod.php:76
XoopsCaptchaMethod\destroyGarbage
destroyGarbage()
Definition:
xoopscaptchamethod.php:134
XoopsCaptchaMethod\$code
$code
Definition:
xoopscaptchamethod.php:47
$name
$name
Definition:
force_download.php:15
XoopsCaptchaMethod\$handler
$handler
Definition:
xoopscaptchamethod.php:37
XoopsCaptchaMethod\getCode
getCode()
Definition:
xoopscaptchamethod.php:91
usr64
htdocs
class
captcha
xoopscaptchamethod.php
Generated on Fri May 22 2015 03:06:59 for XOOPS by
1.8.9.1