From 4ca027de06014b2d95d10d0d5e7626686ceacc9b Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 2 Oct 2014 11:31:13 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=ED=8F=BC=EB=A9=94=EC=9D=BC=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=EC=9E=84=EC=8B=9C=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/formmail_send.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bbs/formmail_send.php b/bbs/formmail_send.php index 472b1e5d2..c97575a30 100644 --- a/bbs/formmail_send.php +++ b/bbs/formmail_send.php @@ -20,6 +20,7 @@ if (!chk_captcha()) { } +$file = array(); for ($i=1; $i<=$attach; $i++) { if ($_FILES['file'.$i]['name']) $file[] = attach_file($_FILES['file'.$i]['name'], $_FILES['file'.$i]['tmp_name']); @@ -41,6 +42,13 @@ else mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file); +// 임시 첨부파일 삭제 +if(!empty($file)) { + foreach($file as $f) { + @unlink($f['path']); + } +} + //$html_title = $tmp_to . "님께 메일발송"; $html_title = '메일 발송중'; include_once(G5_PATH.'/head.sub.php'); From 3fe9bfc7192c16ba35b05144f038833502f2a01c Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 7 Oct 2014 17:56:18 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=EC=9E=84=EC=8B=9C=EC=A0=80=EC=9E=A5?= =?UTF-8?q?=EA=B8=80=20=EC=82=AD=EC=A0=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/autosave.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/js/autosave.js b/js/autosave.js index ed24c9335..201e0d5ce 100644 --- a/js/autosave.js +++ b/js/autosave.js @@ -26,7 +26,7 @@ function autosave() { type: "POST", success: function(data){ if (data) { - $("#autosave_count").html(data); + $("#autosave_count").html(data); } } }); @@ -50,14 +50,15 @@ $(function(){ //console.log( "Data: " + data); $("#autosave_pop ul").empty(); if ($(data).find("list").find("item").length > 0) { - $(data).find("list").find("item").each(function(i) { + $(data).find("list").find("item").each(function(i) { var id = $(this).find("id").text(); var uid = $(this).find("uid").text(); var subject = $(this).find("subject").text(); var datetime = $(this).find("datetime").text(); - $("#autosave_pop ul").append('
  • '+subject+''+datetime+'
  • '); - $.data(document.body, "autosave_id"+i, id); - $.data(document.body, "autosave_uid"+i, uid); + $("#autosave_pop ul") + .append('
  • '+subject+''+datetime+'
  • ') + .find("li:eq("+i+")") + .data({ as_id: id, uid: uid }); }); } }, "xml"); @@ -69,9 +70,9 @@ $(function(){ // 임시저장된 글 제목과 내용을 가져와서 제목과 내용 입력박스에 노출해 줌 $(".autosave_load").live("click", function(){ - var i = $(this).parents("li").index(); - var as_id = $.data(document.body, "autosave_id"+i); - var as_uid = $.data(document.body, "autosave_uid"+i); + var $li = $(this).parents("li"); + var as_id = $li.data("as_id"); + var as_uid = $li.data("uid"); $("#fwrite input[name='uid']").val(as_uid); $.get(g5_bbs_url+"/ajax.autosaveload.php", {"as_id":as_id}, function(data){ var subject = $(data).find("item").find("subject").text(); @@ -83,7 +84,7 @@ $(function(){ ed_wr_content.putContents(content); } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors.getById['wr_content'])!="undefined" ) { oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]); - //oEditors.getById["wr_content"].exec("SET_IR", [""]); + //oEditors.getById["wr_content"].exec("SET_IR", [""]); oEditors.getById["wr_content"].exec("PASTE_HTML", [content]); } else { $("#fwrite #wr_content").val(content); @@ -93,14 +94,14 @@ $(function(){ }); $(".autosave_del").live("click", function(){ - var i = $(this).parents("li").index(); - var as_id = $.data(document.body, "autosave_id"+i); - $.get(g5_bbs_url+"/ajax.autosavedel.php", {"as_id":as_id}, function(data){ + var $li = $(this).parents("li"); + var as_id = $li.data("as_id"); + $.get(g5_bbs_url+"/ajax.autosavedel.php", {"as_id":as_id}, function(data){ if (data == -1) { alert("임시 저장된글을 삭제중에 오류가 발생하였습니다."); } else { - $("#autosave_count").html(data); - $("#autosave_pop ul > li").eq(i).remove(); + $("#autosave_count").html(data); + $li.remove(); } }); }); From aa46c9fb27bf0eaaccc7a36d17992332caa4c0db Mon Sep 17 00:00:00 2001 From: thisgun Date: Wed, 8 Oct 2014 10:39:51 +0900 Subject: [PATCH 3/6] =?UTF-8?q?sms5=20=EB=AC=B8=EC=9E=90=20=EB=B3=B4?= =?UTF-8?q?=EB=82=B4=EA=B8=B0=20=EC=98=A4=EB=A5=98=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/sms_admin/history_send.php | 4 +++- adm/sms_admin/history_view.php | 9 +++++++-- adm/sms_admin/sms_write_send.php | 3 ++- plugin/editor/smarteditor2/license.txt | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 plugin/editor/smarteditor2/license.txt diff --git a/adm/sms_admin/history_send.php b/adm/sms_admin/history_send.php index 488e25db5..5f6b468b7 100644 --- a/adm/sms_admin/history_send.php +++ b/adm/sms_admin/history_send.php @@ -116,7 +116,9 @@ if ($result) $row['bk_hp'] = get_hp($row['bk_hp'], 1); $log = array_shift($SMS->Log); - sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'"); + $log = @iconv('UTF-8', 'UTF-8//IGNORE', $log); + + sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false); } $SMS->Init(); // 보관하고 있던 결과값을 지웁니다. diff --git a/adm/sms_admin/history_view.php b/adm/sms_admin/history_view.php index d65672290..8acd6396b 100644 --- a/adm/sms_admin/history_view.php +++ b/adm/sms_admin/history_view.php @@ -143,13 +143,18 @@ function all_send() if( $write['wr_memo'] ){ $tmp_wr_memo = @unserialize($write['wr_memo']); if( count($tmp_wr_memo) && is_array($tmp_wr_memo) ){ - $arr_wr_memo = array_count_values( $tmp_wr_memo['hp'] ); + if(function_exists('array_fill_keys')){ + $tmp_wr_hp = array_replace($tmp_wr_memo['hp'],array_fill_keys(array_keys($tmp_wr_memo['hp'], null),'')); + } else { + $tmp_wr_hp = $tmp_wr_memo['hp']; + } + $arr_wr_memo = @array_count_values( $tmp_wr_hp ); ?>

    중복번호

      $v){ - if( empty($v) ) continue; + if( empty($v) || $key == '' ) continue; ?>
    • 중복
    • diff --git a/adm/sms_admin/sms_write_send.php b/adm/sms_admin/sms_write_send.php index d11a5b0fd..5265708ce 100644 --- a/adm/sms_admin/sms_write_send.php +++ b/adm/sms_admin/sms_write_send.php @@ -199,8 +199,9 @@ if ($result) $row['bk_hp'] = get_hp($row['bk_hp'], 1); $log = array_shift($SMS->Log); + $log = @iconv('UTF-8', 'UTF-8//IGNORE', $log); - sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'"); + sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false); } $SMS->Init(); // 보관하고 있던 결과값을 지웁니다. diff --git a/plugin/editor/smarteditor2/license.txt b/plugin/editor/smarteditor2/license.txt new file mode 100644 index 000000000..63c490dad --- /dev/null +++ b/plugin/editor/smarteditor2/license.txt @@ -0,0 +1,16 @@ +SmartEditor2 is web based Javascript HTML WYSIWYG Editor released as Open Source under LGPL +Copyright (C) 2008-2014 NAVER Corp. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA \ No newline at end of file From 8fc0bc98f384b572b8d0bad42b806011414a7d60 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 10 Oct 2014 14:11:57 +0900 Subject: [PATCH 4/6] =?UTF-8?q?#39=20=EC=82=AC=EC=9A=A9=EC=9E=90=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EA=B0=95=EC=A0=9C=20=EC=84=A4=EC=A0=95=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 31 +++++++++++++++++++++++++++++-- config.php | 8 ++++++++ mobile/tail.php | 2 +- tail.php | 2 +- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/common.php b/common.php index 9b1885d49..b9118e474 100644 --- a/common.php +++ b/common.php @@ -218,14 +218,38 @@ if ($config['cf_editor']) else define('G5_EDITOR_LIB', G5_LIB_PATH."/editor.lib.php"); +//============================================================================== +// 사용기기 설정 +// config.php G5_SET_DEVICE 설정에 따라 사용자 화면 제한됨 +// pc 설정 시 모바일 기기에서도 PC화면 보여짐 +// mobile 설정 시 PC에서도 모바일화면 보여짐 +// both 설정 시 접속 기기에 따른 화면 보여짐 +//------------------------------------------------------------------------------ +$is_mobile = false; +$set_device = true; +if(defined('G5_SET_DEVICE')) { + switch(G5_SET_DEVICE) { + case 'pc': + $is_mobile = false; + $set_device = false; + break; + case 'mobile': + $is_mobile = true; + $set_device = false; + break; + default: + break; + } +} +//============================================================================== + //============================================================================== // Mobile 모바일 설정 // 쿠키에 저장된 값이 모바일이라면 브라우저 상관없이 모바일로 실행 // 그렇지 않다면 브라우저의 HTTP_USER_AGENT 에 따라 모바일 결정 // G5_MOBILE_AGENT : config.php 에서 선언 //------------------------------------------------------------------------------ -$is_mobile = false; -if (G5_USE_MOBILE) { +if (G5_USE_MOBILE && $set_device) { if ($_REQUEST['device']=='pc') $is_mobile = false; else if ($_REQUEST['device']=='mobile') @@ -234,10 +258,13 @@ if (G5_USE_MOBILE) { $is_mobile = $_SESSION['ss_is_mobile']; else if (is_mobile()) $is_mobile = true; +} else { + $set_device = false; } $_SESSION['ss_is_mobile'] = $is_mobile; define('G5_IS_MOBILE', $is_mobile); +define('G5_DEVICE_BUTTON_DISPLAY', $set_device); if (G5_IS_MOBILE) { include_once(G5_LIB_PATH.'/mobile.lib.php'); // 모바일 전용 라이브러리 $g5['mobile_path'] = G5_PATH.'/'.$g5['mobile_dir']; diff --git a/config.php b/config.php index 6df2c181b..6c2dfc6a1 100644 --- a/config.php +++ b/config.php @@ -115,6 +115,14 @@ define('G5_PHPMAILER_PATH', G5_PLUGIN_PATH.'/'.G5_PHPMAILER_DIR); //============================================================================== +//============================================================================== +// 사용기기 설정 +// pc 설정 시 모바일 기기에서도 PC화면 보여짐 +// mobile 설정 시 PC에서도 모바일화면 보여짐 +// both 설정 시 접속 기기에 따른 화면 보여짐 +//------------------------------------------------------------------------------ +define('G5_SET_DEVICE', 'both'); + define('G5_USE_MOBILE', true); // 모바일 홈페이지를 사용하지 않을 경우 false 로 설정 define('G5_USE_CACHE', true); // 최신글등에 cache 기능 사용 여부 diff --git a/mobile/tail.php b/mobile/tail.php index 913f5489d..faa5a9ddb 100644 --- a/mobile/tail.php +++ b/mobile/tail.php @@ -25,7 +25,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 Date: Mon, 13 Oct 2014 09:45:14 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=20=EC=95=84=EC=9D=B4=EC=BD=98=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/skin/member/basic/register_form.skin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/skin/member/basic/register_form.skin.php b/mobile/skin/member/basic/register_form.skin.php index 94c633039..54f559d9e 100644 --- a/mobile/skin/member/basic/register_form.skin.php +++ b/mobile/skin/member/basic/register_form.skin.php @@ -187,7 +187,7 @@ add_stylesheet('', gif만 가능하며 용량 바이트 이하만 등록됩니다. - + 회원아이콘 From 9cbff6835b3ecfafe2b529c93635960cba2011c9 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 13 Oct 2014 13:12:43 +0900 Subject: [PATCH 6/6] =?UTF-8?q?sfl=EC=97=90=20mb=5Fid=EA=B0=80=20=EC=9E=88?= =?UTF-8?q?=EC=9C=BC=EB=A9=B4=20=EC=9D=B8=EA=B8=B0=20=EA=B2=80=EC=83=89?= =?UTF-8?q?=EC=96=B4=20=EA=B8=B0=EB=A1=9D=ED=95=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/search.php | 8 ++++---- lib/common.lib.php | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/bbs/search.php b/bbs/search.php index 2a83c1edc..ed0058d54 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -72,6 +72,10 @@ if ($stx) { if (trim($s[$i]) == '') continue; $search_str = $s[$i]; + + // 인기검색어 + insert_popular($field, $search_str); + $str .= $op1; $str .= "("; @@ -100,10 +104,6 @@ if ($stx) { $str .= ")"; $op1 = " {$sop} "; - - // 인기검색어 - $sql = " insert into {$g5['popular_table']} set pp_word = '{$search_str}', pp_date = '".G5_TIME_YMD."', pp_ip = '{$_SERVER['REMOTE_ADDR']}' "; - sql_query($sql, FALSE); } $str .= ")"; diff --git a/lib/common.lib.php b/lib/common.lib.php index a53b23898..4bd59b75e 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -616,8 +616,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op if ($search_str == "") continue; // 인기검색어 - $sql = " insert into {$g5['popular_table']} set pp_word = '$search_str', pp_date = '".G5_TIME_YMD."', pp_ip = '{$_SERVER['REMOTE_ADDR']}' "; - sql_query($sql, FALSE); + insert_popular($field, $search_str); $str .= $op1; $str .= "("; @@ -2813,4 +2812,15 @@ function get_icode_userinfo($id, $pass) return $userinfo; } + +// 인기검색어 입력 +function insert_popular($field, $str) +{ + global $g5; + + if(!in_array('mb_id', $field)) { + $sql = " insert into {$g5['popular_table']} set pp_word = '{$str}', pp_date = '".G5_TIME_YMD."', pp_ip = '{$_SERVER['REMOTE_ADDR']}' "; + sql_query($sql, FALSE); + } +} ?> \ No newline at end of file