Revision 609
Added by thorn almost 17 years ago
captcha.php | ||
---|---|---|
88 | 88 |
if(!function_exists('call_captcha')) { |
89 | 89 |
function call_captcha() { |
90 | 90 |
global $MOD_CAPTCHA; |
91 |
|
|
91 |
$t = time(); |
|
92 |
$_SESSION['captcha_time'] = $t; |
|
93 |
|
|
92 | 94 |
switch(CAPTCHA_TYPE) { |
93 | 95 |
// two special cases |
94 | 96 |
case 'calc_text': // calculation as text |
... | ... | |
99 | 101 |
break; |
100 | 102 |
case 'calc_image': // calculation with image (old captcha) |
101 | 103 |
?> |
102 |
<img src="<?php echo WB_URL.'/include/captcha/captchas/calc_image.php?t='.time(); ?>" align="middle" alt="Captcha" /> =
|
|
104 |
<img src="<?php echo WB_URL."/include/captcha/captchas/calc_image.php?t=$t"; ?>" align="middle" alt="Captcha" /> =
|
|
103 | 105 |
<input type="text" name="captcha" maxlength="5" style="width:20px" /> <?php echo $MOD_CAPTCHA['VERIFICATION_INFO_RES']; ?></font> |
104 | 106 |
<?php |
105 | 107 |
break; |
... | ... | |
107 | 109 |
case 'ttf_image': // captcha with varying background and ttf-font |
108 | 110 |
case 'old_image': // old captcha |
109 | 111 |
?> |
110 |
<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.'.php?t='.time(); ?>" align="middle" alt="Captcha" />
|
|
112 |
<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t"; ?>" align="middle" alt="Captcha" />
|
|
111 | 113 |
<input type="text" name="captcha" maxlength="5" style="width:50px" /> <?php echo $MOD_CAPTCHA['VERIFICATION_INFO_TEXT']; ?></font> |
112 | 114 |
<?php |
113 | 115 |
break; |
Also available in: Unified diff
Added preview-images for CAPTCHA. Improved security: CAPTCHAS can't be loaded from outside WB