반응형 대비 캡챠 출력 코드 수정
This commit is contained in:
@ -31,10 +31,10 @@ class KCAPTCHA{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
$alphabet_length=strlen($alphabet);
|
$alphabet_length=strlen($alphabet);
|
||||||
|
|
||||||
do{
|
do{
|
||||||
/*
|
/*
|
||||||
// generating random keystring
|
// generating random keystring
|
||||||
@ -132,7 +132,7 @@ class KCAPTCHA{
|
|||||||
$img2=imagecreatetruecolor($width, $height+($show_credits?12:0));
|
$img2=imagecreatetruecolor($width, $height+($show_credits?12:0));
|
||||||
$foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]);
|
$foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]);
|
||||||
$background=imagecolorallocate($img2, $background_color[0], $background_color[1], $background_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);
|
imagefilledrectangle($img2, 0, $height, $width-1, $height+12, $foreground);
|
||||||
$credits=empty($credits)?$_SERVER['HTTP_HOST']:$credits;
|
$credits=empty($credits)?$_SERVER['HTTP_HOST']:$credits;
|
||||||
imagestring($img2, 2, $width/2-imagefontwidth(2)*strlen($credits)/2, $height-2, $credits, $background);
|
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));
|
imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||||
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
|
||||||
if(function_exists("imagejpeg")){
|
if(function_exists("imagejpeg")){
|
||||||
header("Content-Type: image/jpeg");
|
header("Content-Type: image/jpeg");
|
||||||
imagejpeg($img2, null, $jpeg_quality);
|
imagejpeg($img2, null, $jpeg_quality);
|
||||||
@ -240,10 +240,10 @@ function captcha_html($class="captcha")
|
|||||||
$html .= "\n".'<script src="'.G5_CAPTCHA_URL.'/kcaptcha.js"></script>';
|
$html .= "\n".'<script src="'.G5_CAPTCHA_URL.'/kcaptcha.js"></script>';
|
||||||
$html .= "\n".'<fieldset id="captcha" class="'.$class.'">';
|
$html .= "\n".'<fieldset id="captcha" class="'.$class.'">';
|
||||||
$html .= "\n".'<legend><label for="captcha_key">자동등록방지</label></legend>';
|
$html .= "\n".'<legend><label for="captcha_key">자동등록방지</label></legend>';
|
||||||
if (G5_IS_MOBILE) $html .= '<audio src="#" id="captcha_audio" controls></audio>';
|
if (is_mobile()) $html .= '<audio src="#" id="captcha_audio" controls></audio>';
|
||||||
//$html .= "\n".'<img src="#" alt="" id="captcha_img">';
|
//$html .= "\n".'<img src="#" alt="" id="captcha_img">';
|
||||||
$html .= "\n".'<img src="javascript:void(0);" alt="" id="captcha_img">';
|
$html .= "\n".'<img src="javascript:void(0);" alt="" id="captcha_img">';
|
||||||
if (!G5_IS_MOBILE) $html .= "\n".'<button type="button" id="captcha_mp3"><span></span>숫자음성듣기</button>';
|
if (!is_mobile()) $html .= "\n".'<button type="button" id="captcha_mp3"><span></span>숫자음성듣기</button>';
|
||||||
$html .= "\n".'<button type="button" id="captcha_reload"><span></span>새로고침</button>';
|
$html .= "\n".'<button type="button" id="captcha_reload"><span></span>새로고침</button>';
|
||||||
$html .= '<input type="text" name="captcha_key" id="captcha_key" required class="captcha_box required" size="6" maxlength="6">';
|
$html .= '<input type="text" name="captcha_key" id="captcha_key" required class="captcha_box required" size="6" maxlength="6">';
|
||||||
$html .= "\n".'<span id="captcha_info">자동등록방지 숫자를 순서대로 입력하세요.</span>';
|
$html .= "\n".'<span id="captcha_info">자동등록방지 숫자를 순서대로 입력하세요.</span>';
|
||||||
|
|||||||
Reference in New Issue
Block a user