captcha 코드 변경중

This commit is contained in:
gnuboard
2013-01-10 11:31:59 +09:00
parent c27361cb9c
commit 90ecd50767
5 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,5 @@
<?
define('_CAPTCHA_', true);
include_once('./_common.php');
if (!$board['bo_table']) {

View File

@ -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');
// 코멘트를 새창으로 여는 경우 세션값이 없으므로 생성한다.

View File

@ -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;

View File

@ -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 = '<fieldset id="captcha'.$captcha_class.'">';
$code = '<fieldset id="captcha'.$captcha_id_suffix.'">';
$code .= '<legend>자동등록방지</legend>';
//$code .= '<img src="" id="captcha" alt="자동등록방지 이미지" title="이미지를 클릭하시면 숫자가 바뀝니다.">';
$code .= '<iframe id="captcha_iframe" name="captcha_iframe" src="'.$g4['path'].'/plugin/captcha/run.php" width="80" height="25" frameborder="0" scrolling="no"></iframe>';

View File

@ -75,8 +75,7 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
<? if ($is_guest) { ?>
<label for="wr_name">이름</label> <input type="text" id="wr_name" name="wr_name" class="fieldset_input" maxLength="20" size="10" required>
<label for="wr_password">패스워드</label> <input type="password" id="wr_password" name="wr_password" class="fieldset_input" maxLength="20" size="10" required>
<img id="kcaptcha_image" alt="" />
<input type="text" name="wr_key" class="fieldset_input" title="왼쪽의 글자를 입력하세요." size="10" required>
<? echo $captcha_html; ?>
<? } ?>
<input type="checkbox" id="wr_secret" name="wr_secret" value="secret">
<label for="wr_secret">비밀글</label>