1: <?php
 2: /**
 3:  * Xcaptcha extension module
 4:  * You may not change or alter any portion of this comment or credits
 5:  * of supporting developers from this source code or any supporting source code
 6:  * which is considered copyrighted (c) material of the original comment or credit authors.
 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:  * @copyright       XOOPS Project (http://xoops.org)
12:  * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
13:  * @package         xcaptcha
14:  * @since           2.6.0
15:  * @author          Laurent JEN (Aka DuGris)
16:  * @version         $Id$
17:  */
18: 
19: class XcaptchaText 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('text');
29:         $this->plugin = 'text';
30:     }
31: 
32:     function VerifyData()
33:     {
34:         $system = System::getInstance();
35:         $config = array();
36:         $_POST['num_chars'] = $system->cleanVars($_POST, 'num_chars', 6, 'int');
37:         foreach (array_keys($this->config) as $key) {
38:             $config[$key] = $_POST[$key];
39:         }
40:         return $config;
41:     }
42: }
43: