From 888c2749f2c1e978f3bbc7714f0ad63972076483 Mon Sep 17 00:00:00 2001 From: whitedot Date: Thu, 10 Jan 2013 10:54:36 +0900 Subject: [PATCH 01/22] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90:=20=EA=B2=8C?= =?UTF-8?q?=EC=8B=9C=ED=8C=90=EC=8A=A4=ED=82=A8=20=EC=9D=BD=EA=B8=B0=20?= =?UTF-8?q?=EB=B3=B8=EB=AC=B8=20=ED=95=98=EB=8B=A8=20=EC=97=AC=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/def.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/css/def.css b/css/def.css index 9e445bc1b..84bf880e4 100644 --- a/css/def.css +++ b/css/def.css @@ -79,7 +79,7 @@ h6 {margin:0 0 20px} #tnb a:focus {background:#f9f9f5} /* 전체검색 */ -#hdsch {position:absolute;top:77px;right:0;margin:0;padding:0;width:219px;border:1px solid #ccc;border-top:0;border-right:0;background:#fff} +#hdsch {z-index:3;position:absolute;top:77px;right:0;margin:0;padding:0;width:219px;border:1px solid #ccc;border-top:0;border-right:0;background:#fff} #hdsch legend {position:absolute;padding:0;width:0;height:0;border:0;overflow:hidden} #hdsch_stx {margin:5px 0 5px 5px;padding:0 5px;height:25px;width:176px;border:0;background:transparent;font-size:1em;line-height:1.4em} #hdsch_stx:focus {background:#464649;color:#fff} @@ -307,7 +307,7 @@ h6 {margin:0 0 20px} #bo_v_article {zoom:1} #bo_v_article:after {display:block;visibility:hidden;clear:both;content:""} #bo_v_article h1 {margin:0;padding:0;height:0;overflow:hidden} -#bo_v_article p {padding:0} +#bo_v_article p {padding:0 0 10px} #bo_v_file {border-bottom:1px solid #666;background:#555;font-size:0.75em} #bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_file ul {margin:0;padding:0;list-style:none} @@ -348,7 +348,7 @@ h6 {margin:0 0 20px} #bo_vc_w {position:relative;margin-top:10px;zoom:1} #bo_vc_w:after {display:block;visibility:hidden;clear:both;content:""} #bo_vc_w fieldset {margin:0;padding:0;border:0;background:transparent} -#bo_vc_w textarea {margin:10px 0;width:98%;height:50px} +#bo_vc_w textarea {display:block;margin:10px 70px 10px 0;width:100%;height:50px} #bo_vc_w .fieldset_submit {float:right;margin:0 2% 0 0} #bo_vc_w #char_cnt {position:absolute;top:0;right:0} From b370acf97a3befde8f23ebe1d9ae399343f1d5e4 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Thu, 10 Jan 2013 10:57:44 +0900 Subject: [PATCH 02/22] =?UTF-8?q?ckeditor,=20captcha=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/write.php | 36 +++++---------------- bbs/write_update.php | 3 +- extend/captcha.extend.php | 2 ++ head.sub.php | 1 + plugin/captcha/captcha.lib.php | 8 ++++- plugin/ckeditor/ckeditor.lib.php | 2 +- skin/board/neo/view.skin.php | 4 +-- skin/board/neo/write.skin.php | 55 +++++++------------------------- 8 files changed, 34 insertions(+), 77 deletions(-) diff --git a/bbs/write.php b/bbs/write.php index 9b96575f6..49e458867 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -1,4 +1,5 @@ = $board['bo_html_leve $is_dhtml_editor = false; } +$captcha_html = ""; +if ($is_guest) { + $captcha_html = get_captcha('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..4313ad805 100644 --- a/plugin/captcha/captcha.lib.php +++ b/plugin/captcha/captcha.lib.php @@ -137,7 +137,7 @@ $captcha->run(); */ // 캡챠이미지는 한개만 사용 가능함. -function get_captcha($input_name, $captcha_no) +function get_captcha($input_name, $captcha_no=1) { global $g4; @@ -170,4 +170,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; // 개별 페이지 접근 불가 - +

첨부파일

    @@ -51,7 +51,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
- +