1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
18:
19: class XcaptchaImage extends Xcaptcha
20: {
21: public $config = array();
22:
23: public $plugin;
24:
25: public function __construct()
26: {
27: $this->xcaptcha_handler = Xcaptcha::getInstance();
28: $this->config = $this->xcaptcha_handler->loadConfig('image');
29: $this->plugin = 'image';
30: }
31:
32: public function VerifyData()
33: {
34: $system = System::getInstance();
35: $config = array();
36: $_POST['num_chars'] = $system->cleanVars($_POST, 'num_chars', 6, 'int');
37: $_POST['casesensitive'] = $system->cleanVars($_POST, 'casesensitive', false, 'boolean');
38: $_POST['fontsize_min'] = $system->cleanVars($_POST, 'fontsize_min', 10, 'int');
39: $_POST['fontsize_max'] = $system->cleanVars($_POST, 'fontsize_max', 24, 'int');
40: $_POST['background_type'] = $system->cleanVars($_POST, 'background_type', 0, 'int');
41: $_POST['background_num'] = $system->cleanVars($_POST, 'background_num', 50, 'int');
42: $_POST['polygon_point'] = $system->cleanVars($_POST, 'polygon_point', 3, 'int');
43: $_POST['skip_characters'] = $system->cleanVars($_POST, 'skip_characters', 'o|0|i|l|1', 'string');
44: $_POST['skip_characters'] = explode('|', $_POST['skip_characters']);
45: foreach (array_keys($this->config) as $key) {
46: $config[$key] = $_POST[$key];
47: }
48: return $config;
49: }
50: }
51: