ÇÁ·Î±×·¥ ÆÐÄ¡ ¹æ¹ý

¡Ø 2018³â 05¿ù 20ÀÏ ÀÌ Àü¿¡ À̳ª¹« µ¶¸³ÇüÀ» ±¸¸ÅÇϽŠºÐµéÀº ÇØ´ç ÇÁ·Î±×·¥ ÆÐÄ¡(PHP 5.2)·Î Àû¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù.
- ´Ü, ¿ÜºÎÈ£½ºÆÃ ¹× ¼­¹öÈ£½ºÆÃÀ» ÀÌ¿ëÇϽô ºÐµéÀº 2018³â 05¿ù 21ÀÏ ÀÌ ÈÄ¿¡ ±¸¸ÅÇϼ̴õ¶óµµ, ÇØ´ç ÇÁ·Î±×·¥ ÆÐÄ¡(PHP 5.2)¸¦ Àû¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù.
º» ÆÐÄ¡´Â Á¦°øµÇ´Â ÆÐÄ¡ ¹æ¹ý°ú ¼Ò½º¸¦ ±âÃÊ·Î ÇÏ¿© Á÷Á¢ ¼öÁ¤Çϱ⸦ ±ÇÀåÇÕ´Ï´Ù.
±âÁ¸(ÀÌÀü) ÆÐÄ¡Ç׸ñµéÀ» ÆÐÄ¡ÇÏÁö ¾ÊÀº »óÅ¿¡¼­ ÇÁ·Î±×·¥ ÆÄÀϵéÀ» ±×´ë·Î µ¤¾î¾º¿ï °æ¿ì¿¡
ÇÔ¼ö°¡ ¾ø´Ù°Å³ª DB Çʵ尡 ¾ø´Ù´Â µîÀÇ ¿À·ù°¡ ¹ß»ýÇÒ È®·üÀÌ ³ô½À´Ï´Ù.
  1. DBÆÐÄ¡Çϱâ
    1) ¼îÇθô FTPÁ¢¼ÓÈÄ /shop/ ¿¡ ´Ù¿î·Îµå ¹ÞÀº "_db.patch.php" ¾÷·Îµå ÇÔ
    2) À¥»ó¿¡¼­ "http://µµ¸ÞÀÎ/shop/_db.patch.php" °æ·Î¸¦ Çѹø ½ÇÇàÇÏ¿© DBÆÐÄ¡ ¿Ï·áÇÔ.


  2. ¼îÇθô FTPÁ¢¼ÓÈÄ /shop/lib/ ¿¡ "sms" Æú´õ¸¦ »ý¼ºÇÔ
  3. ¼îÇθô FTPÁ¢¼ÓÈÄ shop/lib/sms/ ¿¡ ´Ù¿î·Îµå ¹ÞÀº "shop/lib/sms/Commerce.php shop/lib/sms/PointSyncAPI.php shop/lib/sms/SendAPI.php" ÆÄÀÏÀ» ¾÷·Îµå ÇÔ
  4. ¼îÇθô FTPÁ¢¼ÓÈÄ shop/lib/ ¿¡ ´Ù¿î·Îµå ¹ÞÀº "shop/lib/callNumber.class.php shop/lib/kakaoAlimtalkAPI.class.php shop/lib/smsAPI.class.php" ÆÄÀÏÀ» ¾÷·Îµå ÇÔ(ÆÐÄ¡ ÆÄÀÏÀ» ÁöÁ¤ÇÑ À§Ä¡¿¡´Ù°¡ ±×´ë·Î µ¤¾î¾º¿ì½Ã¸é µË´Ï´Ù.)
  5. ¼îÇθô FTPÁ¢¼ÓÈÄ ¾Æ·¡ ÆÄÀÏÀ» ¼öÁ¤ÇÔ.
shop/admin/event/event_sms.php CHANGED
@@ -110,6 +110,11 @@ $total = $db->count_($memRes);
110
  </table>
111
  <div style="padding-top:30px"></div>
112
  <div class="title title_top">SMS ¹ß¼ÛÇϱâ<span>ȸ¿øµé¿¡°Ô SMS¸¦ Àü¼ÛÇÕ´Ï´Ù </span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=event&no=26')"><img src="../img/btn_q.gif" border=0 align=absmiddle></a></div>
 
 
 
 
 
113
  <? include "../member/_smsForm.php"; ?>
114
  </form>
115
 
110
  </table>
111
  <div style="padding-top:30px"></div>
112
  <div class="title title_top">SMS ¹ß¼ÛÇϱâ<span>ȸ¿øµé¿¡°Ô SMS¸¦ Àü¼ÛÇÕ´Ï´Ù </span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=event&no=26')"><img src="../img/btn_q.gif" border=0 align=absmiddle></a></div>
113
+ <div style="margin-top: 10px; margin-bottom: 10px; padding-left: 16px;">
114
+ <div class="g9">¡Ø SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
115
+ <div class="g9">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
116
+ <div class="g9" >µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
117
+ </div>
118
  <? include "../member/_smsForm.php"; ?>
119
  </form>
120
 
