From 05d8e355012548609183d27649d63bded8ff0a21 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Sat, 12 Jan 2013 11:58:18 +0900 Subject: [PATCH 1/5] =?UTF-8?q?under=20construction=20=EB=A9=94=EC=84=B8?= =?UTF-8?q?=EC=A7=80=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- head.sub.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/head.sub.php b/head.sub.php index c800b3fa2..fc3584c1e 100644 --- a/head.sub.php +++ b/head.sub.php @@ -1,10 +1,7 @@ Date: Sat, 12 Jan 2013 11:58:36 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EA=B2=80=EC=83=89=EC=97=90=EC=84=9C=20and,?= =?UTF-8?q?=20or=20=EC=A1=B0=EA=B1=B4=EC=9D=84=20and=20=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EA=B3=A0=EC=A0=95=20hidden=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skin/board/neo/list.skin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skin/board/neo/list.skin.php b/skin/board/neo/list.skin.php index c6cb90afc..65da70bf1 100644 --- a/skin/board/neo/list.skin.php +++ b/skin/board/neo/list.skin.php @@ -27,10 +27,11 @@ if ($is_nogood) $colspan++; - + + From 508d060219e83d677181a5383c3d2bc87bcf1bdd Mon Sep 17 00:00:00 2001 From: gnuboard Date: Sat, 12 Jan 2013 15:52:32 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EC=BA=A1=EC=B0=A8=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=EC=99=80=20=EC=BA=A1=EC=B1=A0=EC=9D=8C=EC=84=B1?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=84=20=EB=AF=B8=EB=A6=AC=20=EB=A7=8C?= =?UTF-8?q?=EB=93=A4=EC=96=B4=20=EB=86=93=EA=B3=A0=20img=20src=20=EC=97=90?= =?UTF-8?q?=20=EB=85=B8=EC=B6=9C=ED=95=98=EB=8A=94=20=EB=B0=A9=EC=8B=9D?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/register_form.php | 3 +- config.php | 4 ++ extend/captcha.extend.php | 11 +++- head.sub.php | 3 - lib/common.lib.php | 30 ++++++++++ plugin/captcha/captcha.lib.php | 83 +++++++++++++++++++++++--- plugin/captcha/wav.php | 1 + skin/member/neo/register_form.skin.php | 4 +- test.php | 41 +------------ 9 files changed, 124 insertions(+), 56 deletions(-) diff --git a/bbs/register_form.php b/bbs/register_form.php index 5e996d4c3..150396459 100644 --- a/bbs/register_form.php +++ b/bbs/register_form.php @@ -1,7 +1,7 @@ lib) include_once($captcha->lib); // 불법접근을 막도록 토큰생성 $token = md5(uniqid(rand(), true)); @@ -102,7 +102,6 @@ if ($w == "") { // 회원아이콘 경로 $mb_icon = $g4['path'].'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif'; $member_skin_path = $g4['path'].'/skin/member/'.$config['cf_member_skin']; -$g4['js_file'][] = "{$g4['path']}/plugin/captcha/captcha.js"; include_once('./_head.php'); diff --git a/config.php b/config.php index cad60347a..780bdbdea 100644 --- a/config.php +++ b/config.php @@ -13,6 +13,10 @@ $g4['bbs_path'] = $g4['path'] . '/' . $g4['bbs']; $g4['bbs_img'] = 'img'; $g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img']; +$g4['data_dir'] = 'data'; +$g4['cache_dir'] = 'cache'; +$g4['captcha_dir'] = 'captcha'; + $g4['admin'] = 'adm'; $g4['admin_path'] = $g4['path'] . '/' . $g4['admin']; diff --git a/extend/captcha.extend.php b/extend/captcha.extend.php index c70a26aef..c09359805 100644 --- a/extend/captcha.extend.php +++ b/extend/captcha.extend.php @@ -2,12 +2,17 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (defined('_CAPTCHA_')) { - $captcha = (object)array( - 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", - 'js' => $g4['path']."/plugin/captcha/captcha.js" + $captcha = (object)Array( + 'lib' => $g4['path']."/plugin/captcha/captcha.lib.php", + 'js' => $g4['path']."/plugin/captcha/captcha.js", + 'fonts' => $g4['path']."/plugin/captcha/fonts" ); include_once($captcha->lib); + $g4['js_file'][] = $captcha->js; + + $captcha_obj = new captcha(); + $captcha_obj->run(); } else { unset($_SESSION['ss_captcha_use']); } diff --git a/head.sub.php b/head.sub.php index fc3584c1e..997f9c794 100644 --- a/head.sub.php +++ b/head.sub.php @@ -79,9 +79,6 @@ if (defined('_EDITOR_')) { $g4['js_file'][] = $editor->js; $g4['js_file'][] = $editor->config_js; } -if (defined('_CAPTCHA_')) { - $g4['js_file'][] = $captcha->js; -} ?> - - - js; - $g4['js_file'][] = $editor->config_js; +if (!empty($g4['js_code'])) { + foreach ($g4['js_code'] as $key=>$value) { + echo $value."\n"; + } } ?> - + + + + $value) { echo "\n"; } } - -if (!empty($g4['js_code'])) { - foreach ($g4['js_code'] as $key=>$value) { - echo "\n"; - } -} ?> diff --git a/js/wrest.js b/js/wrest.js index 32e38169f..c909a6932 100644 --- a/js/wrest.js +++ b/js/wrest.js @@ -63,7 +63,8 @@ function wrestHangul(fld) { if (!wrestTrim(fld)) return; - var pattern = /([^가-힣\x20])/i; + //var pattern = /([^가-힣\x20])/i; + var pattern = /([^가-힣\x20])/; if (pattern.test(fld.value)) { if (wrestFld == null) { @@ -79,6 +80,7 @@ function wrestHangul2(fld) if (!wrestTrim(fld)) return; var pattern = /([^가-힣ㄱ-ㅎㅏ-ㅣ\x20])/i; + //var pattern = /([^가-힣ㄱ-ㅎㅏ-ㅣ\x20])/; if (pattern.test(fld.value)) { if (wrestFld == null) { diff --git a/lib/common.lib.php b/lib/common.lib.php index c24fb7423..69d4299c0 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -565,8 +565,10 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op // 검색필드를 구분자로 나눈다. 여기서는 + $tmp = array(); $tmp = explode(",", trim($search_field)); - $field = explode("||", $tmp['0']); - $not_comment = $tmp['1']; + $field = explode("||", $tmp[0]); + $not_comment = ""; + if (!empty($tmp[1])) + $not_comment = $tmp[1]; $str .= "("; for ($i=0; $i= MAX_CAPTCHA_COUNT) { - $_SESSION['ss_captcha_key'] = ''; - echo false; -} else { - if ($_POST['captcha_key'] == $_SESSION['ss_captcha_key']) { - echo true; - } else { - $_SESSION['ss_captcha_cnt'] = $captcha_cnt + 1; - echo false; - } -} -?> \ No newline at end of file diff --git a/plugin/ckeditor/ckeditor.lib.php b/plugin/ckeditor/ckeditor.lib.php deleted file mode 100644 index 5b00643e4..000000000 --- a/plugin/ckeditor/ckeditor.lib.php +++ /dev/null @@ -1,30 +0,0 @@ -$content\n"; - //$str .= "\n"; - return $str; -} - -// textarea 로 값을 넘김 -function editor_getdata($id) -{ - if (defined('_EDITOR_')) - return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n"; - else - return ""; -} - -// textarea 의 값이 비어 있는지 검사 -function editor_empty($id, $textarea_name="내용을") -{ - if (defined('_EDITOR_')) - return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); CKEDITOR.instances.{$id}.focus(); return false; }\n"; - else - return ""; -} -?> \ No newline at end of file diff --git a/skin/board/neo/list.skin.php b/skin/board/neo/list.skin.php index 65da70bf1..0c5fc2671 100644 --- a/skin/board/neo/list.skin.php +++ b/skin/board/neo/list.skin.php @@ -160,18 +160,8 @@ for ($i=0; $i diff --git a/skin/board/neo/write.skin.php b/skin/board/neo/write.skin.php index 0360f8e5b..004412cfa 100644 --- a/skin/board/neo/write.skin.php +++ b/skin/board/neo/write.skin.php @@ -2,12 +2,6 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> - -

