diff --git a/bbs/board.php b/bbs/board.php index 88469ff61..938e1ec04 100644 --- a/bbs/board.php +++ b/bbs/board.php @@ -1,4 +1,5 @@ +define('_CAPTCHA_', true); include_once('./_common.php'); if (!$board['bo_table']) { diff --git a/bbs/view_comment.php b/bbs/view_comment.php index 8653dfc66..5248a905c 100644 --- a/bbs/view_comment.php +++ b/bbs/view_comment.php @@ -1,6 +1,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 +$captcha_html = ""; +if ($is_guest) { + $captcha_html = captcha_html('wr_key', '_comment'); +} + @include_once($board_skin_path.'/view_comment.head.skin.php'); // 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다. diff --git a/bbs/write.php b/bbs/write.php index 49e458867..f61c20e37 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -207,7 +207,7 @@ if ($board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_leve $captcha_html = ""; if ($is_guest) { - $captcha_html = get_captcha('wr_key'); + $captcha_html = captcha_html('wr_key'); } $is_mail = false; diff --git a/plugin/captcha/captcha.lib.php b/plugin/captcha/captcha.lib.php index 4313ad805..465949029 100644 --- a/plugin/captcha/captcha.lib.php +++ b/plugin/captcha/captcha.lib.php @@ -137,15 +137,14 @@ $captcha->run(); */ // 캡챠이미지는 한개만 사용 가능함. -function get_captcha($input_name, $captcha_no=1) +function captcha_html($input_name, $captcha_id_suffix='') { global $g4; // 세션생성을 한후 다음페이지에서 해당 세션이 있을때만 올바른 캡챠코드인지 비교합니다. set_session('ss_captcha_use', true); - $captcha_class = str_pad($captcha_no,2,'0',STR_PAD_LEFT);// 캡챠 클래스를 선택할 수 있도록 지운아빠 2012-07-24 - $code = '