Project

General

Profile

« Previous | Next » 

Revision 628

Added by thorn almost 17 years ago

Text-CAPTCHA: added description how to input questions and answers.

View differences:

tool.php
53 53

  
54 54
	// save text-captchas
55 55
	if($_POST['captcha_type'] == 'text') {
56
		$text_qa=$admin->add_slashes($_POST['text_qa']);
57
		if($fh = fopen(WB_PATH.'/temp/.captcha_text.txt', 'wb')) {
58
			fwrite($fh, $text_qa);
59
			fclose($fh);
56
		$text_qa=$_POST['text_qa'];
57
		if(strpos($text_qa, '### example ###') === FALSE) {
58
			$text_qa=$admin->add_slashes($text_qa);
59
			if($fh = fopen(WB_PATH.'/temp/.captcha_text.txt', 'wb')) {
60
				fwrite($fh, $text_qa);
61
				fclose($fh);
62
			}
60 63
		}
61 64
	}
62 65
	
......
82 85
			}
83 86
		}
84 87
	}
88
	if($text_qa == '')
89
		$text_qa = $MOD_CAPTCHA_CONTROL['CAPTCHA_TEXT_DESC'];
85 90

  
86 91
// script to load image
87 92
?>

Also available in: Unified diff