@@ -59,7 +53,7 @@ echo $option_hidden; - + @@ -111,9 +105,13 @@ echo $option_hidden; - - 글자 - + '.$content.""; + } + ?> @@ -139,7 +137,7 @@ echo $option_hidden; - +
@@ -147,7 +145,6 @@ echo $option_hidden;
- - - - diff --git a/skin/member/neo/register_form.skin.php b/skin/member/neo/register_form.skin.php index 1429b4fbd..9d04ddc68 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자 이상)
diff --git a/test.php b/test.php index 456361658..07a8925a1 100644 --- a/test.php +++ b/test.php @@ -1,4 +1,6 @@ \ No newline at end of file From 43c0282f463b6fd895a835ca3e71da6b0844328c Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 14 Jan 2013 10:19:00 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EC=BA=98=EB=A6=B0=EB=8D=94=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/calendar.php | 141 ---------------------------- js/common.js | 8 -- skin/member/basic/calendar.skin.php | 105 --------------------- skin/member/neo/calendar.skin.php | 105 --------------------- 4 files changed, 359 deletions(-) delete mode 100644 bbs/calendar.php delete mode 100644 skin/member/basic/calendar.skin.php delete mode 100644 skin/member/neo/calendar.skin.php diff --git a/bbs/calendar.php b/bbs/calendar.php deleted file mode 100644 index a8a675b0b..000000000 --- a/bbs/calendar.php +++ /dev/null @@ -1,141 +0,0 @@ -31, 28, 31, 30 , 31, 30, 31, 31, 30 ,31 ,30, 31); -// 윤년 계산 부분이다. 4년에 한번꼴로 2월이 28일이 아닌 29일이 있다. -if( $yyyy%4 == 0 && $yyyy%100 != 0 || $yyyy%400 == 0 ) - $endday[2] = 29; // 조건에 적합할 경우 28을 29로 변경 - -// 해당월의 1일 -$mktime = mktime(0,0,0,$mm,1,$yyyy); -$dt = getdate(strtotime(date("Y-m-1", $mktime))); - -$dt[wday] = $spacer; - -// 해당월의 마지막 날짜, -//$last_day = date("t", $mktime); -$last_day = $endday[$mm]; - -$yyyy_before = $yyyy; -$mm_before = $mm - 1; -if ($mm_before < 1) -{ - $yyyy_before--; - $mm_before = 12; -} - -$yyyy_after = $yyyy; -$mm_after = $mm + 1; -if ($mm_after > 12) -{ - $yyyy_after++; - $mm_after = 1; -} - -$fr_yyyy = $yyyy - 80; -$to_yyyy = $yyyy + 80; - -$yyyy_before_href = $_SERVER[PHP_SELF].'?yyyy='.($yyyy-1).'&mm='.$mm.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; -$yyyy_after_href = $_SERVER[PHP_SELF].'?yyyy='.($yyyy+1).'&mm='.$mm.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; - -$mm_after_href = $_SERVER[PHP_SELF].'?yyyy='.$yyyy_after.'&mm='.$mm_after.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; -$mm_before_href = $_SERVER[PHP_SELF].'?yyyy='.$yyyy_before.'&mm='.$mm_before.'&cur_date='.$cur_date.'&fld='.$fld.'&delimiter='.$delimiter; - -$yyyy_select = ''; - -$mm_select = ''; - -$member_skin_path = $g4['path'].'/skin/member/.'$config[cf_member_skin]; -include_once($member_skin_path.'/calendar.skin.php'); -?> - - - - diff --git a/js/common.js b/js/common.js index 2e0a781f4..9c4b589ca 100644 --- a/js/common.js +++ b/js/common.js @@ -348,14 +348,6 @@ if (typeof(COMMON_JS) == 'undefined') { // 한번만 실행 win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0"); } - // 달력 창 - function win_calendar(fld, cur_date, delimiter, opt) - { - if (!opt) - opt = "left=50, top=50, width=240, height=230, scrollbars=0,status=0,resizable=0"; - win_open(g4_path+"/" + g4_bbs + "/calendar.php?fld="+fld+"&cur_date="+cur_date+"&delimiter="+delimiter, "winCalendar", opt); - } - // 설문조사 창 function win_poll(url) { diff --git a/skin/member/basic/calendar.skin.php b/skin/member/basic/calendar.skin.php deleted file mode 100644 index 418739d63..000000000 --- a/skin/member/basic/calendar.skin.php +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - -
- <<  - < - - - >  - >> -
- - - - - - - - - - - "; - for ($k=0; $k<7; $k++) - { - $cnt++; - - echo ""; - } - echo "\n"; - if ($day >= $last_day) - break; - } - ?> -
"; - - if ($cnt > $dt[wday]) - { - $day++; - if ($day <= $last_day) - { - $mm2 = substr("0".$mm,-2); - $day2 = substr("0".$day,-2); - - echo "
$day
"; - - if ($k==0) - echo ""; - else if ($k==6) - echo ""; - else - echo ""; - - $tmp_date = $yyyy.substr("0".$mm,-2).substr("0".$day,-2); - - $tmp = $mm2."-".$day2; - if ($nal[$tmp]) - { - $title = trim($nal[$tmp][1]); - //echo $title; - echo ""; - if (trim($nal[$tmp][2]) == "*") - echo ""; - } - - // 오늘이라면 - if ($today[year] == $yyyy && $today[mon] == $mm && $today[mday] == $day) - { - echo ""; - echo ""; - } - // 선택일(넘어온 값) 이라면 - else if ($tmp_date == $cur_date) - { - echo ""; - echo ""; - } - } else - echo " "; - } else - echo " "; - echo "
-
- - ";?> - 오늘 : -
diff --git a/skin/member/neo/calendar.skin.php b/skin/member/neo/calendar.skin.php deleted file mode 100644 index 418739d63..000000000 --- a/skin/member/neo/calendar.skin.php +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - -
- <<  - < - - - >  - >> -
- - - - - - - - - - - "; - for ($k=0; $k<7; $k++) - { - $cnt++; - - echo ""; - } - echo "\n"; - if ($day >= $last_day) - break; - } - ?> -
"; - - if ($cnt > $dt[wday]) - { - $day++; - if ($day <= $last_day) - { - $mm2 = substr("0".$mm,-2); - $day2 = substr("0".$day,-2); - - echo "
$day
"; - - if ($k==0) - echo ""; - else if ($k==6) - echo ""; - else - echo ""; - - $tmp_date = $yyyy.substr("0".$mm,-2).substr("0".$day,-2); - - $tmp = $mm2."-".$day2; - if ($nal[$tmp]) - { - $title = trim($nal[$tmp][1]); - //echo $title; - echo ""; - if (trim($nal[$tmp][2]) == "*") - echo ""; - } - - // 오늘이라면 - if ($today[year] == $yyyy && $today[mon] == $mm && $today[mday] == $day) - { - echo ""; - echo ""; - } - // 선택일(넘어온 값) 이라면 - else if ($tmp_date == $cur_date) - { - echo ""; - echo ""; - } - } else - echo " "; - } else - echo " "; - echo "
-
- - ";?> - 오늘 : -