XOOPS
2.6.0
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
recaptcha.php
Go to the documentation of this file.
1
<?php
19
class
XcaptchaRecaptcha
extends
Xcaptcha
20
{
21
public
$config
= array();
22
23
public
$plugin
;
24
25
function
__construct
()
26
{
27
$this->xcaptcha_handler =
Xcaptcha::getInstance
();
28
$this->
config
= $this->xcaptcha_handler->loadConfig(
'recaptcha'
);
29
$this->plugin =
'recaptcha'
;
30
}
31
32
function
VerifyData
()
33
{
34
$xoops
=
Xoops::getInstance
();
35
$default_lang = array_search(ucfirst(
$xoops
->getConfig(
'language'
)), $this->
getLanguages
());
36
$default_lang = (!$default_lang) ?
'en'
: $default_lang;
37
38
$system
=
System::getInstance
();
39
$config
= array();
40
$_POST[
'private_key'
] =
$system
->CleanVars($_POST,
'private_key'
,
'Your private key'
,
'string'
);
41
$_POST[
'public_key'
] =
$system
->CleanVars($_POST,
'public_key'
,
'Your public key'
,
'string'
);
42
$_POST[
'theme'
] =
$system
->CleanVars($_POST,
'theme'
,
'red'
,
'string'
);
43
$_POST[
'lang'
] =
$system
->CleanVars($_POST,
'lang'
, $default_lang,
'string'
);
44
foreach
(array_keys($this->
config
) as $key) {
45
$config
[$key] = $_POST[$key];
46
}
47
return
$config
;
48
}
49
50
function
getThemes
()
51
{
52
return
array(
53
'red'
=>
'RED (default theme)'
,
'white'
=>
'WHITE'
,
'blackglass'
=>
'BLACKGLASS'
,
'clean'
=>
'CLEAN'
,
54
);
55
}
56
57
function
getLanguages
()
58
{
59
return
array(
60
'en'
=>
'English'
,
'nl'
=>
'Dutch'
,
'fr'
=>
'French'
,
'de'
=>
'German'
,
'it'
=>
'Italian'
,
'pt'
=>
'Portuguese'
,
61
'ru'
=>
'Russian'
,
'es'
=>
'Spanish'
,
'tr'
=>
'Turkish'
,
62
);
63
}
64
}
$system
$system
Definition:
page_extensioninstaller.php:74
XcaptchaRecaptcha\__construct
__construct()
Definition:
recaptcha.php:25
XcaptchaRecaptcha\getLanguages
getLanguages()
Definition:
recaptcha.php:57
System\getInstance
static getInstance()
Definition:
system.php:46
Xoops\getInstance
static getInstance()
Definition:
Xoops.php:160
XcaptchaRecaptcha\$config
$config
Definition:
recaptcha.php:21
config
XcaptchaRecaptcha
Definition:
recaptcha.php:19
XcaptchaRecaptcha\VerifyData
VerifyData()
Definition:
recaptcha.php:32
$xoops
$xoops
Definition:
admin.php:25
Xcaptcha\getInstance
static getInstance()
Definition:
xcaptcha.php:40
XcaptchaRecaptcha\getThemes
getThemes()
Definition:
recaptcha.php:50
XcaptchaRecaptcha\$plugin
$plugin
Definition:
recaptcha.php:23
Xcaptcha
usr64
htdocs
modules
xcaptcha
plugins
recaptcha.php
Generated on Fri May 22 2015 03:06:59 for XOOPS by
1.8.9.1