diff --git a/adm/shop_admin/itemqaform.php b/adm/shop_admin/itemqaform.php
index aba25b68c..722c5723b 100644
--- a/adm/shop_admin/itemqaform.php
+++ b/adm/shop_admin/itemqaform.php
@@ -50,6 +50,18 @@ $qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2;
이름 |
|
+
+
+ | 이메일 |
+ |
+
+
+
+
+ | 휴대폰 |
+ |
+
+
|
|
diff --git a/adm/shop_admin/itemqaformupdate.php b/adm/shop_admin/itemqaformupdate.php
index c7a293725..376df3123 100644
--- a/adm/shop_admin/itemqaformupdate.php
+++ b/adm/shop_admin/itemqaformupdate.php
@@ -20,6 +20,39 @@ if ($w == "u")
where iq_id = '$iq_id' ";
sql_query($sql);
+ if(trim($iq_answer)) {
+ $sql = " select a.iq_email, a.iq_hp, b.it_name
+ from {$g5['g5_shop_item_qa_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
+ where a.iq_id = '$iq_id' ";
+ $row = sql_fetch($sql);
+
+ // SMS 알림
+ if($config['cf_sms_use'] == 'icode' && $row['iq_hp']) {
+ include_once(G5_LIB_PATH.'/icode.sms.lib.php');
+
+ $sms_content = get_text($row['it_name']).' 상품문의에 답변이 등록되었습니다.';
+ $send_number = preg_replace('/[^0-9]/', '', $default['de_admin_company_tel']);
+ $recv_number = preg_replace('/[^0-9]/', '', $row['iq_hp']);
+
+ if($recv_number) {
+ $SMS = new SMS; // SMS 연결
+ $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
+ $SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
+ $SMS->Send();
+ }
+ }
+
+ // 답변 이메일전송
+ if(trim($row['iq_email'])) {
+ include_once(G5_LIB_PATH.'/mailer.lib.php');
+
+ $subject = $config['cf_title'].' '.$row['it_name'].' 상품문의 답변 알림 메일';
+ $content = conv_content($iq_answer, 1);
+
+ mailer($config['cf_title'], $admin['mb_email'], $row['iq_email'], $subject, $content, 1);
+ }
+ }
+
goto_url("./itemqaform.php?w=$w&iq_id=$iq_id&$qstr");
}
else {
diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php
index ddb151b4e..b5667ac93 100644
--- a/extend/shop.extend2.php
+++ b/extend/shop.extend2.php
@@ -724,4 +724,11 @@ if(!sql_query(" select iq_secret from {$g5['g5_shop_item_qa_table']} limit 1 ",
sql_query(" ALTER TABLE `{$g5['g5_shop_item_qa_table']}`
ADD `iq_secret` tinyint(4) NOT NULL DEFAULT '0' AFTER `mb_id` ", true);
}
+
+// 상품문의 이메일 휴대폰 필드 추가
+if(!sql_query(" select iq_hp from {$g5['g5_shop_item_qa_table']} limit 1 ", false)) {
+ sql_query(" ALTER TABLE `{$g5['g5_shop_item_qa_table']}`
+ ADD `iq_email` varchar(255) NOT NULL DEFAULT '' AFTER `iq_name`,
+ ADD `iq_hp` varchar(255) NOT NULL DEFAULT '' AFTER `iq_email` ", true);
+}
?>
diff --git a/install/gnuboard5shop.sql b/install/gnuboard5shop.sql
index c2095d059..c48953f96 100644
--- a/install/gnuboard5shop.sql
+++ b/install/gnuboard5shop.sql
@@ -543,6 +543,8 @@ CREATE TABLE IF NOT EXISTS `g5_shop_item_qa` (
`mb_id` varchar(255) NOT NULL DEFAULT '',
`iq_secret` tinyint(4) NOT NULL DEFAULT '0',
`iq_name` varchar(255) NOT NULL DEFAULT '',
+ `iq_email` varchar(255) NOT NULL DEFAULT '',
+ `iq_hp` varchar(255) NOT NULL DEFAULT '',
`iq_password` varchar(255) NOT NULL DEFAULT '',
`iq_subject` varchar(255) NOT NULL DEFAULT '',
`iq_question` text NOT NULL,
diff --git a/mobile/shop/itemqaform.php b/mobile/shop/itemqaform.php
index d897f0acf..3f9e90fa9 100644
--- a/mobile/shop/itemqaform.php
+++ b/mobile/shop/itemqaform.php
@@ -12,6 +12,11 @@ $iq_id = escape_trim($_REQUEST['iq_id']);
$chk_secret = '';
+if($w == '') {
+ $qa['iq_email'] = $member['mb_email'];
+ $qa['iq_hp'] = $member['mb_hp'];
+}
+
if ($w == "u")
{
$qa = sql_fetch(" select * from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' ");
diff --git a/mobile/skin/shop/basic/itemqaform.skin.php b/mobile/skin/shop/basic/itemqaform.skin.php
index d81586646..54d714630 100644
--- a/mobile/skin/shop/basic/itemqaform.skin.php
+++ b/mobile/skin/shop/basic/itemqaform.skin.php
@@ -27,6 +27,14 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
+
+ |
+ 이메일을 입력하시면 답변 등록 시 답변이 이메일로 전송됩니다. |
+
+
+ |
+ 휴대폰번호를 입력하시면 답변 등록 시 답변등록 알림이 SMS로 전송됩니다. |
+
|
|
@@ -41,6 +49,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
+
diff --git a/shop/itemqaform.php b/shop/itemqaform.php
index 6db24e1f6..0784d15a2 100644
--- a/shop/itemqaform.php
+++ b/shop/itemqaform.php
@@ -18,6 +18,11 @@ $iq_id = escape_trim($_REQUEST['iq_id']);
$chk_secret = '';
+if($w == '') {
+ $qa['iq_email'] = $member['mb_email'];
+ $qa['iq_hp'] = $member['mb_hp'];
+}
+
if ($w == "u")
{
$qa = sql_fetch(" select * from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' ");
diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php
index 922dd882d..7658c83d5 100644
--- a/shop/itemqaformupdate.php
+++ b/shop/itemqaformupdate.php
@@ -28,6 +28,8 @@ if ($w == "")
mb_id = '{$member['mb_id']}',
iq_secret = '$iq_secret',
iq_name = '$iq_name',
+ iq_email = '$iq_email',
+ iq_hp = '$iq_hp',
iq_password = '$iq_password',
iq_subject = '$iq_subject',
iq_question = '$iq_question',
@@ -49,6 +51,8 @@ else if ($w == "u")
$sql = " update {$g5['g5_shop_item_qa_table']}
set iq_secret = '$iq_secret',
+ iq_email = '$iq_email',
+ iq_hp = '$iq_hp',
iq_subject = '$iq_subject',
iq_question = '$iq_question'
where iq_id = '$iq_id' ";
diff --git a/skin/shop/basic/itemqa.skin.php b/skin/shop/basic/itemqa.skin.php
index 5a5c51a02..ad2516112 100644
--- a/skin/shop/basic/itemqa.skin.php
+++ b/skin/shop/basic/itemqa.skin.php
@@ -115,7 +115,7 @@ echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it