diff --git a/.gitignore b/.gitignore index 11bb41e15..c4b7f9c39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ data dbconfig.php install.bak +test.php 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/lib/common.lib.php b/lib/common.lib.php index f4dc05874..35b376286 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -19,8 +19,9 @@ function get_microtime() function get_paging($write_pages, $cur_page, $total_page, $url, $add="") { $str = ''; + $str .= ""; if ($cur_page > 1) { - $str .= '처음'.PHP_EOL; + $str .= '처음'.PHP_EOL; } $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; @@ -28,7 +29,7 @@ function get_paging($write_pages, $cur_page, $total_page, $url, $add="") if ($end_page >= $total_page) $end_page = $total_page; - if ($start_page > 1) $str .= '이전'.PHP_EOL; + if ($start_page > 1) $str .= '이전'.PHP_EOL; if ($total_page > 1) { for ($k=$start_page;$k<=$end_page;$k++) { @@ -39,12 +40,12 @@ function get_paging($write_pages, $cur_page, $total_page, $url, $add="") } } - if ($total_page > $end_page) $str .= '다음'.PHP_EOL; + if ($total_page > $end_page) $str .= '다음'.PHP_EOL; if ($cur_page < $total_page) { - $str .= '맨끝'.PHP_EOL; + $str .= '맨끝'.PHP_EOL; } - $str .= ""; + $str .= ""; return $str; } diff --git a/plugin/captcha/captcha.lib.php b/plugin/captcha/captcha.lib.php index 27ea46418..1b581251a 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 .= '음성듣기'; + $html .= ''; + $html .= ''; + $html .= '

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

'; + $html .= '
'; + return $html; } @@ -170,4 +169,10 @@ function chk_captcha($input_name) } return true; } -?> \ No newline at end of file + +// captcha javascript code +function captcha_js($element) +{ + return "if (!check_captcha({$element})) { return false; }"; +} +?> diff --git a/plugin/ckeditor/ckeditor.js b/plugin/ckeditor/ckeditor.js index 90204316d..b8f3d548c 100644 --- a/plugin/ckeditor/ckeditor.js +++ b/plugin/ckeditor/ckeditor.js @@ -844,4 +844,47 @@ l;if(!(a in m||this.typing)||!c&&!e&&(b||g)||c&&!d){var f=new i(this.editor),h=t this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,c,b){if(this.locked)return!1;var d=this.snapshots;c||(c=new i(this.editor));if(!1===c.contents||this.currentImage&&c.equals(this.currentImage,a))return!1;d.splice(this.index+1,d.length-this.index-1);d.length==this.limit&&d.shift();this.index=d.push(c)-1;this.currentImage=c;!1!==b&&this.fireChange();return!0},restoreImage:function(a){var c= this.editor,b;a.bookmarks&&(c.focus(),b=c.getSelection());this.locked=1;this.editor.loadSnapshot(a.contents);a.bookmarks?b.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=0;this.index=a.index;this.update();this.fireChange()},getNextImage:function(a){var c=this.snapshots,b=this.currentImage,d;if(b)if(a)for(d=this.index-1;0<=d;d--){if(a=c[d],!b.equals(a,!0))return a.index=d,a}else for(d=this.index+1;d. +ev.editor.dataProcessor.htmlFilter.addRules( + { + elements: + { + $: function (element) { + // Output dimensions of images as width and height + if (element.name == 'img') { + var style = element.attributes.style; + + if (style) { + // Get the width from the style. + var match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec(style), + width = match && match[1]; + + // Get the height from the style. + match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec(style); + var height = match && match[1]; + + if (width) { + element.attributes.style = element.attributes.style.replace(/(?:^|\s)width\s*:\s*(\d+)px;?/i, ''); + element.attributes.width = width; + } + + if (height) { + element.attributes.style = element.attributes.style.replace(/(?:^|\s)height\s*:\s*(\d+)px;?/i, ''); + element.attributes.height = height; + } + } + } + + + + if (!element.attributes.style) + delete element.attributes.style; + + return element; + } + } + }); +}); \ 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/list.skin.php b/skin/board/neo/list.skin.php index 8cf815cdd..d4bd20a98 100644 --- a/skin/board/neo/list.skin.php +++ b/skin/board/neo/list.skin.php @@ -11,50 +11,26 @@ if ($is_nogood) $colspan++;

-
게시판 관리자 바로가기
+
-
- -
- -
- - Total - 페이지 -
- -
-
- 게시물 검색 - -
- - - ;"> + + - - - - - -
- -
+ + Total + 페이지 +
@@ -136,15 +112,15 @@ for ($i=0; $i -
+ +
+ 게시물 검색 + +
+ + + + + + + + + +
+
+ + - +
+ + + +
diff --git a/skin/board/neo/write.skin.php b/skin/board/neo/write.skin.php index 704b56ed9..e4cfaccf1 100644 --- a/skin/board/neo/write.skin.php +++ b/skin/board/neo/write.skin.php @@ -106,61 +106,33 @@ if ($option) { - + - + 글자 - - + - "> + "> - - + - 파일 #1 - - - - - - - 파일 #2 - - - - - - - 파일 #3 - - - - - - - 파일 #4 - - - - - - - 파일 #5 + 파일 # + + @@ -168,9 +140,7 @@ if ($option) { - +
@@ -253,14 +223,13 @@ function fwrite_submit(f) } */ - + + var subject = ""; var content = ""; $.ajax({ - url: bbs_path+"/filter.ajax.php", + url: g4_bbs_path+"/filter.ajax.php", type: "POST", data: { "subject": f.wr_subject.value, @@ -290,9 +259,7 @@ function fwrite_submit(f) return false; } - + return true; } diff --git a/skin/connect/neo/current_connect.skin.php b/skin/connect/neo/current_connect.skin.php index efa06fcfc..7b224ee71 100644 --- a/skin/connect/neo/current_connect.skin.php +++ b/skin/connect/neo/current_connect.skin.php @@ -8,7 +8,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 번호 이름 - 링크 + 위치 diff --git a/skin/member/neo/register_form.skin.php b/skin/member/neo/register_form.skin.php index 491d21969..65dafc332 100644 --- a/skin/member/neo/register_form.skin.php +++ b/skin/member/neo/register_form.skin.php @@ -41,7 +41,7 @@ var member_skin_path = ""; - title="이름"> + title="이름"> 공백없이 한글만 입력하세요."; } ?> @@ -50,7 +50,7 @@ var member_skin_path = ""; - + 공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)
@@ -64,7 +64,7 @@ var member_skin_path = ""; - " maxlength="100" value='' title="E-mail"> + " maxlength="100" size="50" value='' title="E-mail"> @@ -162,7 +162,7 @@ var member_skin_path = ""; - + @@ -195,7 +195,7 @@ var member_skin_path = ""; - +
diff --git a/tail.sub.php b/tail.sub.php index 73fd14172..4a30f2741 100644 --- a/tail.sub.php +++ b/tail.sub.php @@ -12,17 +12,17 @@ $tmp_row = sql_fetch($tmp_sql); //sql_query(" lock table $g4['login_table'] write ", false); if ($tmp_row['cnt']) { - $tmp_sql = " update {$g4['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '{$g4['time_ymdhis']}', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' "; - sql_query($tmp_sql, FALSE); + $tmp_sql = " update {$g4['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '{$g4['time_ymdhis']}', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' "; + sql_query($tmp_sql, FALSE); } else { - $tmp_sql = " insert into {$g4['login_table']} ( lo_ip, mb_id, lo_datetime, lo_location, lo_url ) values ( '{$_SERVER['REMOTE_ADDR']}', '{$member['mb_id']}', '{$g4['time_ymdhis']}', '$lo_location', '$lo_url' ) "; - sql_query($tmp_sql, FALSE); + $tmp_sql = " insert into {$g4['login_table']} ( lo_ip, mb_id, lo_datetime, lo_location, lo_url ) values ( '{$_SERVER['REMOTE_ADDR']}', '{$member['mb_id']}', '{$g4['time_ymdhis']}', '$lo_location', '$lo_url' ) "; + sql_query($tmp_sql, FALSE); - // 시간이 지난 접속은 삭제한다 - sql_query(" delete from {$g4['login_table']} where lo_datetime < '".date("Y-m-d H:i:s", $g4['server_time'] - (60 * $config['cf_login_minutes']))."' "); + // 시간이 지난 접속은 삭제한다 + sql_query(" delete from {$g4['login_table']} where lo_datetime < '".date("Y-m-d H:i:s", $g4['server_time'] - (60 * $config['cf_login_minutes']))."' "); - // 부담(overhead)이 있다면 테이블 최적화 - //$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4['login_table']' "); - //if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] "); + // 부담(overhead)이 있다면 테이블 최적화 + //$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4['login_table']' "); + //if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] "); } ?> \ No newline at end of file diff --git a/test.php b/test.php index 9ec5350cf..7e400e7d1 100644 --- a/test.php +++ b/test.php @@ -29,7 +29,9 @@ outline:0; - + + +