shop/admin/lib.func.php CHANGED
@@ -1215,17 +1215,9 @@ function daum_goods_diff($goodsno,$ar_update,$class="U") {
1215
 
1216
  function checkSmsPassNumber($smsPassNumber)
1217
  {
1218
- global $cfg;
1219
-
1220
- if(!$cfg){
1221
- @include dirname(__FILE__).'/../../conf/config.php';
1222
- }
1223
-
1224
- if($cfg['smsPass'] == $smsPassNumber){
1225
- return true;
1226
- }
1227
-
1228
- return false;
1229
  }
1230
 
1231
  // ¸ð¹ÙÀϼ¥ Àû¿ë¹öÀü È®ÀÎ
1215
 
1216
  function checkSmsPassNumber($smsPassNumber)
1217
  {
1218
+ @include_once SHOPROOT.'/lib/sms/Commerce.php';
1219
+ $smsCommerce = new Commerce();
1220
+ return $smsCommerce->checkPassword($smsPassNumber);
 
 
 
 
 
 
 
 
1221
  }
1222
 
1223
  // ¸ð¹ÙÀϼ¥ Àû¿ë¹öÀü È®ÀÎ
shop/admin/member/batch.php CHANGED
@@ -585,6 +585,11 @@ if (is_object($AdminLog) && get_class($AdminLog) == 'AdminLog') {
585
  <!-- SMSº¸³»±â : Start -->
586
  <div id="objsms" style="display:none; padding-top:30">
587
  <div class="title title_top">SMS ¹ß¼ÛÇϱâ<span>ȸ¿øµé¿¡°Ô SMS¸¦ Àü¼ÛÇÕ´Ï´Ù </span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=member&no=9')"><img src="../img/btn_q.gif" border=0 align=absmiddle></a></div>
 
 
 
 
 
588
  <? $total = $pg->recode['total']; ?>
589
  <? include "./_smsForm.php"; ?>
590
  <!-- SMSº¸³»±â : End -->
585
  <!-- SMSº¸³»±â : Start -->
586
  <div id="objsms" style="display:none; padding-top:30">
587
  <div class="title title_top">SMS ¹ß¼ÛÇϱâ<span>ȸ¿øµé¿¡°Ô SMS¸¦ Àü¼ÛÇÕ´Ï´Ù </span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=member&no=9')"><img src="../img/btn_q.gif" border=0 align=absmiddle></a></div>
588
+ <div style="margin-top: 10px; margin-bottom: 10px; padding-left: 16px;">
589
+ <div class="g9">¡Ø SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
590
+ <div class="g9">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
591
+ <div class="g9" >µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
592
+ </div>
593
  <? $total = $pg->recode['total']; ?>
594
  <? include "./_smsForm.php"; ?>
595
  <!-- SMSº¸³»±â : End -->
shop/admin/member/indb.php CHANGED
@@ -98,6 +98,8 @@ switch ($mode){
98
  if($_POST['smsPassChk'] === 'y' && trim($_POST['smsPass'])){
99
  $cfg['smsPass'] = $_POST['smsPass'];
100
  }
 
 
101
 
102
  # Ãß°¡ °ü¸®ÀÚ ¼³Á¤
103
  $i = 0;
@@ -342,7 +344,7 @@ switch ($mode){
342
  $sms_sendlist = new sms_sendlist();
343
 
344
  //SMS ÀÎÁõ¹øÈ£ üũ
345
- if($_POST['totalCount'] > 1){
346
  if(!$_POST['smsPassNumber'] || checkSmsPassNumber($_POST['smsPassNumber']) === false){
347
  msg("SMS ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
348
  exit;
98
  if($_POST['smsPassChk'] === 'y' && trim($_POST['smsPass'])){
99
  $cfg['smsPass'] = $_POST['smsPass'];
100
  }
101
+ @include_once SHOPROOT.'/lib/sms/Commerce.php';
102
+ $cfg['smsPass'] = Commerce::getEncryptSmsPass($cfg['smsPass']);
103
 
104
  # Ãß°¡ °ü¸®ÀÚ ¼³Á¤
105
  $i = 0;
344
  $sms_sendlist = new sms_sendlist();
345
 
346
  //SMS ÀÎÁõ¹øÈ£ üũ
347
+ if($_POST['totalCount'] > 0){
348
  if(!$_POST['smsPassNumber'] || checkSmsPassNumber($_POST['smsPassNumber']) === false){
349
  msg("SMS ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
350
  exit;
shop/admin/member/popup.sms.php CHANGED
@@ -325,6 +325,11 @@ function checkReceiveRefuseForm(form)
325
  </script>
326
 
327
  <div class="title title_top"><font face="±¼¸²" color="black"><b>SMS</b></font> º¸³»±â<span>SMS¹®ÀÚ¸Þ¼¼Áö¸¦ ÀÌ¿ëÇÏ¿© °í°´µéÀ» °¨µ¿½ÃŰ¼¼¿ä</span></div>
 
 
 
 
 
328
 
329
  <!-- SMS ½ÇÆÐ¹øÈ£ ¸ñ·Ï -->
330
  <form name="failListForm" id="failListForm" method="post">
325
  </script>
326
 
327
  <div class="title title_top"><font face="±¼¸²" color="black"><b>SMS</b></font> º¸³»±â<span>SMS¹®ÀÚ¸Þ¼¼Áö¸¦ ÀÌ¿ëÇÏ¿© °í°´µéÀ» °¨µ¿½ÃŰ¼¼¿ä</span></div>
328
+ <div style="margin-top: 10px; margin-bottom: 10px; padding-left: 16px;">
329
+ <div class="g9">¡Ø SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
330
+ <div class="g9">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
331
+ <div class="g9" >µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
332
+ </div>
333
 
334
  <!-- SMS ½ÇÆÐ¹øÈ£ ¸ñ·Ï -->
335
  <form name="failListForm" id="failListForm" method="post">
shop/admin/member/sms.address_list.php CHANGED
@@ -101,6 +101,11 @@ function sendSMS(sno) {
101
  <form>
102
 
103
  <div class="title title_top">SMS ÀÏ¹Ý ÁÖ¼Ò·Ï<span>ÇöÀç ³» ¼îÇθôÀÇ SMS ÁÖ¼Ò·ÏÀ» ÆÄ¾ÇÇϰí SMS¸¦ º¸³¾ ¼ö ÀÖ½À´Ï´Ù</span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=member&no=16')"><img src="../img/btn_q.gif" border="0" align="absmiddle" /></a></div>
 
 
 
 
 
104
  <table class="tb">
105
  <col class="cellC"><col class="cellL" style="width:250">
106
  <col class="cellC"><col class="cellL">
101
  <form>
102
 
103
  <div class="title title_top">SMS ÀÏ¹Ý ÁÖ¼Ò·Ï<span>ÇöÀç ³» ¼îÇθôÀÇ SMS ÁÖ¼Ò·ÏÀ» ÆÄ¾ÇÇϰí SMS¸¦ º¸³¾ ¼ö ÀÖ½À´Ï´Ù</span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=member&no=16')"><img src="../img/btn_q.gif" border="0" align="absmiddle" /></a></div>
104
+ <div style="margin-top: 10px; margin-bottom: 10px; padding-left: 16px;">
105
+ <div class="g9">¡Ø SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
106
+ <div class="g9">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
107
+ <div class="g9" >µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
108
+ </div>
109
  <table class="tb">
110
  <col class="cellC"><col class="cellL" style="width:250">
111
  <col class="cellC"><col class="cellL">
shop/admin/member/sms.member_list.php CHANGED
@@ -151,6 +151,12 @@ function sendSMS(m_id) {
151
  <form>
152
 
153
  <div class="title title_top">SMS ȸ¿ø ÁÖ¼Ò·Ï<span>°Ë»öÇÑ È¸¿ø¿¡°Ô SMS¸¦ ¹ß¼ÛÇÒ ¼ö ÀÖ½À´Ï´Ù.</span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=member&no=17')"><img src="../img/btn_q.gif" border="0" align="absmiddle" /></a></div>
 
 
 
 
 
 
154
  <!-- ȸ¿ø °Ë»ö Æû -->
155
  <table class="tb">
156
  <col class="cellC" /><col class="cellL" style="width:250" />
151
  <form>
152
 
153
  <div class="title title_top">SMS ȸ¿ø ÁÖ¼Ò·Ï<span>°Ë»öÇÑ È¸¿ø¿¡°Ô SMS¸¦ ¹ß¼ÛÇÒ ¼ö ÀÖ½À´Ï´Ù.</span> <a href="javascript:manual('<?=$guideUrl?>board/view.php?id=member&no=17')"><img src="../img/btn_q.gif" border="0" align="absmiddle" /></a></div>
154
+ <div style="margin-top: 10px; margin-bottom: 10px; padding-left: 16px;">
155
+ <div class="g9">¡Ø SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
156
+ <div class="g9">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
157
+ <div class="g9" >µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
158
+ </div>
159
+
160
  <!-- ȸ¿ø °Ë»ö Æû -->
161
  <table class="tb">
162
  <col class="cellC" /><col class="cellL" style="width:250" />
shop/admin/member/sms.php CHANGED
@@ -276,7 +276,11 @@ Event.observe(document, 'dom:loaded', function(){
276
 
277
  </td></tr>
278
  </table>
279
-
 
 
 
 
280
 
281
  <form name="fmList" id="fmList" method="post">
282
  <input type="hidden" name="type" value="1" />
276
 
277
  </td></tr>
278
  </table>
279
+ <div style="margin-top: 10px; margin-bottom: 10px; padding-left: 16px;">
280
+ <div class="g9">¡Ø SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
281
+ <div class="g9">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
282
+ <div class="g9" >µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
283
+ </div>
284
 
285
  <form name="fmList" id="fmList" method="post">
286
  <input type="hidden" name="type" value="1" />
shop/admin/member/sms.sendList.php CHANGED
@@ -15,6 +15,7 @@ $selected['page_num'][$_GET['page_num']] = " selected='selected'";
15
  $checked['reserve'][$_GET['reserve']] = " checked='checked'";
16
  $checked['status'][$_GET['status']] = " checked='checked'";
17
  $checked['sms_status'][$_GET['sms_status']] = " checked='checked'";
 
18
 
19
  //¿¹¾à¹ß¼Û°Ç ¹ß¼ÛÁß »óÅ ¾÷µ¥ÀÌÆ®
20
  $sms_sendlist->updateReserveSendingAll();
@@ -74,6 +75,10 @@ if ($_GET['sms_phoneNumber']) {
74
  $where[] = "sno in ('" . implode("','", $sms_logNoArr) . "')";
75
  }
76
 
 
 
 
 
77
  $pg = new Page($_GET['page'], $_GET['page_num']);
78
  $pg->field = " * ";
79
  $pg->setQuery(GD_SMS_LOG ,$where , 'sno desc');
@@ -121,6 +126,7 @@ function formCheck(f)
121
  .sendList-guide td a { letter-spacing: -1px; color: #627dce; font-weight: bold; text-decoration: underline; }
122
  .sendList-guide td div { padding-top: 5px; }
123
  .sendList-guide td .divPaddingL { padding-left: 16px; }
 
124
  .sendList-guide td .guide-title { font-weight: bold; }
125
  .guideFont { color: #627dce; font-weight: bold; font-size: 11px; }
126
  .sendList-total { padding: 20px 0px 5px 0px; }
@@ -137,6 +143,7 @@ function formCheck(f)
137
  .sendList .sendListSubTh { font:8pt µ¸¿ò; height:30px; color:#ffffff; }
138
  .sendList .sendListSubTd { color:#262626; font-family:Tahoma,Dotum; font-size:11px; text-align: center; }
139
  .imgLink { border: 0px; cursor: pointer; }
 
140
  </style>
141
 
142
  <div class="title title_top">
@@ -148,10 +155,20 @@ function formCheck(f)
148
  <tr>
149
  <td>
150
  <div class="guide-title">¡Ø SMS ¹ß¼Û³»¿ª È®ÀÎ ¾È³»</div>
151
- <div class="g9">¨ç ¹ß¼Û¿Ï·áµÈ °Ç¼ö¸¸ Æ÷ÀÎÆ®Â÷°¨µÇ¸ç, ¹ß¼Û½ÇÆÐµÈ °Ç¼ö´Â ÇÏ·ç¿¡ Çѹø »õº® 1½Ã°æ¿¡ Á¤»êµÇ¾î »ç¿ëµÈ Æ÷ÀÎÆ®°¡ ¹ÝȯµË´Ï´Ù.</div>
152
- <div class="g9">¨è ¼º°ø, ½ÇÆÐ ³»¿ª ¹× ¹ß¼Û»óÅ´ ¿¹¾àÁ¤º¸ ȤÀº ¹ß¼Û°á°ú ¹öưÀ» Ŭ¸¯Çϸé Á¶È¸ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.</div>
 
 
 
 
 
 
 
 
 
 
153
  <div class="g9 divPaddingL">[¹ß¼Û¿äû½ÇÆÐ ȤÀº ¹ß¼Û½ÇÆÐ°ÇÀÌ ÀÖÀ¸¸é ¸®½ºÆ®¿¡ ºÓÀº»öÀ¸·Î Ç¥½ÃµË´Ï´Ù.]</div>
154
- <div class="g9">¨é º¸´Ù Á¤È®ÇÑ SMS ¹ß¼Û³»¿ª µ¥ÀÌÅÍ´Â ¿£¿¡ÀÌÄ¡¿£Ä¿¸Ó½º¿¡ ·Î±×ÀÎ ÇϽŠÈÄ, ¸¶ÀÌÆäÀÌÁö¿¡¼­ ´Ù¿î·Îµå°¡ °¡´ÉÇÕ´Ï´Ù.</div>
155
  <div class="g9 divPaddingL">¸Þ´º : ¿£¿¡ÀÌÄ¡¿£Ä¿¸Ó½º ·Î±×ÀÎ > ¸¶ÀÌÆäÀÌÁö > ³ªÀÇ ¼îÇθô > [»ó¼¼Á¤º¸/°ü¸®] Ŭ¸¯ > SMS ¹ß¼Û ³»¿ª¿¡¼­ ´Ù¿î·Îµå</div>
156
  <div class="g9 divPaddingL divLink"><a href="https://www.godo.co.kr/mygodo/main.gd" target="_blank">[¸¶ÀÌÆäÀÌÁö ¹Ù·Î°¡±â > ]</a></div>
157
  </td>
@@ -191,11 +208,19 @@ function formCheck(f)
191
  <td class="noline">
192
  <label><input type="radio" name="status" value="" <?php echo $checked['status']['']; ?> />Àüü</label>
193
  <label><input type="radio" name="status" value="4" <?php echo $checked['status']['4']; ?> />¹ß¼Û¿Ï·á</label>
194
- <label><input type="radio" name="status" value="3" <?php echo $checked['status']['3']; ?> />°á°ú¼ö½Å´ë±â&nbsp;<img src="../img/icons/icon_qmark.gif" style="vertical-align:bottom; cursor:pointer; border: 0px;" class="godo-tooltip" tooltip="°á°ú¼ö½Å´ë±â´Â ÇöÀç ¸Þ½ÃÁö¸¦ ¹ß¼ÛÁß À̰ųª, ¹ß¼Û¿Ï·á ÈÄ °á°ú°ªÀ» ¼ö½ÅÇϱâ À§ÇØ<br />´ë±âÁßÀÎ »óÅÂÀÔ´Ï´Ù. ¹ß¼Û°á°ú¸¦ Ŭ¸¯ÇÏ¸é °á°ú°ªÀ» ¼ö½ÅÇÒ ¼ö ÀÖ½À´Ï´Ù."> </label>
195
  <label><input type="radio" name="status" value="1" <?php echo $checked['status']['1']; ?> />¹ß¼Û´ë±â</label>
196
  <label><input type="radio" name="status" value="2" <?php echo $checked['status']['2']; ?> />¿¹¾àÃë¼Ò</label>
197
  </td>
198
  </tr>
 
 
 
 
 
 
 
 
199
  <tr>
200
  <td>¹ß¼Û½ÇÆÐ°Ç Á¶È¸</td>
201
  <td class="noline">
@@ -231,7 +256,9 @@ function formCheck(f)
231
  <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sendList">
232
  <colgroup>
233
  <col width="4%" />
234
- <col width="8%" />
 
 
235
  <col width="11%" />
236
  <col width="*" />
237
  <col width="5%" />
@@ -243,7 +270,9 @@ function formCheck(f)
243
  </colgroup>
244
  <tr class="sendList-Bg sendList-Height">
245
  <th>¹øÈ£</th>
 
246
  <th>±¸ºÐ</th>
 
247
  <th>¹ß¼Û½Ã°£/<br />¹ß¼Û¿¹¾à½Ã°£</th>
248
  <th>Á¦¸ñ+¸Þ½ÃÁö</th>
249
  <th>¹ß¼ÛÇüÅÂ</th>
@@ -332,7 +361,9 @@ while ($data = $db->fetch($result, 1)){
332
  ?>
333
  <tr class="sendList-contentsTr<?php echo $style; ?>">
334
  <td><?php echo $pg->idx--; ?></td>
 
335
  <td><?php echo $reserveType; ?></td>
 
336
  <td><?php echo $sendTime; ?></td>
337
  <td class="sendList-contents"><?php echo $msg; ?></td>
338
  <td><?php echo $smsType; ?></td>
15
  $checked['reserve'][$_GET['reserve']] = " checked='checked'";
16
  $checked['status'][$_GET['status']] = " checked='checked'";
17
  $checked['sms_status'][$_GET['sms_status']] = " checked='checked'";
18
+ $checked['direct_yn'][$_GET['direct_yn']] = " checked='checked'";
19
 
20
  //¿¹¾à¹ß¼Û°Ç ¹ß¼ÛÁß »óÅ ¾÷µ¥ÀÌÆ®
21
  $sms_sendlist->updateReserveSendingAll();
75
  $where[] = "sno in ('" . implode("','", $sms_logNoArr) . "')";
76
  }
77
 
78
+ if($_GET['direct_yn']){
79
+ $where[] = "direct_yn='" . $_GET['direct_yn'] . "'";
80
+ }
81
+
82
  $pg = new Page($_GET['page'], $_GET['page_num']);
83
  $pg->field = " * ";
84
  $pg->setQuery(GD_SMS_LOG ,$where , 'sno desc');
126
  .sendList-guide td a { letter-spacing: -1px; color: #627dce; font-weight: bold; text-decoration: underline; }
127
  .sendList-guide td div { padding-top: 5px; }
128
  .sendList-guide td .divPaddingL { padding-left: 16px; }
129
+ .sendList-guide td .divPaddingL2 { padding-left: 24px; }
130
  .sendList-guide td .guide-title { font-weight: bold; }
131
  .guideFont { color: #627dce; font-weight: bold; font-size: 11px; }
132
  .sendList-total { padding: 20px 0px 5px 0px; }
143
  .sendList .sendListSubTh { font:8pt µ¸¿ò; height:30px; color:#ffffff; }
144
  .sendList .sendListSubTd { color:#262626; font-family:Tahoma,Dotum; font-size:11px; text-align: center; }
145
  .imgLink { border: 0px; cursor: pointer; }
146
+ .redFont {color: red;}
147
  </style>
148
 
149
  <div class="title title_top">
155
  <tr>
156
  <td>
157
  <div class="guide-title">¡Ø SMS ¹ß¼Û³»¿ª È®ÀÎ ¾È³»</div>
158
+ <div class="g9 redFont">¨ç SMS ¼öµ¿¹ß¼ÛÀº NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ ½ÂÀÎ ÈÄ ¹ß¼ÛµË´Ï´Ù.</div>
159
+ <div class="g9 divPaddingL">¡®NHNÄ¿¸Ó½º>¸¶ÀÌÆäÀÌÁö>¼îÇθô°ü¸®> SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò¡¯¿¡¼­ Á÷Á¢ ½ÂÀÎ ¹× Ãë¼ÒÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. <span class="divLink" style="text-decoration: underline;"><a href="https://www.nhn-commerce.com/mygodo/echost/sms-send-approve.gd" target="_blank">[SMS ¹ß¼Û ½ÂÀÎ/Ãë¼Ò ¹Ù·Î°¡±â >]</a></span></div>
160
+ <div class="g9 divPaddingL" style="color:#627dce ">µî·Ï ÈÄ 7ÀÏ À̳» ½ÂÀÎÇÏÁö ¾ÊÀº °æ¿ì SMS¹ß¼ÛÀÌ ÀÚµ¿ Ãë¼ÒµË´Ï´Ù.</div>
161
+ <div class="g9">¨è ¹ß¼Û»óÅ´ ´ÙÀ½°ú °°ÀÌ Ç¥½ÃµË´Ï´Ù.</div>
162
+ <div class="g9 divPaddingL">- ¹ß¼Û´ë±â : ¿¹¾à¹ß¼ÛÀ» µî·ÏÇÑ »óÅÂÀÔ´Ï´Ù.</div>
163
+ <div class="g9 divPaddingL">- °á°ú¼ö½Å´ë±â : Áï½Ã¹ß¼ÛÀ» µî·ÏÇÑ »óÅÂÀÔ´Ï´Ù.</div>
164
+ <div class="g9 divPaddingL2"> *½ÂÀÎ/Ãë¼Ò »óÅÂ¿Í µ¿±âÈ­µÇÁö ¾ÊÀ¸´Ï ½ÂÀÎ/Ãë¼Ò ¿©ºÎ´Â NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ È®ÀÎÇϼ¼¿ä.</div>
165
+ <div class="g9 divPaddingL">- ¹ß¼Û¿Ï·á/½ÇÆÐ : SMS¹ß¼ÛÀÌ ¿Ï·á/½ÇÆÐ µÇ¾ú½À´Ï´Ù. </div>
166
+ <div class="g9 divPaddingL">- ¿¹¾àÃë¼Ò : ¿¹¾à¹ß¼ÛÀ» Ãë¼ÒÇÑ »óÅÂÀÔ´Ï´Ù.</div>
167
+ <div class="g9">¨é ¹ß¼Û¿Ï·á °Ç¸¸ Æ÷ÀÎÆ® Â÷°¨µÇ¸ç, ¹ß¼Û Ãë¼Ò/½ÇÆÐµÈ °Ç¼ö´Â ÇÏ·ç¿¡ Çѹø »õº® 1½Ã°æ¿¡ Á¤»êµÇ¾î »ç¿ëµÈ Æ÷ÀÎÆ®°¡ ¹ÝȯµË´Ï´Ù.</div>
168
+ <div class="g9 divPaddingL">´Ü, ¹ß¼ÛÃë¼Ò °ÇÀÇ °æ¿ì [Æ÷ÀÎÆ® º¹¿ø] ¹öưÀ» Ŭ¸¯ÇϽøé Â÷°¨µÈ Æ÷ÀÎÆ®°¡ ¹Ù·Î º¹¿øµË´Ï´Ù.</div>
169
+ <div class="g9">¨ê ¼º°ø, ½ÇÆÐ ³»¿ª ¹× ¹ß¼Û»óÅ´ ¿¹¾àÁ¤º¸ ȤÀº ¹ß¼Û°á°ú ¹öưÀ» Ŭ¸¯Çϸé Á¶È¸ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.</div>
170
  <div class="g9 divPaddingL">[¹ß¼Û¿äû½ÇÆÐ ȤÀº ¹ß¼Û½ÇÆÐ°ÇÀÌ ÀÖÀ¸¸é ¸®½ºÆ®¿¡ ºÓÀº»öÀ¸·Î Ç¥½ÃµË´Ï´Ù.]</div>
171
+ <div class="g9">¨ë º¸´Ù Á¤È®ÇÑ SMS ¹ß¼Û³»¿ª µ¥ÀÌÅÍ´Â ¿£¿¡ÀÌÄ¡¿£Ä¿¸Ó½º¿¡ ·Î±×ÀÎ ÇϽŠÈÄ, ¸¶ÀÌÆäÀÌÁö¿¡¼­ ´Ù¿î·Îµå°¡ °¡´ÉÇÕ´Ï´Ù.</div>
172
  <div class="g9 divPaddingL">¸Þ´º : ¿£¿¡ÀÌÄ¡¿£Ä¿¸Ó½º ·Î±×ÀÎ > ¸¶ÀÌÆäÀÌÁö > ³ªÀÇ ¼îÇθô > [»ó¼¼Á¤º¸/°ü¸®] Ŭ¸¯ > SMS ¹ß¼Û ³»¿ª¿¡¼­ ´Ù¿î·Îµå</div>
173
  <div class="g9 divPaddingL divLink"><a href="https://www.godo.co.kr/mygodo/main.gd" target="_blank">[¸¶ÀÌÆäÀÌÁö ¹Ù·Î°¡±â > ]</a></div>
174
  </td>
208
  <td class="noline">
209
  <label><input type="radio" name="status" value="" <?php echo $checked['status']['']; ?> />Àüü</label>
210
  <label><input type="radio" name="status" value="4" <?php echo $checked['status']['4']; ?> />¹ß¼Û¿Ï·á</label>
211
+ <label><input type="radio" name="status" value="3" <?php echo $checked['status']['3']; ?> />°á°ú¼ö½Å´ë±â&nbsp;<img src="../img/icons/icon_qmark.gif" style="vertical-align:bottom; cursor:pointer; border: 0px;" class="godo-tooltip" tooltip="Áï½Ã¹ß¼ÛÀ» µî·ÏÇÑ »óÅÂÀÔ´Ï´Ù. <br /> ½ÂÀÎ/Ãë¼Ò »óÅÂ¿Í µ¿±âÈ­µÇÁö ¾ÊÀ¸´Ï ½ÂÀÎ/Ãë¼Ò ¿©ºÎ´Â NHNÄ¿¸Ó½º ¸¶ÀÌÆäÀÌÁö¿¡¼­ È®ÀÎÇϼ¼¿ä."> </label>
212
  <label><input type="radio" name="status" value="1" <?php echo $checked['status']['1']; ?> />¹ß¼Û´ë±â</label>
213
  <label><input type="radio" name="status" value="2" <?php echo $checked['status']['2']; ?> />¿¹¾àÃë¼Ò</label>
214
  </td>
215
  </tr>
216
+ <tr>
217
+ <td>¹ß¼ÛÀ¯Çü</td>
218
+ <td class="noline">
219
+ <label><input type="radio" name="direct_yn" value="" <?php echo $checked['direct_yn']['']; ?> />Àüü</label>
220
+ <label><input type="radio" name="direct_yn" value="n" <?php echo $checked['direct_yn']['n']; ?> />ÀÚµ¿</label>
221
+ <label><input type="radio" name="direct_yn" value="y" <?php echo $checked['direct_yn']['y']; ?> />¼öµ¿(°³º°/Àüü)</label>
222
+ </td>
223
+ </tr>
224
  <tr>
225
  <td>¹ß¼Û½ÇÆÐ°Ç Á¶È¸</td>
226
  <td class="noline">
256
  <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sendList">
257
  <colgroup>
258
  <col width="4%" />
259
+ <col width="4%" />
260
+ <col width="4%" />
261
+ <col width="11%" />
262
  <col width="11%" />
263
  <col width="*" />
264
  <col width="5%" />
270
  </colgroup>
271
  <tr class="sendList-Bg sendList-Height">
272
  <th>¹øÈ£</th>
273
+ <th>¹ß¼ÛÀ¯Çü</th>
274
  <th>±¸ºÐ</th>
275
+ <th>µî·ÏÀϽÃ</th>
276
  <th>¹ß¼Û½Ã°£/<br />¹ß¼Û¿¹¾à½Ã°£</th>
277
  <th>Á¦¸ñ+¸Þ½ÃÁö</th>
278
  <th>¹ß¼ÛÇüÅÂ</th>
361
  ?>
362
  <tr class="sendList-contentsTr<?php echo $style; ?>">
363
  <td><?php echo $pg->idx--; ?></td>
364
+ <td><?php echo ($data['direct_yn'] == "y") ? "¼öµ¿" : "ÀÚµ¿" ?></td>
365
  <td><?php echo $reserveType; ?></td>
366
+ <td><?php echo $data['regdt']; ?></td>
367
  <td><?php echo $sendTime; ?></td>
368
  <td class="sendList-contents"><?php echo $msg; ?></td>
369
  <td><?php echo $smsType; ?></td>
shop/admin/proc/_ajaxSmsPassConfirm.php CHANGED
@@ -1,12 +1,14 @@
1
  <?php
2
  include dirname(__FILE__) . '/../lib.php';
 
3
 
4
  if($_POST['mode'] == 'check'){
5
  if(!trim($cfg['smsPass'])){
6
  exit;
7
  }
8
 
9
- if($_POST['smsPass'] === $cfg['smsPass']){
 
10
  echo 'ok';
11
  }
12
  }
1
  <?php
2
  include dirname(__FILE__) . '/../lib.php';
3
+ @include_once SHOPROOT.'/lib/sms/Commerce.php';
4
 
5
  if($_POST['mode'] == 'check'){
6
  if(!trim($cfg['smsPass'])){
7
  exit;
8
  }
9
 
10
+ $smsCommerce = new Commerce();
11
+ if($smsCommerce->checkPassword($_POST['smsPass'])){
12
  echo 'ok';
13
  }
14
  }
shop/lib/lms.class.php CHANGED
@@ -6,38 +6,22 @@ class Lms
6
  function Lms($msgOn=false)
7
  {
8
  $this->msgOn = $msgOn;
9
- $this -> getSno();
10
  $this -> r_data = array();
11
  $this->regdt = date('Y-m-d H:i:s');
12
  }
13
 
14
- function getSno()
15
  {
16
- // get godo's serial
17
- $file = dirname(__FILE__)."/../conf/godomall.cfg.php";
18
- if (!is_file($file)) return false;
19
- $file = file($file);
20
- $this->godo = decode($file[1],1);
21
- if (!$this->godo[sno]){
22
  if ($this->msgOn) msg("¾÷ü°íÀ¯¹øÈ£°¡ ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù",1);
23
  return false;
24
  }
25
- // get smsPassword
26
- $file = dirname(__FILE__)."/../conf/config.php";
27
- if (!is_file($file)) return false;
28
- @include($file);
29
- $this -> smsPass = $cfg[smsPass];
30
- if(!$this -> smsPass)$this -> smsPass = "1111";
31
- // get smsPoint
32
- $tmp = array( 'type'=>'search', 'sno' => $this->godo[sno], 'pass' => $this->smsPass );
33
- $res = $this -> lms_socket($tmp);
34
- /*
35
- if(!preg_match('/result=\[[0-9]+\]/',$res)){
36
- return false;
37
- }
38
- */
39
- $res = str_replace(array('result','=','[',']'),'',$res);
40
- $this -> smsPt = $res;
41
  return true;
42
  }
43
 
@@ -77,13 +61,13 @@ class Lms
77
  $add = false;
78
  $tp = count($this -> r_data) - 1;
79
  if(!$send_date) {
80
- $send_date = $this->regdt;
81
  }
82
  $res_etc = substr($send_date,0,4).substr($send_date,5,2).substr($send_date,8,2);
83
 
84
  if($tp > -1 && ($tran_type == 'send' || $tran_type == 'res_send')){
85
- if($this -> r_data[$tp][msg] == $tran_msg){
86
- $tmp = explode(',',$this -> r_data[$tp][hp]);
87
  if(count($tmp) < 30) $add= true;
88
  else $this -> update();
89
  }
@@ -91,18 +75,13 @@ class Lms
91
 
92
  ##set msg
93
  if($add){
94
- $this -> r_data[$tp][hp] .= ",".$tran_phone;
95
  }else{
96
  $this -> r_data[] = array(
97
- 'type' => 'res_send',
98
- 'sno' => $this->godo[sno],
99
- 'pass' => $this -> smsPass,
100
- 'callback' => $tran_callback,
101
- 'hp' => $tran_phone,
102
- 'res_date' => $send_date,
103
- 'res_etc' => $res_etc,
104
  'subject' => $tran_subject,
105
- '__head__' => '__body__',
106
  'msg' => $tran_msg
107
  );
108
  }
@@ -116,16 +95,19 @@ class Lms
116
  if($this -> r_data){
117
  $sms_sendlist = $this->loadSendlist();
118
  foreach($this -> r_data as $v) {
119
- $sms_phoneNumber = $v['hp'];
120
 
121
  //(-) Á¦°Å
122
- $v['hp'] = $sms_sendlist->setPhoneNumberApi($v['hp']);
123
  // ¹ß¼ÛµÇ´Â ¹øÈ£ °¹¼ö Ä«¿îÆÃ
124
- $hpCount = count(explode(',', $v['hp']));
 
 
 
 
 
125
 
126
- $res = $this -> lms_socket($v);
127
- $res = str_replace(array('result','=','[',']'),'',$res);
128
- if($res == 0){
129
  //Á¢¼ö»óÅÂ update
130
  $sms_sendlist->updateSendStatus($this->smsLogInsertId , $sms_phoneNumber);
131
  $this->countNum['success'] += $hpCount;
@@ -150,11 +132,16 @@ class Lms
150
 
151
  function log($msg,$to_tran,$type,$cnt,$reserve='',$subject='')
152
  {
 
153
  if($subject) {
154
  $subject = $this->setSubjectProcess($subject, 'y');
155
  }
156
  $msg = $this->setMsgProcess($msg, 'y');
157
  $status = $this->getStatus($reserve);
 
 
 
 
158
  $to_tran = str_replace("-","",$to_tran);
159
  $query = "
160
  insert into ".GD_SMS_LOG." set
@@ -165,6 +152,7 @@ class Lms
165
  to_tran = '$to_tran',
166
  cnt = '$cnt',
167
  status = '$status',
 
168
  reservedt = '$reserve',
169
  regdt = '".$this->regdt."'
170
  ";
6
  function Lms($msgOn=false)
7
  {
8
  $this->msgOn = $msgOn;
9
+ $this -> pointSync();
10
  $this -> r_data = array();
11
  $this->regdt = date('Y-m-d H:i:s');
12
  }
13
 
14
+ function pointSync()
15
  {
16
+ @include_once SHOPROOT.'/lib/sms/PointSyncAPI.php';
17
+ $pointSyncAPI = new PointSyncAPI();
18
+ $mallSno = $pointSyncAPI->getMallSno();
19
+ if (empty($mallSno)){
 
 
20
  if ($this->msgOn) msg("¾÷ü°íÀ¯¹øÈ£°¡ ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù",1);
21
  return false;
22
  }
23
+ $pointSyncAPI->request(PointSyncAPI::EXCEPT_APPROVE);
24
+ $this -> smsPt = $pointSyncAPI->getResponse();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  return true;
26
  }
27
 
61
  $add = false;
62
  $tp = count($this -> r_data) - 1;
63
  if(!$send_date) {
64
+ $send_date = 'now';
65
  }
66
  $res_etc = substr($send_date,0,4).substr($send_date,5,2).substr($send_date,8,2);
67
 
68
  if($tp > -1 && ($tran_type == 'send' || $tran_type == 'res_send')){
69
+ if($this -> r_data[$tp]['msg'] == $tran_msg){
70
+ $tmp = explode(',',$this -> r_data[$tp]['toPhoneNumber']);
71
  if(count($tmp) < 30) $add= true;
72
  else $this -> update();
73
  }
75
 
76
  ##set msg
77
  if($add){
78
+ $this -> r_data[$tp]['toPhoneNumber'] .= ",".$tran_phone;
79
  }else{
80
  $this -> r_data[] = array(
81
+ 'fromPhoneNumber' => $tran_callback,
82
+ 'toPhoneNumber' => $tran_phone,
83
+ 'tranDTime' => $send_date,
 
 
 
 
84
  'subject' => $tran_subject,
 
85
  'msg' => $tran_msg
86
  );
87
  }
95
  if($this -> r_data){
96
  $sms_sendlist = $this->loadSendlist();
97
  foreach($this -> r_data as $v) {
98
+ $sms_phoneNumber = $v['toPhoneNumber'];
99
 
100
  //(-) Á¦°Å
101
+ $v['toPhoneNumber'] = $sms_sendlist->setPhoneNumberApi($v['toPhoneNumber']);
102
  // ¹ß¼ÛµÇ´Â ¹øÈ£ °¹¼ö Ä«¿îÆÃ
103
+ $hpCount = count(explode(',', $v['toPhoneNumber']));
104
+
105
+ @include_once SHOPROOT.'/lib/sms/SendAPI.php';
106
+ $smsSend = new SendAPI();
107
+ $smsSend->request($v['fromPhoneNumber'], $v['toPhoneNumber'], $v['tranDTime'], SendAPI::TRAN_TYPE_LMS, $v['subject'], $v['msg']);
108
+ $res = $smsSend->getResponse();
109
 
110
+ if($res['status'] === SendAPI::RESPONSE_STATUS_OK){
 
 
111
  //Á¢¼ö»óÅÂ update
112
  $sms_sendlist->updateSendStatus($this->smsLogInsertId , $sms_phoneNumber);
113
  $this->countNum['success'] += $hpCount;
132
 
133
  function log($msg,$to_tran,$type,$cnt,$reserve='',$subject='')
134
  {
135
+ @include_once SHOPROOT.'/lib/sms/SendAPI.php';
136
  if($subject) {
137
  $subject = $this->setSubjectProcess($subject, 'y');
138
  }
139
  $msg = $this->setMsgProcess($msg, 'y');
140
  $status = $this->getStatus($reserve);
141
+ $directYn = SendAPI::getDirectYn();
142
+ if (empty($reserve)){
143
+ $reserve = "0000-00-00 00:00:00";
144
+ }
145
  $to_tran = str_replace("-","",$to_tran);
146
  $query = "
147
  insert into ".GD_SMS_LOG." set
152
  to_tran = '$to_tran',
153
  cnt = '$cnt',
154
  status = '$status',
155
+ direct_yn = '$directYn',
156
  reservedt = '$reserve',
157
  regdt = '".$this->regdt."'
158
  ";
shop/lib/sms.class.php CHANGED
@@ -6,38 +6,22 @@ class Sms
6
  function Sms($msgOn=false)
7
  {
8
  $this->msgOn = $msgOn;
9
- $this -> getSno();
10
  $this -> r_data = array();
11
  $this->regdt = date('Y-m-d H:i:s');
12
  }
13
 
14
- function getSno()
15
  {
16
- // get godo's serial
17
- $file = dirname(__FILE__)."/../conf/godomall.cfg.php";
18
- if (!is_file($file)) return false;
19
- $file = file($file);
20
- $this->godo = decode($file[1],1);
21
- if (!$this->godo[sno]){
22
  if ($this->msgOn) msg("¾÷ü°íÀ¯¹øÈ£°¡ ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù",1);
23
  return false;
24
  }
25
- // get smsPassword
26
- $file = dirname(__FILE__)."/../conf/config.php";
27
- if (!is_file($file)) return false;
28
- @include($file);
29
- $this -> smsPass = $cfg[smsPass];
30
- if(!$this -> smsPass)$this -> smsPass = "1111";
31
- // get smsPoint
32
- $tmp = array( 'type'=>'search', 'sno' => $this->godo[sno], 'pass' => $this->smsPass );
33
- $res = $this -> sms_socket($tmp);
34
- /*
35
- if(!preg_match('/result=\[[0-9]+\]/',$res)){
36
- return false;
37
- }
38
- */
39
- $res = str_replace(array('result','=','[',']'),'',$res);
40
- $this -> smsPt = $res;
41
  return true;
42
  }
43
 
@@ -76,13 +60,13 @@ class Sms
76
  $add = false;
77
  $tp = count($this -> r_data) - 1;
78
  if(!$send_date) {
79
- $send_date = $this->regdt;
80
  }
81
  $res_etc = substr($send_date,0,4).substr($send_date,5,2).substr($send_date,8,2);
82
 
83
  if($tp > -1 && ($tran_type == 'send' || $tran_type == 'res_send')){
84
- if($this -> r_data[$tp][msg] == $tran_msg){
85
- $tmp = explode(',',$this -> r_data[$tp][hp]);
86
  if(count($tmp) < 30) $add= true;
87
  else $this -> update();
88
  }
@@ -90,17 +74,12 @@ class Sms
90
 
91
  ##set msg
92
  if($add){
93
- $this -> r_data[$tp][hp] .= ",".$tran_phone;
94
  }else{
95
  $this -> r_data[] = array(
96
- 'type' => 'res_send',
97
- 'sno' => $this->godo[sno],
98
- 'pass' => $this -> smsPass,
99
- 'callback' => $tran_callback,
100
- 'hp' => $tran_phone,
101
- 'res_date' => $send_date,
102
- 'res_etc' => $res_etc,
103
- '__head__' => '__body__',
104
  'msg' => $tran_msg
105
  );
106
  }
@@ -114,16 +93,19 @@ class Sms
114
  if($this -> r_data){
115
  $sms_sendlist = $this->loadSendlist();
116
  foreach($this -> r_data as $v) {
117
- $sms_phoneNumber = $v['hp'];
118
 
119
  //(-) Á¦°Å
120
- $v['hp'] = $sms_sendlist->setPhoneNumberApi($v['hp']);
121
  // ¹ß¼ÛµÇ´Â ¹øÈ£ °¹¼ö Ä«¿îÆÃ
122
- $hpCount = count(explode(',', $v['hp']));
 
 
 
 
 
123
 
124
- $res = $this -> sms_socket($v);
125
- $res = str_replace(array('result','=','[',']'),'',$res);
126
- if($res == 0){
127
  //Á¢¼ö»óÅÂ update
128
  $sms_sendlist->updateSendStatus($this->smsLogInsertId , $sms_phoneNumber);
129
  $this->countNum['success'] += $hpCount;
@@ -148,13 +130,20 @@ class Sms
148
 
149
  function log($msg,$to_tran,$type,$cnt,$reserve='')
150
  {
 
151
  $msg = $this->setMsgProcess($msg, 'y');
152
  $status = $this->getStatus($reserve);
 
 
 
 
153
  $query = "
154
  insert into ".GD_SMS_LOG." set
 
155
  msg = '".$msg."',
156
  type = '$type',
157
  to_tran = '$to_tran',
 
158
  cnt = '$cnt',
159
  status = '$status',
160
  reservedt = '$reserve',
6
  function Sms($msgOn=false)
7
  {
8
  $this->msgOn = $msgOn;
9
+ $this -> pointSync();
10
  $this -> r_data = array();
11
  $this->regdt = date('Y-m-d H:i:s');
12
  }
13
 
14
+ function pointSync()
15
  {
16
+ @include_once SHOPROOT.'/lib/sms/PointSyncAPI.php';
17
+ $pointSyncAPI = new PointSyncAPI();
18
+ $mallSno = $pointSyncAPI->getMallSno();
19
+ if (empty($mallSno)){
 
 
20
  if ($this->msgOn) msg("¾÷ü°íÀ¯¹øÈ£°¡ ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù",1);
21
  return false;
22
  }
23
+ $pointSyncAPI->request(PointSyncAPI::EXCEPT_APPROVE);
24
+ $this -> smsPt = $pointSyncAPI->getResponse();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  return true;
26
  }
27
 
60
  $add = false;
61
  $tp = count($this -> r_data) - 1;
62
  if(!$send_date) {
63
+ $send_date = 'now';
64
  }
65
  $res_etc = substr($send_date,0,4).substr($send_date,5,2).substr($send_date,8,2);
66
 
67
  if($tp > -1 && ($tran_type == 'send' || $tran_type == 'res_send')){
68
+ if($this -> r_data[$tp]['msg'] == $tran_msg){
69
+ $tmp = explode(',',$this -> r_data[$tp]['toPhoneNumber']);
70
  if(count($tmp) < 30) $add= true;
71
  else $this -> update();
72
  }
74
 
75
  ##set msg
76
  if($add){
77
+ $this -> r_data[$tp]['toPhoneNumber'] .= ",".$tran_phone;
78
  }else{
79
  $this -> r_data[] = array(
80
+ 'fromPhoneNumber' => $tran_callback,
81
+ 'toPhoneNumber' => $tran_phone,
82
+ 'tranDTime' => $send_date,
 
 
 
 
 
83
  'msg' => $tran_msg
84
  );
85
  }
93
  if($this -> r_data){
94
  $sms_sendlist = $this->loadSendlist();
95
  foreach($this -> r_data as $v) {
96
+ $sms_phoneNumber = $v['toPhoneNumber'];
97
 
98
  //(-) Á¦°Å
99
+ $v['toPhoneNumber'] = $sms_sendlist->setPhoneNumberApi($v['toPhoneNumber']);
100
  // ¹ß¼ÛµÇ´Â ¹øÈ£ °¹¼ö Ä«¿îÆÃ
101
+ $hpCount = count(explode(',', $v['toPhoneNumber']));
102
+
103
+ @include_once SHOPROOT.'/lib/sms/SendAPI.php';
104
+ $smsSend = new SendAPI();
105
+ $smsSend->request($v['fromPhoneNumber'], $v['toPhoneNumber'], $v['tranDTime'], SendAPI::TRAN_TYPE_SMS, $v['subject'], $v['msg']);
106
+ $res = $smsSend->getResponse();
107
 
108
+ if($res['status'] === SendAPI::RESPONSE_STATUS_OK){
 
 
109
  //Á¢¼ö»óÅÂ update
110
  $sms_sendlist->updateSendStatus($this->smsLogInsertId , $sms_phoneNumber);
111
  $this->countNum['success'] += $hpCount;
130
 
131
  function log($msg,$to_tran,$type,$cnt,$reserve='')
132
  {
133
+ @include_once SHOPROOT.'/lib/sms/SendAPI.php';
134
  $msg = $this->setMsgProcess($msg, 'y');
135
  $status = $this->getStatus($reserve);
136
+ $directYn = SendAPI::getDirectYn();
137
+ if (empty($reserve)){
138
+ $reserve = "0000-00-00 00:00:00";
139
+ }
140
  $query = "
141
  insert into ".GD_SMS_LOG." set
142
+ sms_type = 'sms',
143
  msg = '".$msg."',
144
  type = '$type',
145
  to_tran = '$to_tran',
146
+ direct_yn = '$directYn',
147
  cnt = '$cnt',
148
  status = '$status',
149
  reservedt = '$reserve',