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/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');
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/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/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();
}
});
});
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
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만 가능하며 용량 바이트 이하만 등록됩니다.
-
+
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; // 개별 페이지 접근 불가