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 @@ = $board['bo_html_leve $is_dhtml_editor = false; } +$captcha_html = ""; +if ($is_guest) { + $captcha_html = captcha_html('wr_key'); +} + $is_mail = false; if ($config['cf_email_use'] && $board['bo_use_email']) $is_mail = true; @@ -247,6 +253,8 @@ if ($board['bo_use_file_content']) { $is_file_content = true; } +$file_count = (int)$board['bo_upload_count']; + $name = ""; $email = ""; $homepage = ""; @@ -350,34 +358,6 @@ if ($is_admin) { include_once($g4['path'].'/head.sub.php'); include_once('./board_head.php'); -//-------------------------------------------------------------------------- -// 가변 파일 -$file_script = ''; -$file_length = -1; -// 수정의 경우 파일업로드 필드가 가변적으로 늘어나야 하고 삭제 표시도 해주어야 합니다. -if ($w == 'u') { - for ($i=0; $i<$file['count']; $i++) { - $row = sql_fetch(" select bf_file, bf_content from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$i}' "); - if ($row['bf_file']) { - $file_script .= 'add_file("'.$file[$i]['source'].'('.$file[$i]['size'].') 파일 삭제'; - if ($is_file_content) - //$file_script .= '
'; - // 첨부파일설명에서 ' 또는 " 입력되면 오류나는 부분 수정 - $file_script .= '
'; - $file_script .= '\");'.PHP_EOL; - } - else - $file_script .= 'add_file("");'.PHP_EOL; - } - $file_length = $file['count'] - 1; -} - -if ($file_length < 0) { - $file_script .= 'add_file("");'.PHP_EOL; - $file_length = 0; -} -//-------------------------------------------------------------------------- - if ($g4['https_url']) $action_url = "{$g4['https_url']}/{$g4['bbs']}/write_update.php"; else diff --git a/bbs/write_update.php b/bbs/write_update.php index 77669e82c..b010365f7 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -1,4 +1,5 @@ lib); +} else { + unset($_SESSION['ss_captcha_use']); } ?> \ No newline at end of file diff --git a/head.sub.php b/head.sub.php index 143df8691..fc3584c1e 100644 --- a/head.sub.php +++ b/head.sub.php @@ -58,6 +58,7 @@ header("Pragma: no-cache"); // HTTP/1.0 // 자바스크립트에서 사용하는 전역변수 선언 var g4_path = ""; var g4_bbs = ""; +var g4_bbs_path = ""; var g4_bbs_img = ""; var g4_url = ""; var g4_is_member = ""; diff --git a/plugin/captcha/captcha.lib.php b/plugin/captcha/captcha.lib.php index 27ea46418..57e0a5763 100644 --- a/plugin/captcha/captcha.lib.php +++ b/plugin/captcha/captcha.lib.php @@ -137,25 +137,24 @@ $captcha->run(); */ // 캡챠이미지는 한개만 사용 가능함. -function get_captcha($input_name, $captcha_no) +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 = '
'; - $code .= '자동등록방지'; - //$code .= '자동등록방지 이미지'; - $code .= ''; - $code .= '새로고침'; - $code .= 'wav'; - $code .= ''; - $code .= ''; - $code .= '

이미지의 숫자를 순서대로 입력하세요. 새로고침을 클릭하시면 새로운 숫자가 나타납니다.

'; - $code .= '
'; - return $code; + $html = '
'; + $html .= '자동등록방지'; + //$html .= '자동등록방지 이미지'; + $html .= ''; + $html .= '새로고침'; + $html .= 'wav'; + $html .= ''; + $html .= ''; + $html .= '

이미지의 숫자를 순서대로 입력하세요. 새로고침을 클릭하시면 새로운 숫자가 나타납니다.

'; + $html .= '
'; + return $html; } @@ -170,4 +169,10 @@ function chk_captcha($input_name) } return true; } + +// captcha javascript code +function captcha_js($element) +{ + return "if (!check_captcha({$element})) { return false; }"; +} ?> \ No newline at end of file diff --git a/plugin/ckeditor/ckeditor.lib.php b/plugin/ckeditor/ckeditor.lib.php index 74d9e214b..5b00643e4 100644 --- a/plugin/ckeditor/ckeditor.lib.php +++ b/plugin/ckeditor/ckeditor.lib.php @@ -23,7 +23,7 @@ function editor_getdata($id) function editor_empty($id, $textarea_name="내용을") { if (defined('_EDITOR_')) - return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n"; + return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); CKEDITOR.instances.{$id}.focus(); return false; }\n"; else return ""; } diff --git a/skin/board/neo/view.skin.php b/skin/board/neo/view.skin.php index 1aa8becbc..4a27762a6 100644 --- a/skin/board/neo/view.skin.php +++ b/skin/board/neo/view.skin.php @@ -25,7 +25,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 - +

첨부파일

- +