Project

General

Profile

« Previous | Next » 

Revision 1371

Added by Dietmar over 13 years ago

captcha patch (Tks to FrankH)

View differences:

calc_text.php
34 34
	require_once(WB_PATH.'/modules/captcha_control/languages/'.LANGUAGE .'.php');
35 35
}
36 36

  
37
$_SESSION['captcha'] = '';
37
$_SESSION['captcha'.$sec_id] = '';
38 38
mt_srand((double)microtime()*1000000);
39 39
$n = mt_rand(1,3);
40 40
switch ($n) {
41 41
	case 1:
42 42
		$x = mt_rand(1,9);
43 43
		$y = mt_rand(1,9);
44
		$_SESSION['captcha'] = $x + $y;
44
		$_SESSION['captcha'.$sec_id] = $x + $y;
45 45
		$cap = "$x {$MOD_CAPTCHA['ADDITION']} $y"; 
46 46
		break; 
47 47
	case 2:
48 48
		$x = mt_rand(10,20);
49 49
		$y = mt_rand(1,9);
50
		$_SESSION['captcha'] = $x - $y; 
50
		$_SESSION['captcha'.$sec_id] = $x - $y; 
51 51
		$cap = "$x {$MOD_CAPTCHA['SUBTRAKTION']} $y"; 
52 52
		break;
53 53
	case 3:
54 54
		$x = mt_rand(2,10);
55 55
		$y = mt_rand(2,5);
56
		$_SESSION['captcha'] = $x * $y; 
56
		$_SESSION['captcha'.$sec_id] = $x * $y; 
57 57
		$cap = "$x {$MOD_CAPTCHA['MULTIPLIKATION']} $y"; 
58 58
		break;
59 59
}
60 60
echo $cap;
61
?>
61
?>

Also available in: Unified diff