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:

text.php
26 26
// Must include code to stop this file being accessed directly
27 27
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
28 28

  
29
global $admin;
29 30
$name = 'text';
30 31
$file = WB_PATH."/temp/.captcha_$name.txt";
31 32

  
......
44 45
while($s = current($content)) {
45 46
	// get question
46 47
	$s=trim(rtrim(rtrim($s,"\n"),"\r")); // remove newline
48
	$s=$admin->strip_slashes($s);
47 49
	if($s=='' OR $s{0}!='?') {
48 50
		next($content);
49 51
		continue;
......
58 60
	// get answer
59 61
	$s=next($content);
60 62
	$s=trim(rtrim(rtrim($s,"\n"),"\r")); // remove newline
63
	$s=$admin->strip_slashes($s);
61 64
	if(isset($s{0}) && $s{0}!='!') continue;
62 65
	$a=substr($s,1);
63 66
	$qa[$lang][$q]=$a;
......
87 90

  
88 91
echo $k;
89 92

  
90
?>
93
?>

Also available in: Unified diff