diff --git a/plugin/kcaptcha/kcaptcha.lib.php b/plugin/kcaptcha/kcaptcha.lib.php index 74d9054fb..511d0352d 100644 --- a/plugin/kcaptcha/kcaptcha.lib.php +++ b/plugin/kcaptcha/kcaptcha.lib.php @@ -31,10 +31,10 @@ class KCAPTCHA{ } } closedir($handle); - } - + } + $alphabet_length=strlen($alphabet); - + do{ /* // generating random keystring @@ -132,7 +132,7 @@ class KCAPTCHA{ $img2=imagecreatetruecolor($width, $height+($show_credits?12:0)); $foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]); $background=imagecolorallocate($img2, $background_color[0], $background_color[1], $background_color[2]); - imagefilledrectangle($img2, 0, 0, $width-1, $height-1, $background); + imagefilledrectangle($img2, 0, 0, $width-1, $height-1, $background); imagefilledrectangle($img2, 0, $height, $width-1, $height+12, $foreground); $credits=empty($credits)?$_SERVER['HTTP_HOST']:$credits; imagestring($img2, 2, $width/2-imagefontwidth(2)*strlen($credits)/2, $height-2, $credits, $background); @@ -203,12 +203,12 @@ class KCAPTCHA{ imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue)); } } - - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header('Cache-Control: no-store, no-cache, must-revalidate'); - header('Cache-Control: post-check=0, pre-check=0', FALSE); + + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Cache-Control: no-store, no-cache, must-revalidate'); + header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); - + if(function_exists("imagejpeg")){ header("Content-Type: image/jpeg"); imagejpeg($img2, null, $jpeg_quality); @@ -240,10 +240,10 @@ function captcha_html($class="captcha") $html .= "\n".''; $html .= "\n".'