From cfd752a5226e870cc336e629e04b5ead51984b98 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 16 Oct 2015 10:18:17 +0900 Subject: [PATCH] =?UTF-8?q?MySQLi=20=EC=A7=80=EC=9B=90=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20SMS5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.menu900.php | 1 - adm/contentlist.php | 2 +- adm/faqformupdate.php | 2 +- adm/faqmasterformupdate.php | 2 +- adm/faqmasterlist.php | 2 +- adm/mail_list.php | 2 +- adm/newwinformupdate.php | 2 +- adm/newwinlist.php | 2 +- adm/poll_form_update.php | 2 +- adm/popular_rank.php | 2 +- adm/shop_admin/ajax.orderitem.php | 2 +- adm/shop_admin/bannerformupdate.php | 2 +- adm/shop_admin/bannerlist.php | 2 +- adm/shop_admin/categoryformupdate.php | 2 +- adm/shop_admin/configform.php | 5 +- adm/shop_admin/configformupdate.php | 4 + adm/shop_admin/itemcopyupdate.php | 6 +- adm/shop_admin/itemevent.php | 2 +- adm/shop_admin/itemeventlist.php | 6 +- adm/shop_admin/itemlist.php | 2 +- adm/shop_admin/itemoption.php | 2 +- adm/shop_admin/itemqalist.php | 4 +- adm/shop_admin/itemsellrank.php | 6 +- adm/shop_admin/itemstocklist.php | 4 +- adm/shop_admin/itemstocksms.php | 2 +- adm/shop_admin/itemsupply.php | 2 +- adm/shop_admin/itemuselist.php | 2 +- adm/shop_admin/optionstocklist.php | 4 +- adm/shop_admin/orderdeliveryexcel.php | 2 +- adm/shop_admin/orderform.php | 2 +- adm/shop_admin/orderlist.php | 2 +- adm/shop_admin/ordermail.inc.php | 2 +- adm/shop_admin/orderprintresult.php | 8 +- adm/shop_admin/wishlist.php | 6 +- adm/sms_admin/_common.php | 2 +- adm/sms_admin/config.php | 41 +--- adm/sms_admin/config_update.php | 11 +- adm/sms_admin/install.php | 4 +- adm/sms_admin/sms5.sql | 29 +-- adm/sms_admin/sms_write.php | 6 +- adm/sms_admin/sms_write_send.php | 12 ++ bbs/list.php | 2 +- bbs/move_update.php | 2 +- bbs/qawrite_update.php | 2 +- bbs/scrap_popin_update.php | 2 +- bbs/search.php | 2 +- bbs/sns_send.php | 2 +- bbs/write_comment_update.php | 2 +- bbs/write_update.php | 2 +- common.php | 2 +- config.php | 7 +- extend/sms5.extend.php | 13 -- g4_import_run.php | 40 +--- install/install_db.php | 42 ++-- js/common.js | 13 -- lib/common.lib.php | 186 ++++++++++++++++-- lib/shop.lib.php | 14 +- lib/thumbnail.lib.php | 2 +- mobile/shop/cart.php | 2 +- mobile/shop/category.php | 8 +- mobile/shop/item.php | 2 +- mobile/shop/orderform.sub.php | 2 +- mobile/shop/orderformupdate.php | 2 +- mobile/shop/personalpayformupdate.php | 4 +- mobile/shop/wishlist.php | 2 +- mobile/skin/shop/basic/main.event.skin.php | 2 +- plugin/sms5/sms5.lib.php | 13 -- shop/cart.php | 2 +- shop/cartoption.php | 2 +- shop/item.php | 4 +- shop/orderaddress.php | 2 +- shop/ordercoupon.php | 2 +- shop/ordererrormail.php | 2 +- shop/orderform.sub.php | 2 +- shop/orderformupdate.php | 2 +- shop/orderinquiryview.php | 2 +- shop/orderitemcoupon.php | 2 +- shop/ordersendcostcoupon.php | 2 +- shop/personalpayformupdate.php | 4 +- shop/price/daum.php | 13 +- shop/price/naver.php | 8 +- shop/price/naver_new.php | 8 +- shop/price/naver_new_summary.php | 24 +-- shop/price/naver_summary.php | 24 +-- shop/price2/daum.php | 15 +- shop/price2/naver.php | 15 +- shop/price2/naver_new.php | 15 +- shop/price2/naver_new_summary.php | 47 +++-- shop/price2/naver_summary.php | 47 +++-- shop/wishlist.php | 2 +- skin/shop/basic/boxcategory.skin.php | 2 +- theme/basic/mobile/shop/category.php | 8 +- .../skin/shop/basic/main.event.skin.php | 2 +- .../skin/shop/basic/boxcategory.skin.php | 2 +- 94 files changed, 448 insertions(+), 389 deletions(-) diff --git a/adm/admin.menu900.php b/adm/admin.menu900.php index c9a8d6b54..f8d4fb063 100644 --- a/adm/admin.menu900.php +++ b/adm/admin.menu900.php @@ -6,7 +6,6 @@ array('900300', '문자 보내기', ''.G5_SMS5_ADMIN_URL.'/sms_write.php', 'sms_write'), array('900400', '전송내역-건별', ''.G5_SMS5_ADMIN_URL.'/history_list.php', 'sms_history' , 1), array('900410', '전송내역-번호별', ''.G5_SMS5_ADMIN_URL.'/history_num.php', 'sms_history_num' , 1), - array('900450', '전송내역-회원', ''.G5_SMS5_ADMIN_URL.'/history_member.php', 'sms_history_mb' , 1), array('900500', '이모티콘 그룹', ''.G5_SMS5_ADMIN_URL.'/form_group.php' , 'emoticon_group'), array('900600', '이모티콘 관리', ''.G5_SMS5_ADMIN_URL.'/form_list.php', 'emoticon_list'), array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1), diff --git a/adm/contentlist.php b/adm/contentlist.php index 7f8ce87ca..bdd929bb9 100644 --- a/adm/contentlist.php +++ b/adm/contentlist.php @@ -69,7 +69,7 @@ - diff --git a/adm/faqformupdate.php b/adm/faqformupdate.php index 722a6c3a4..723850c95 100644 --- a/adm/faqformupdate.php +++ b/adm/faqformupdate.php @@ -21,7 +21,7 @@ $sql_common "; sql_query($sql); - $fa_id = mysql_insert_id(); + $fa_id = sql_insert_id(); } else if ($w == "u") { diff --git a/adm/faqmasterformupdate.php b/adm/faqmasterformupdate.php index f6987d795..d86e0eed4 100644 --- a/adm/faqmasterformupdate.php +++ b/adm/faqmasterformupdate.php @@ -31,7 +31,7 @@ $sql = " insert {$g5['faq_master_table']} $sql_common "; sql_query($sql); - $fm_id = mysql_insert_id(); + $fm_id = sql_insert_id(); } else if ($w == "u") { diff --git a/adm/faqmasterlist.php b/adm/faqmasterlist.php index c21ea47e2..c60c5accb 100644 --- a/adm/faqmasterlist.php +++ b/adm/faqmasterlist.php @@ -93,7 +93,7 @@ - 미리보기'; $num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i); diff --git a/adm/newwinformupdate.php b/adm/newwinformupdate.php index e5fd4a6fc..2b2dce60e 100644 --- a/adm/newwinformupdate.php +++ b/adm/newwinformupdate.php @@ -28,7 +28,7 @@ $sql = " insert {$g5['new_win_table']} set $sql_common "; sql_query($sql); - $nw_id = mysql_insert_id(); + $nw_id = sql_insert_id(); } else if ($w == "u") { diff --git a/adm/newwinlist.php b/adm/newwinlist.php index ecc1217db..bdbc3beb0 100644 --- a/adm/newwinlist.php +++ b/adm/newwinlist.php @@ -71,7 +71,7 @@ 사업자정보
-

사업자정보는 tail.php 와 content.php 에서 표시합니다.

+

+ 사업자정보는 tail.php 와 content.php 에서 표시합니다.
+ 대표전화번호는 SMS 발송번호로 사용되므로 사전등록된 발신번호와 일치해야 합니다. +

diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index 76d87565e..3ec216750 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -6,6 +6,10 @@ auth_check($auth[$sub_menu], "w"); +// 대표전화번호 유효성 체크 +if(!check_vaild_callback($_POST['de_admin_company_tel'])) + alert('대표전화번호를 올바르게 입력해 주세요.'); + // 로그인을 바로 이 주소로 하는 경우 쇼핑몰설정값이 사라지는 현상을 방지 if (!$_POST['de_admin_company_owner']) goto_url("./configform.php"); diff --git a/adm/shop_admin/itemcopyupdate.php b/adm/shop_admin/itemcopyupdate.php index 54b409db4..703b5cada 100644 --- a/adm/shop_admin/itemcopyupdate.php +++ b/adm/shop_admin/itemcopyupdate.php @@ -24,10 +24,8 @@ // 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체) $sql_common = ""; -$fields = mysql_list_fields(G5_MYSQL_DB, $g5['g5_shop_item_table']); -$columns = mysql_num_fields($fields); -for ($i = 0; $i < $columns; $i++) { - $fld = mysql_field_name($fields, $i); +$fields = sql_field_names($g5['g5_shop_item_table']); +foreach($fields as $fld) { if ($fld == 'it_id' || $fld == 'it_sum_qty' || $fld == 'it_use_cnt' || $fld == 'it_use_avg') continue; diff --git a/adm/shop_admin/itemevent.php b/adm/shop_admin/itemevent.php index c99a23cee..6d6d931c1 100644 --- a/adm/shop_admin/itemevent.php +++ b/adm/shop_admin/itemevent.php @@ -41,7 +41,7 @@ 이벤트를 선택하세요"; $sql1 = " select ev_id, ev_subject from {$g5['g5_shop_event_table']} order by ev_id desc "; $result1 = sql_query($sql1); - while ($row1=mysql_fetch_array($result1)) + while ($row1=sql_fetch_array($result1)) $event_option .= ''; echo $event_option; ?> @@ -98,7 +98,7 @@ - 자료가 없습니다.'; ?> diff --git a/adm/shop_admin/ordermail.inc.php b/adm/shop_admin/ordermail.inc.php index f24dd1981..235111915 100644 --- a/adm/shop_admin/ordermail.inc.php +++ b/adm/shop_admin/ordermail.inc.php @@ -22,7 +22,7 @@ where od_id = '{$od['od_id']}' order by ct_id "; $result = sql_query($sql); - for ($j=0; $ct=mysql_fetch_array($result); $j++) { + for ($j=0; $ct=sql_fetch_array($result); $j++) { $cart_list[$j]['it_id'] = $ct['it_id']; $cart_list[$j]['it_name'] = $ct['it_name']; $cart_list[$j]['it_opt'] = $ct['ct_option']; diff --git a/adm/shop_admin/orderprintresult.php b/adm/shop_admin/orderprintresult.php index 62d7eeb11..ebb675d7f 100644 --- a/adm/shop_admin/orderprintresult.php +++ b/adm/shop_admin/orderprintresult.php @@ -50,7 +50,7 @@ function conv_telno($t) $sql .= " and b.ct_status = '$ct_status' "; $sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id "; $result = sql_query($sql); - $cnt = @mysql_num_rows($result); + $cnt = @sql_num_rows($result); if (!$cnt) alert("출력할 내역이 없습니다."); @@ -65,7 +65,7 @@ function conv_telno($t) echo iconv('utf-8', 'euc-kr', "우편번호,주소,이름,전화1,전화2,상품명,수량,선택사항,배송비,상품코드,주문번호,운송장번호,전하실말씀\n"); $save_it_id = ''; - for ($i=0; $row=mysql_fetch_array($result); $i++) + for ($i=0; $row=sql_fetch_array($result); $i++) { $row = array_map('iconv_euckr', $row); @@ -145,7 +145,7 @@ function conv_telno($t) $sql .= " and b.ct_status = '$ct_status' "; $sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id "; $result = sql_query($sql); - $cnt = @mysql_num_rows($result); + $cnt = @sql_num_rows($result); if (!$cnt) alert("출력할 내역이 없습니다."); @@ -264,7 +264,7 @@ function get_order($od_id) $sql .= " and b.ct_status = '$ct_status' "; $sql .= " order by a.od_id "; $result = sql_query($sql); -if (mysql_num_rows($result) == 0) +if (sql_num_rows($result) == 0) { echo ""; exit; diff --git a/adm/shop_admin/wishlist.php b/adm/shop_admin/wishlist.php index bcd6e7cb4..7689f7b04 100644 --- a/adm/shop_admin/wishlist.php +++ b/adm/shop_admin/wishlist.php @@ -31,7 +31,7 @@ $sql .= " group by a.it_id, b.it_name order by $sort1 $sort2 "; $result = sql_query($sql); -$total_count = mysql_num_rows($result); +$total_count = sql_num_rows($result); $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 @@ -63,7 +63,7 @@ - 예) 010-123-4567"); ?> + 예) 010-123-4567"); ?> - - - - - > - - - - - - - - 레벨 이상 - - - - - - - - - - - - - - - - - - - - - -
diff --git a/adm/sms_admin/config_update.php b/adm/sms_admin/config_update.php index b7c930176..ec18b2ec8 100644 --- a/adm/sms_admin/config_update.php +++ b/adm/sms_admin/config_update.php @@ -8,16 +8,15 @@ $g5['title'] = "SMS 기본설정"; +// 회신번호 체크 +if(!check_vaild_callback($cf_phone)) + alert('회신번호가 올바르지 않습니다.'); + $userinfo = get_icode_userinfo($cf_icode_id, $cf_icode_pw); if ($userinfo['code'] == '202') alert('아이코드 아이디와 패스워드가 맞지 않습니다.'); -if ($cf_member == '1') - $cf_member = 1; -else - $cf_member = 0; - $res = sql_fetch("select * from ".$g5['sms5_config_table']." limit 1"); if (!$res) @@ -25,7 +24,7 @@ else $sql = "update "; -$sql .= $g5['sms5_config_table']." set cf_phone='$cf_phone', cf_member='$cf_member', cf_level='$cf_level', cf_point='$cf_point', cf_day_count='$cf_day_count', cf_skin = '$cf_skin' "; +$sql .= $g5['sms5_config_table']." set cf_phone='$cf_phone' "; sql_query($sql); diff --git a/adm/sms_admin/install.php b/adm/sms_admin/install.php index 27e72da67..c7a13441d 100644 --- a/adm/sms_admin/install.php +++ b/adm/sms_admin/install.php @@ -53,7 +53,7 @@ $f = explode(";", $file); for ($i=0; $i" . $sql); +sql_query($sql) or die(mysqli_error() . "

" . $sql); echo ""; flush(); usleep(50000); diff --git a/adm/sms_admin/sms5.sql b/adm/sms_admin/sms5.sql index a741c7832..652872219 100644 --- a/adm/sms_admin/sms5.sql +++ b/adm/sms_admin/sms5.sql @@ -65,12 +65,7 @@ DROP TABLE IF EXISTS `{$g5['sms5_config_table']}`; CREATE TABLE `{$g5['sms5_config_table']}` ( `cf_phone` varchar(255) NOT NULL default '', - `cf_datetime` datetime NOT NULL default '0000-00-00 00:00:00', - `cf_member` tinyint(4) NOT NULL default '1', - `cf_level` tinyint(4) NOT NULL default '2', - `cf_point` int(11) NOT NULL default '0', - `cf_day_count` int(11) NOT NULL default '0', - `cf_skin` varchar(100) NOT NULL DEFAULT '' + `cf_datetime` datetime NOT NULL default '0000-00-00 00:00:00' ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -164,25 +159,3 @@ CREATE TABLE `{$g5['sms5_write_table']}` ( `wr_memo` text NOT NULL, KEY `wr_no` (`wr_no`,`wr_renum`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - - -## -## Table structure for table `{$g5['sms5_member_history_table']}` -## - -DROP TABLE IF EXISTS `{$g5['sms5_member_history_table']}`; - - -CREATE TABLE `{$g5['sms5_member_history_table']}` ( - `mh_no` int(11) NOT NULL auto_increment, - `mb_id` varchar(30) NOT NULL, - `mh_reply` varchar(30) NOT NULL, - `mh_hp` varchar(30) NOT NULL, - `mh_datetime` datetime NOT NULL, - `mh_booking` datetime NOT NULL, - `mh_log` varchar(255) NOT NULL, - `mh_ip` varchar(15) NOT NULL, - PRIMARY KEY (`mh_no`), - KEY `mb_id` (`mb_id`,`mh_datetime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - diff --git a/adm/sms_admin/sms_write.php b/adm/sms_admin/sms_write.php index c9092bfbd..1016f1d5e 100644 --- a/adm/sms_admin/sms_write.php +++ b/adm/sms_admin/sms_write.php @@ -114,7 +114,7 @@

- +
@@ -532,7 +532,7 @@ function byte_check(wr_message, sms_bytes) // 회원목록 $sql = " select * from {$g5['sms5_history_table']} where wr_no = '$wr_no' and bk_no > 0 "; $qry = sql_query($sql); - $tot = mysql_num_rows($qry); + $tot = sql_num_rows($qry); if ($tot > 0) { @@ -550,7 +550,7 @@ function byte_check(wr_message, sms_bytes) // 비회원 목록 $sql = " select * from {$g5['sms5_history_table']} where wr_no = '$wr_no' and bk_no = 0 "; $qry = sql_query($sql); - $tot = mysql_num_rows($qry); + $tot = sql_num_rows($qry); if ($tot > 0) { diff --git a/adm/sms_admin/sms_write_send.php b/adm/sms_admin/sms_write_send.php index f256c3e41..333b58c7c 100644 --- a/adm/sms_admin/sms_write_send.php +++ b/adm/sms_admin/sms_write_send.php @@ -12,6 +12,9 @@ if (!$wr_reply) win_close_alert('회신 번호를 숫자, - 로 입력해주세요.'); +if(!check_vaild_callback($wr_reply)) + win_close_alert('회신 번호를 올바르게 입력해 주십시오.'); + if (!$wr_message) win_close_alert('메세지를 입력해주세요.'); @@ -42,6 +45,9 @@ while ($row = sql_fetch_array($qry)) { $row['bk_hp'] = get_hp($row['bk_hp'], 0); + + if(!$row['bk_hp']) continue; + if ($wr_overlap && array_overlap($hps, $row['bk_hp'])) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); @@ -63,6 +69,8 @@ $hp = get_hp($row['mb_hp'], 0); $mb_id = $row['mb_id']; + if(!$hp) continue; + if ($wr_overlap && array_overlap($hps, $hp)) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); @@ -84,6 +92,8 @@ $hp = get_hp($item[$i][1], 0); $name = $item[$i][0]; + if(!$hp) continue; + if ($wr_overlap && array_overlap($hps, $hp)) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); @@ -99,6 +109,8 @@ $row = sql_fetch("select * from {$g5['sms5_book_table']} where bk_no='$item[$i]'"); $row['bk_hp'] = get_hp($row['bk_hp'], 0); + if(!$row['bk_hp']) continue; + if ($wr_overlap && array_overlap($hps, $row['bk_hp'])) { $overlap++; array_push( $duplicate_data['hp'], $row['bk_hp'] ); diff --git a/bbs/list.php b/bbs/list.php index b756bb03c..3fab5acfa 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -53,7 +53,7 @@ /* $sql = " select distinct wr_parent from {$write_table} where {$sql_search} "; $result = sql_query($sql); - $total_count = mysql_num_rows($result); + $total_count = sql_num_rows($result); */ } else { $sql_search = ""; diff --git a/bbs/move_update.php b/bbs/move_update.php index bfaf54bcf..e3919905f 100644 --- a/bbs/move_update.php +++ b/bbs/move_update.php @@ -99,7 +99,7 @@ wr_10 = '".addslashes($row2['wr_10'])."' "; sql_query($sql); - $insert_id = mysql_insert_id(); + $insert_id = sql_insert_id(); // 코멘트가 아니라면 if (!$row2['wr_is_comment']) diff --git a/bbs/qawrite_update.php b/bbs/qawrite_update.php index 5b5c6c422..a58255b09 100644 --- a/bbs/qawrite_update.php +++ b/bbs/qawrite_update.php @@ -244,7 +244,7 @@ sql_query($sql); if($w == '' || $w == 'r') { - $qa_id = mysql_insert_id(); + $qa_id = sql_insert_id(); if($w == 'r' && $write['qa_related']) { $qa_related = $write['qa_related']; diff --git a/bbs/scrap_popin_update.php b/bbs/scrap_popin_update.php index 0a5ff7394..fdc90f9d2 100644 --- a/bbs/scrap_popin_update.php +++ b/bbs/scrap_popin_update.php @@ -70,7 +70,7 @@ wr_ip = '{$_SERVER['REMOTE_ADDR']}' "; sql_query($sql); - $comment_id = mysql_insert_id(); + $comment_id = sql_insert_id(); // 원글에 코멘트수 증가 sql_query(" update $write_table set wr_comment = wr_comment + 1 where wr_id = '$wr_id' "); diff --git a/bbs/search.php b/bbs/search.php index 0f3fe803b..b9831eb67 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -120,7 +120,7 @@ $sql = " select wr_id from {$tmp_write_table} where {$sql_search} "; $result = sql_query($sql, false); - $row['cnt'] = @mysql_num_rows($result); + $row['cnt'] = @sql_num_rows($result); $total_count += $row['cnt']; if ($row['cnt']) { diff --git a/bbs/sns_send.php b/bbs/sns_send.php index 2a6622d6c..972d16257 100644 --- a/bbs/sns_send.php +++ b/bbs/sns_send.php @@ -12,7 +12,7 @@ header("Location:http://www.facebook.com/sharer/sharer.php?s=100&u=".$short_url."&p=".$title); break; case 'twitter' : - header("Location:http://twitter.com/home?status=".$title_url); + header("Location:https://twitter.com/intent/tweet?text=".$title_url); break; case 'gplus' : header("Location:https://plus.google.com/share?url=".$short_url); diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index c2fdb67e7..4e93d1556 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -167,7 +167,7 @@ wr_10 = '$wr_10' "; sql_query($sql); - $comment_id = mysql_insert_id(); + $comment_id = sql_insert_id(); // 원글에 댓글수 증가 & 마지막 시간 반영 sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last = '".G5_TIME_YMDHIS."' where wr_id = '$wr_id' "); diff --git a/bbs/write_update.php b/bbs/write_update.php index e70f57e6c..5310d2e16 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -244,7 +244,7 @@ wr_10 = '$wr_10' "; sql_query($sql); - $wr_id = mysql_insert_id(); + $wr_id = sql_insert_id(); // 부모 아이디에 UPDATE sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' "); diff --git a/common.php b/common.php index b2b1d1ca7..f46cc542c 100644 --- a/common.php +++ b/common.php @@ -135,7 +135,7 @@ function sql_escape_string($str) // mysql connect resource $g5 배열에 저장 - 명랑폐인님 제안 $g5['connect_db'] = $connect_db; - sql_query(" set names utf8 "); + sql_set_charset('utf8', $connect_db); if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) sql_query("SET SESSION sql_mode = ''"); if (defined(G5_TIMEZONE)) sql_query(" set time_zone = '".G5_TIMEZONE."'"); } else { diff --git a/config.php b/config.php index 33a01f0fb..3486fe0a0 100644 --- a/config.php +++ b/config.php @@ -9,8 +9,8 @@ -define('G5_GNUBOARD_VER', '5.1.2'); -define('G5_YOUNGCART_VER', '5.1.1'); +define('G5_GNUBOARD_VER', '5.1.3'); +define('G5_YOUNGCART_VER', '5.1.2'); // 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음 define('_GNUBOARD_', true); @@ -200,6 +200,9 @@ // 모바일 기기에서 DHTML 에디터 사용여부를 설정합니다. define('G5_IS_MOBILE_DHTML_USE', false); +// MySQLi 사용여부를 설정합니다. +define('G5_MYSQLI_USE', true); + // ip 숨김방법 설정 /* 123.456.789.012 ip의 숨김 방법을 변경하는 방법은 \\1 은 123, \\2는 456, \\3은 789, \\4는 012에 각각 대응되므로 diff --git a/extend/sms5.extend.php b/extend/sms5.extend.php index 6405f1373..eee1022ef 100644 --- a/extend/sms5.extend.php +++ b/extend/sms5.extend.php @@ -22,23 +22,10 @@ $g5['sms5_book_group_table'] = $g5['sms5_prefix'] . 'book_group'; $g5['sms5_form_table'] = $g5['sms5_prefix'] . 'form'; $g5['sms5_form_group_table'] = $g5['sms5_prefix'] . 'form_group'; -$g5['sms5_member_history_table'] = $g5['sms5_prefix'] . 'member_history'; if (!empty($config['cf_sms_use'])) { $sms5 = sql_fetch("select * from {$g5['sms5_config_table']} ", false); - if( $sms5['cf_member'] && trim($member['mb_hp']) ) { - $g5['sms5_use_sideview'] = true; //회원 사이드뷰 레이어에 추가 - } else { - $g5['sms5_use_sideview'] = false; - } - - //============================================================================== - // 스킨경로 - //------------------------------------------------------------------------------ - - $sms5_skin_path = G5_SMS5_PATH.'/skin/'.$sms5['cf_skin']; //sms5 스킨 path - $sms5_skin_url = G5_SMS5_URL .'/skin/'.$sms5['cf_skin']; //sms5 스킨 url // Demo 설정 if (file_exists(G5_PATH.'/DEMO')) diff --git a/g4_import_run.php b/g4_import_run.php index 1d3ea67f4..aa8f8a214 100644 --- a/g4_import_run.php +++ b/g4_import_run.php @@ -169,13 +169,7 @@ function fsearchbox_submit(f) $is_euckr = true; // member table 복사 - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5['member_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5['member_table']); $sql = " select * from {$g4['member_table']} "; $result = sql_query($sql); @@ -325,13 +319,7 @@ function fsearchbox_submit(f) echo '
  • visit sum table 복사
  • '.PHP_EOL; // group table 복사 - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5['group_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5['group_table']); $sql = " select * from {$g4['group_table']} "; $result = sql_query($sql); @@ -365,13 +353,7 @@ function fsearchbox_submit(f) unset($fiels); // board 복사 - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5['board_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5['board_table']); $sql = " select * from {$g4['board_table']} "; $result = sql_query($sql); @@ -413,13 +395,7 @@ function fsearchbox_submit(f) // 게시글 복사 if(sql_query($sql, FALSE)) { $write_table = $g4['write_prefix'].$bo_table; - $columns2 = array(); - $fields2 = mysql_list_fields(G5_MYSQL_DB, $create_table); - $count2 = mysql_num_fields($fields2); - for ($j = 0; $j < $count2; $j++) { - $fld = mysql_field_name($fields2, $j); - $columns2[] = $fld; - } + $columns2 = sql_field_names($create_table); $sql3 = " select * from $write_table "; $result3 = sql_query($sql3); @@ -461,13 +437,7 @@ function fsearchbox_submit(f) $tables = array('board_file', 'board_new', 'board_good', 'mail', 'memo', 'group_member', 'auth', 'popular', 'poll', 'poll_etc', 'scrap'); foreach($tables as $table) { - $columns = array(); - $fields = mysql_list_fields(G5_MYSQL_DB, $g5[$table.'_table']); - $count = mysql_num_fields($fields); - for ($i = 0; $i < $count; $i++) { - $fld = mysql_field_name($fields, $i); - $columns[] = $fld; - } + $columns = sql_field_names($g5[$table.'_table']); $src_table = $g4[$table.'_table']; $dst_table = $g5[$table.'_table']; diff --git a/install/install_db.php b/install/install_db.php index 1a498ea7d..edb532c60 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -8,6 +8,8 @@ header('Pragma: no-cache'); // HTTP/1.0 include_once ('../config.php'); +include_once ('../lib/common.lib.php'); + $title = G5_VERSION." 설치 완료 3/3"; include_once ('./install.inc.php'); @@ -28,7 +30,7 @@ $g5_shop_prefix = $_POST['g5_shop_prefix']; $g5_shop_install= $_POST['g5_shop_install']; -$dblink = @mysql_connect($mysql_host, $mysql_user, $mysql_pass); +$dblink = sql_connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db); if (!$dblink) { ?> @@ -42,7 +44,7 @@ exit; } -$select_db = @mysql_select_db($mysql_db, $dblink); +$select_db = sql_select_db($mysql_db, $dblink); if (!$select_db) { ?> @@ -57,12 +59,14 @@ } $mysql_set_mode = 'false'; -@mysql_query('set names utf8'); -$row = mysql_fetch_assoc(mysql_query(" SELECT @@sql_mode as mode ")); +sql_set_charset('utf8', $dblink); +$result = sql_query(" SELECT @@sql_mode as mode ", true, $dblink); +$row = sql_fetch_array($result); if($row['mode']) { - @mysql_query("SET SESSION sql_mode = ''"); + sql_query("SET SESSION sql_mode = ''", true, $dblink); $mysql_set_mode = 'true'; } +unset($result); unset($row); ?> @@ -72,7 +76,7 @@
      " . $sql); + sql_query($sql, true, $dblink); // 1:1문의 설정 $sql = " insert into `{$table_prefix}qa_config` ( qa_title, qa_category, qa_skin, qa_mobile_skin, qa_use_email, qa_req_email, qa_use_hp, qa_req_hp, qa_use_editor, qa_subject_len, qa_mobile_subject_len, qa_page_rows, qa_mobile_page_rows, qa_image_width, qa_upload_size, qa_insert_content ) values ( '1:1문의', '회원|포인트', 'basic', 'basic', '1', '0', '1', '0', '1', '60', '30', '15', '15', '600', '1048576', '' ) "; - mysql_query($sql); + sql_query($sql, true, $dblink); // 관리자 회원가입 $sql = " insert into `{$table_prefix}member` @@ -201,15 +205,15 @@ mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}' "; - @mysql_query($sql); + sql_query($sql, true, $dblink); // 내용관리 생성 - @mysql_query(" insert into `{$table_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '

      회사소개에 대한 내용을 입력하십시오.

      ', co_skin = 'basic', co_mobile_skin = 'basic' ") or die(mysql_error() . "

      " . $sql); - @mysql_query(" insert into `{$table_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '

      개인정보 처리방침에 대한 내용을 입력하십시오.

      ', co_skin = 'basic', co_mobile_skin = 'basic' ") or die(mysql_error() . "

      " . $sql); - @mysql_query(" insert into `{$table_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '

      서비스 이용약관에 대한 내용을 입력하십시오.

      ', co_skin = 'basic', co_mobile_skin = 'basic' ") or die(mysql_error() . "

      " . $sql); + sql_query(" insert into `{$table_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '

      회사소개에 대한 내용을 입력하십시오.

      ', co_skin = 'basic', co_mobile_skin = 'basic' ", true, $dblink); + sql_query(" insert into `{$table_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '

      개인정보 처리방침에 대한 내용을 입력하십시오.

      ', co_skin = 'basic', co_mobile_skin = 'basic' ", true, $dblink); + sql_query(" insert into `{$table_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '

      서비스 이용약관에 대한 내용을 입력하십시오.

      ', co_skin = 'basic', co_mobile_skin = 'basic' ", true, $dblink); // FAQ Master - @mysql_query(" insert into `{$table_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ") or die(mysql_error() . "

      " . $sql); + sql_query(" insert into `{$table_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ", true, $dblink); } if($g5_shop_install) { @@ -347,10 +351,10 @@ de_sms_cont4 = '{이름}님 입금 감사합니다.\n{입금액}원\n주문번호:\n{주문번호}\n{회사명}', de_sms_cont5 = '{이름}님 배송합니다.\n택배:{택배회사}\n운송장번호:\n{운송장번호}\n{회사명}' "; - mysql_query($sql) or die(mysql_error() . "

      " . $sql); + sql_query($sql, true, $dblink); // 게시판 그룹 생성 - @mysql_query(" insert into `{$table_prefix}group` set gr_id = 'shop', gr_subject = '쇼핑몰' "); + sql_query(" insert into `{$table_prefix}group` set gr_id = 'shop', gr_subject = '쇼핑몰' ", true, $dblink); // 게시판 생성 $tmp_bo_table = array ("qa", "free", "notice"); @@ -421,7 +425,7 @@ bo_use_search = '0', bo_order = '0' "; - @mysql_query($sql); + sql_query($sql, true, $dblink); // 게시판 테이블 생성 $file = file("../adm/sql_write.sql"); @@ -433,7 +437,7 @@ $source = array("/__TABLE_NAME__/", "/;/"); $target = array($create_table, ""); $sql = preg_replace($source, $target, $sql); - @mysql_query($sql); + sql_query($sql, true, $dblink); } } ?> diff --git a/js/common.js b/js/common.js index 5344868bd..d20942579 100644 --- a/js/common.js +++ b/js/common.js @@ -503,14 +503,6 @@ var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_j } } -/** - * sms5 창 - **/ -var win_sms5 = function(href) { - var new_win = window.open(href, 'win_sms5', 'width=474, height=560, scrollbars=1'); - new_win.focus(); -} - /** * 새로운 비밀번호 분실 창 : 101123 **/ @@ -590,11 +582,6 @@ $(function(){ return false; }); - $(".win_sms5").click(function() { - win_sms5(this.href); - return false; - }); - /* $(".win_poll").click(function() { win_poll(this.href); diff --git a/lib/common.lib.php b/lib/common.lib.php index 2cee5e9d5..86d9e31fa 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1260,10 +1260,6 @@ function get_sideview($mb_id, $name='', $email='', $homepage='') } if($mb_id) $str2 .= "전체게시물\n"; - if($g5['sms5_use_sideview']){ - $mb = get_member($mb_id, " mb_open, mb_sms , mb_hp "); - if( $mb['mb_open'] && $mb['mb_sms'] && $mb['mb_hp'] ) $str2 .= "문자보내기\n"; - } if($is_admin == "super" && $mb_id) { $str2 .= "회원정보변경\n"; $str2 .= "포인트내역\n"; @@ -1416,11 +1412,22 @@ function html_symbol($str) *************************************************************************/ // DB 연결 -function sql_connect($host, $user, $pass) +function sql_connect($host, $user, $pass, $db=G5_MYSQL_DB) { global $g5; - return @mysql_connect($host, $user, $pass); + if(function_exists('mysqli_connect') && G5_MYSQLI_USE) { + $link = mysqli_connect($host, $user, $pass, $db); + + // 연결 오류 발생 시 스크립트 종료 + if (mysqli_connect_errno()) { + die('Connect Error: '.mysqli_connect_error()); + } + } else { + $link = mysql_connect($host, $user, $pass); + } + + return $link; } @@ -1429,16 +1436,36 @@ function sql_select_db($db, $connect) { global $g5; - return @mysql_select_db($db, $connect); + if(function_exists('mysqli_select_db') && G5_MYSQLI_USE) + return @mysqli_select_db($connect, $db); + else + return @mysql_select_db($db, $connect); } -// mysql_query 와 mysql_error 를 한꺼번에 처리 +function sql_set_charset($charset, $link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_set_charset') && G5_MYSQLI_USE) + mysqli_set_charset($link, $charset); + else + sql_query(" set names {$charset} "); +} + + +// mysqli_query 와 mysqli_error 를 한꺼번에 처리 // mysql connect resource 지정 - 명랑폐인님 제안 -function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR) +function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null) { global $g5; + if(!$link) + $link = $g5['connect_db']; + // Blind SQL Injection 취약점 해결 $sql = trim($sql); // union의 사용을 허락하지 않습니다. @@ -1447,20 +1474,34 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR) // `information_schema` DB로의 접근을 허락하지 않습니다. $sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql); - if ($error) - $result = @mysql_query($sql, $g5['connect_db']) or die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); - else - $result = @mysql_query($sql, $g5['connect_db']); + if(function_exists('mysqli_query') && G5_MYSQLI_USE) { + if ($error) { + $result = @mysqli_query($link, $sql) or die("

      $sql

      " . mysqli_errno($link) . " : " . mysqli_error($link) . "

      error file : {$_SERVER['SCRIPT_NAME']}"); + } else { + $result = @mysqli_query($link, $sql); + } + } else { + if ($error) { + $result = @mysql_query($sql, $link) or die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); + } else { + $result = @mysql_query($sql, $link); + } + } return $result; } // 쿼리를 실행한 후 결과값에서 한행을 얻는다. -function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR) +function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null) { - $result = sql_query($sql, $error); - //$row = @sql_fetch_array($result) or die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : $_SERVER['SCRIPT_NAME']"); + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + $result = sql_query($sql, $error, $link); + //$row = @sql_fetch_array($result) or die("

      $sql

      " . mysqli_errno() . " : " . mysqli_error() . "

      error file : $_SERVER['SCRIPT_NAME']"); $row = sql_fetch_array($result); return $row; } @@ -1469,7 +1510,11 @@ function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR) // 결과값에서 한행 연관배열(이름으로)로 얻는다. function sql_fetch_array($result) { - $row = @mysql_fetch_assoc($result); + if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE) + $row = @mysqli_fetch_assoc($result); + else + $row = @mysql_fetch_assoc($result); + return $row; } @@ -1479,7 +1524,10 @@ function sql_fetch_array($result) // 단, 결과 값은 스크립트(script) 실행부가 종료되면서 메모리에서 자동적으로 지워진다. function sql_free_result($result) { - return mysql_free_result($result); + if(function_exists('mysqli_free_result') && G5_MYSQLI_USE) + return mysqli_free_result($result); + else + return mysql_free_result($result); } @@ -1493,6 +1541,74 @@ function sql_password($value) } +function sql_insert_id($link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_insert_id') && G5_MYSQLI_USE) + return mysqli_insert_id($link); + else + return mysql_insert_id($link); +} + + +function sql_num_rows($result) +{ + if(function_exists('mysqli_num_rows') && G5_MYSQLI_USE) + return mysqli_num_rows($result); + else + return mysql_num_rows($result); +} + + +function sql_field_names($table, $link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + $columns = array(); + + $sql = " select * from `$table` limit 1 "; + $result = sql_query($sql, $link); + + if(function_exists('mysqli_fetch_field') && G5_MYSQLI_USE) { + while($field = mysqli_fetch_field($result)) { + $columns[] = $field->name; + } + } else { + $i = 0; + $cnt = mysql_num_fields($result); + while($i < $cnt) { + $field = mysql_fetch_field($result, $i); + $columns[] = $field->name; + $i++; + } + } + + return $columns; +} + + +function sql_error_info($link=null) +{ + global $g5; + + if(!$link) + $link = $g5['connect_db']; + + if(function_exists('mysqli_error') && G5_MYSQLI_USE) { + return mysqli_errno($link) . ' : ' . mysqli_error($link); + } else { + return mysql_errno($link) . ' : ' . mysql_error($link); + } +} + + // PHPMyAdmin 참고 function get_table_define($table, $crlf="\n") { @@ -1893,12 +2009,15 @@ function convert_charset($from_charset, $to_charset, $str) } -// mysql_real_escape_string 의 alias 기능을 한다. -function sql_real_escape_string($field) +// mysqli_real_escape_string 의 alias 기능을 한다. +function sql_real_escape_string($str, $link=null) { global $g5; - return mysql_real_escape_string($field, $g5['connect_db']); + if(!$link) + $link = $g5['connect_db']; + + return mysqli_real_escape_string($link, $str); } function escape_trim($field) @@ -3032,4 +3151,29 @@ function get_skin_url($dir, $skin) return str_replace(G5_PATH, G5_URL, $skin_path); } + +// 발신번호 유효성 체크 +function check_vaild_callback($callback){ + $_callback = preg_replace('/[^0-9]/','', $callback); + + /** + * 1588 로시작하면 총8자리인데 7자리라 차단 + * 02 로시작하면 총9자리 또는 10자리인데 11자리라차단 + * 1366은 그자체가 원번호이기에 다른게 붙으면 차단 + * 030으로 시작하면 총10자리 또는 11자리인데 9자리라차단 + */ + + if( substr($_callback,0,4) == '1588') if( strlen($_callback) != 8) return false; + if( substr($_callback,0,2) == '02') if( strlen($_callback) != 9 && strlen($_callback) != 10 ) return false; + if( substr($_callback,0,3) == '030') if( strlen($_callback) != 10 && strlen($_callback) != 11 ) return false; + + if( !preg_match("/^(02|0[3-6]\d|01(0|1|3|5|6|7|8|9)|070|080|007)\-?\d{3,4}\-?\d{4,5}$/",$_callback) && + !preg_match("/^(15|16|18)\d{2}\-?\d{4,5}$/",$_callback) ){ + return false; + } else if( preg_match("/^(02|0[3-6]\d|01(0|1|3|5|6|7|8|9)|070|080)\-?0{3,4}\-?\d{4}$/",$_callback )) { + return false; + } else { + return true; + } +} ?> \ No newline at end of file diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 39be62e30..273f88a43 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -259,7 +259,7 @@ function run() { $sql = $this->query; $result = sql_query($sql); - $this->total_count = @mysql_num_rows($result); + $this->total_count = @sql_num_rows($result); } else { @@ -746,7 +746,7 @@ function display_type($type, $list_skin='', $list_mod='', $list_row='', $img_wid $sql .= " order by it_order, it_id desc limit $items "; $result = sql_query($sql); /* - if (!mysql_num_rows($result)) { + if (!sql_num_rows($result)) { return false; } */ @@ -781,7 +781,7 @@ function mobile_display_type($type, $skin_file, $list_row, $img_width, $img_heig $sql .= " order by it_order, it_id desc limit $items "; $result = sql_query($sql); /* - if (!mysql_num_rows($result)) { + if (!sql_num_rows($result)) { return false; } */ @@ -810,7 +810,7 @@ function display_category($no, $list_mod, $list_row, $img_width, $img_height, $c $sql .= " and ca_id LIKE '{$ca_id}%' "; $sql .= " order by it_order, it_id desc limit $items "; $result = sql_query($sql); - if (!mysql_num_rows($result)) { + if (!sql_num_rows($result)) { return false; } @@ -938,7 +938,7 @@ function get_item_options($it_id, $subject) $sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' and io_use = '1' order by io_no asc "; $result = sql_query($sql); - if(!mysql_num_rows($result)) + if(!sql_num_rows($result)) return ''; $str = ''; @@ -1026,7 +1026,7 @@ function get_item_supply($it_id, $subject) $sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' and io_use = '1' order by io_no asc "; $result = sql_query($sql); - if(!mysql_num_rows($result)) + if(!sql_num_rows($result)) return ''; $str = ''; @@ -1169,7 +1169,7 @@ function display_event($no, $event, $list_mod, $list_row, $img_width, $img_heigh if ($ca_id) $sql .= " and ca_id = '$ca_id' "; $sql .= " order by b.it_order, a.it_id desc limit $items "; $result = sql_query($sql); - if (!mysql_num_rows($result)) { + if (!sql_num_rows($result)) { return false; } diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index a40cb99e4..0033c2aed 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -474,7 +474,7 @@ function UnsharpMask($img, $amount, $radius, $threshold) { $radius = abs(round($radius)); // Only integers make sense. if ($radius == 0) { - return $img; imagedestroy($img); break; } + return $img; imagedestroy($img); } $w = imagesx($img); $h = imagesy($img); $imgCanvas = imagecreatetruecolor($w, $h); $imgBlur = imagecreatetruecolor($w, $h); diff --git a/mobile/shop/cart.php b/mobile/shop/cart.php index 8cb48f886..e8395bda9 100644 --- a/mobile/shop/cart.php +++ b/mobile/shop/cart.php @@ -31,7 +31,7 @@ $sql .= " order by a.ct_id "; $result = sql_query($sql); -$cart_count = mysql_num_rows($result); +$cart_count = sql_num_rows($result); ?> diff --git a/mobile/shop/category.php b/mobile/shop/category.php index 2bda3e411..3f96b08ac 100644 --- a/mobile/shop/category.php +++ b/mobile/shop/category.php @@ -34,7 +34,7 @@ function get_mshop_category($ca_id, $len) '.get_text($mshop_ca_row1['ca_name']).' 하위분류 열기'.PHP_EOL; for($j=0; $mshop_ca_row2=sql_fetch_array($mshop_ca_res2); $j++) { @@ -45,7 +45,7 @@ function get_mshop_category($ca_id, $len) - '.get_text($mshop_ca_row2['ca_name']).' 하위분류 열기'.PHP_EOL; for($k=0; $mshop_ca_row3=sql_fetch_array($mshop_ca_res3); $k++) { @@ -56,7 +56,7 @@ function get_mshop_category($ca_id, $len) - '.get_text($mshop_ca_row3['ca_name']).' 하위분류 열기'.PHP_EOL; for($m=0; $mshop_ca_row4=sql_fetch_array($mshop_ca_res4); $m++) { @@ -67,7 +67,7 @@ function get_mshop_category($ca_id, $len) - '.get_text($mshop_ca_row4['ca_name']).' 하위분류 열기'.PHP_EOL; for($n=0; $mshop_ca_row5=sql_fetch_array($mshop_ca_res5); $n++) { diff --git a/mobile/shop/item.php b/mobile/shop/item.php index 3a2100383..2eedd90e6 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -56,7 +56,7 @@ // 조회수 증가 if (get_cookie('ck_it_id') != $it_id) { sql_query(" update {$g5['g5_shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가 - set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장 + set_cookie("ck_it_id", $it_id, 3600); // 1시간동안 저장 } // 이전 상품보기 diff --git a/mobile/shop/orderform.sub.php b/mobile/shop/orderform.sub.php index a70a0e49a..d3b00d54d 100644 --- a/mobile/shop/orderform.sub.php +++ b/mobile/shop/orderform.sub.php @@ -57,7 +57,7 @@ $comm_free_mny = 0; // 면세금액 $tot_tax_mny = 0; - for ($i=0; $row=mysql_fetch_array($result); $i++) + for ($i=0; $row=sql_fetch_array($result); $i++) { // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index 128cce991..65ad7092a 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -736,7 +736,7 @@ if($is_sms_send) { $sms_contents = array($default['de_sms_cont2'], $default['de_sms_cont3']); $recv_numbers = array($od_hp, $default['de_sms_hp']); - $send_numbers = array($default['de_admin_company_tel'], $od_hp); + $send_numbers = array($default['de_admin_company_tel'], $default['de_admin_company_tel']); $sms_count = 0; $sms_messages = array(); diff --git a/mobile/shop/personalpayformupdate.php b/mobile/shop/personalpayformupdate.php index ff04e8fcf..d5fa6ca2c 100644 --- a/mobile/shop/personalpayformupdate.php +++ b/mobile/shop/personalpayformupdate.php @@ -166,7 +166,7 @@ break; } - die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); + die("

      $sql

      " . sql_error_info() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); } // 주문번호가 있으면 결제정보 반영 @@ -204,7 +204,7 @@ break; } - die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); + die("

      $sql

      " . sql_error_info() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); } // 미수금 정보 업데이트 diff --git a/mobile/shop/wishlist.php b/mobile/shop/wishlist.php index b903bbcce..ffa483745 100644 --- a/mobile/shop/wishlist.php +++ b/mobile/shop/wishlist.php @@ -28,7 +28,7 @@ where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc "; $result = sql_query($sql); - for ($i=0; $row = mysql_fetch_array($result); $i++) { + for ($i=0; $row = sql_fetch_array($result); $i++) { $out_cd = ''; $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' "; diff --git a/mobile/skin/shop/basic/main.event.skin.php b/mobile/skin/shop/basic/main.event.skin.php index 0c7a478ab..31e821811 100644 --- a/mobile/skin/shop/basic/main.event.skin.php +++ b/mobile/skin/shop/basic/main.event.skin.php @@ -5,7 +5,7 @@ $hsql = " select ev_id, ev_subject, ev_subject_strong from {$g5['g5_shop_event_table']} where ev_use = '1' order by ev_id desc "; $hresult = sql_query($hsql); -if(mysql_num_rows($hresult)) { +if(sql_num_rows($hresult)) { // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); ?> diff --git a/plugin/sms5/sms5.lib.php b/plugin/sms5/sms5.lib.php index 8979454dc..175c74f36 100644 --- a/plugin/sms5/sms5.lib.php +++ b/plugin/sms5/sms5.lib.php @@ -7,19 +7,6 @@ ** *************************************************************************/ -// 스킨디렉토리를 SELECT 형식으로 얻음 -function get_sms5_skin_select($skin_gubun, $id, $name, $selected='', $event='') -{ - $skins = get_skin_dir($skin_gubun, G5_SMS5_PATH); - $str = ""; - return $str; -} - // 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL function sms5_sub_paging($write_pages, $cur_page, $total_page, $url, $add="", $starget="") { diff --git a/shop/cart.php b/shop/cart.php index 807a61df4..0070cb1e1 100644 --- a/shop/cart.php +++ b/shop/cart.php @@ -82,7 +82,7 @@ $it_send_cost = 0; - for ($i=0; $row=mysql_fetch_array($result); $i++) + for ($i=0; $row=sql_fetch_array($result); $i++) { // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, diff --git a/shop/cartoption.php b/shop/cartoption.php index 599850bc6..a0a37e7eb 100644 --- a/shop/cartoption.php +++ b/shop/cartoption.php @@ -19,7 +19,7 @@ $sql2 = " select ct_price, it_name, ct_send_cost from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by ct_id asc limit 1 "; $row2 = sql_fetch($sql2); -if(!mysql_num_rows($result)) +if(!sql_num_rows($result)) die('no-cart'); ?> diff --git a/shop/item.php b/shop/item.php index 8e022cfce..19378d9db 100644 --- a/shop/item.php +++ b/shop/item.php @@ -54,7 +54,7 @@ // 조회수 증가 if (get_cookie('ck_it_id') != $it_id) { sql_query(" update {$g5['g5_shop_item_table']} set it_hit = it_hit + 1 where it_id = '$it_id' "); // 1증가 - set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장 + set_cookie("ck_it_id", $it_id, 3600); // 1시간동안 저장 } // 스킨경로 @@ -174,7 +174,7 @@ // 관련상품의 개수를 얻음 if($default['de_rel_list_use']) { - $sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and and b.it_use='1' "; + $sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' "; $row = sql_fetch($sql); $item_relation_count = $row['cnt']; } diff --git a/shop/orderaddress.php b/shop/orderaddress.php index ea8425f59..485bef220 100644 --- a/shop/orderaddress.php +++ b/shop/orderaddress.php @@ -28,7 +28,7 @@ $result = sql_query($sql); -if(!mysql_num_rows($result)) +if(!sql_num_rows($result)) alert_close('배송지 목록 자료가 없습니다.'); $order_action_url = G5_HTTPS_SHOP_URL.'/orderaddressupdate.php'; diff --git a/shop/ordercoupon.php b/shop/ordercoupon.php index df5eba08f..c85acda20 100644 --- a/shop/ordercoupon.php +++ b/shop/ordercoupon.php @@ -18,7 +18,7 @@ and cp_end >= '".G5_TIME_YMD."' and cp_minimum <= '$price' "; $result = sql_query($sql); -$count = mysql_num_rows($result); +$count = sql_num_rows($result); ?> diff --git a/shop/ordererrormail.php b/shop/ordererrormail.php index 7f95a8d37..eca98869c 100644 --- a/shop/ordererrormail.php +++ b/shop/ordererrormail.php @@ -17,7 +17,7 @@ } $content .= '

      오류내용

      '; -$content .= '

      '.$sql.'

      '.mysql_errno().' : '.mysql_error().'

      error file : '.$_SERVER['SCRIPT_NAME'].'

      '; +$content .= '

      '.$sql.'

      '.sql_error_info().'

      error file : '.$_SERVER['SCRIPT_NAME'].'

      '; // 메일발송 mailer($od_name, $od_email, $config['cf_admin_email'], $subject, $content, 1); diff --git a/shop/orderform.sub.php b/shop/orderform.sub.php index e835bd19b..eb8bd9576 100644 --- a/shop/orderform.sub.php +++ b/shop/orderform.sub.php @@ -69,7 +69,7 @@ $comm_free_mny = 0; // 면세금액 $tot_tax_mny = 0; - for ($i=0; $row=mysql_fetch_array($result); $i++) + for ($i=0; $row=sql_fetch_array($result); $i++) { // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index 823423441..921445f59 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -721,7 +721,7 @@ if($is_sms_send) { $sms_contents = array($default['de_sms_cont2'], $default['de_sms_cont3']); $recv_numbers = array($od_hp, $default['de_sms_hp']); - $send_numbers = array($default['de_admin_company_tel'], $od_hp); + $send_numbers = array($default['de_admin_company_tel'], $default['de_admin_company_tel']); $sms_count = 0; $sms_messages = array(); diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php index b8a5634d8..ad93d14c4 100644 --- a/shop/orderinquiryview.php +++ b/shop/orderinquiryview.php @@ -96,7 +96,7 @@ and it_id = '{$row['it_id']}' order by io_type asc, ct_id asc "; $res = sql_query($sql); - $rowspan = mysql_num_rows($res) + 1; + $rowspan = sql_num_rows($res) + 1; // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, diff --git a/shop/orderitemcoupon.php b/shop/orderitemcoupon.php index 7bf6ab17b..099de59d0 100644 --- a/shop/orderitemcoupon.php +++ b/shop/orderitemcoupon.php @@ -36,7 +36,7 @@ ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) ) ) "; $result = sql_query($sql); -$count = mysql_num_rows($result); +$count = sql_num_rows($result); ?> diff --git a/shop/ordersendcostcoupon.php b/shop/ordersendcostcoupon.php index a12edafa7..4d4a2c14f 100644 --- a/shop/ordersendcostcoupon.php +++ b/shop/ordersendcostcoupon.php @@ -16,7 +16,7 @@ and cp_end >= '".G5_TIME_YMD."' and cp_minimum <= '$price' "; $result = sql_query($sql); -$count = mysql_num_rows($result); +$count = sql_num_rows($result); ?> diff --git a/shop/personalpayformupdate.php b/shop/personalpayformupdate.php index 556782289..b53d6f54b 100644 --- a/shop/personalpayformupdate.php +++ b/shop/personalpayformupdate.php @@ -162,7 +162,7 @@ break; } - die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); + die("

      $sql

      " . sql_error_info() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); } // 주문번호가 있으면 결제정보 반영 @@ -200,7 +200,7 @@ break; } - die("

      $sql

      " . mysql_errno() . " : " . mysql_error() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); + die("

      $sql

      " . sql_error_info() . "

      error file : {$_SERVER['SCRIPT_NAME']}"); } // 미수금 정보 업데이트 diff --git a/shop/price/daum.php b/shop/price/daum.php index c8db5de46..2c9a58273 100644 --- a/shop/price/daum.php +++ b/shop/price/daum.php @@ -3,7 +3,7 @@ -ob_start(); +ob_start(); header("Content-Type: text/html; charset=utf-8"); @@ -119,7 +119,7 @@ // 상품이미지 $img_url = get_it_imageurl($row['it_id']); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}pid{$gt}{$row['it_id']} {$lt}price{$gt}{$row['it_price']} @@ -142,13 +142,14 @@ {$lt}end{$gt} HEREDOC; + +echo iconv('utf-8', 'euc-kr', $str); } -$content = ob_get_contents(); -ob_end_clean(); +$content = ob_get_contents(); +ob_end_clean(); -$content = iconv('utf-8', 'euc-kr', $content); -echo $content; +echo $content; ?> \ No newline at end of file diff --git a/shop/price/naver.php b/shop/price/naver.php index fea228814..df321c2d5 100644 --- a/shop/price/naver.php +++ b/shop/price/naver.php @@ -84,7 +84,7 @@ // 포인트 $it_point = get_item_point($row); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}mapid{$gt}{$row['it_id']} {$lt}pname{$gt}{$row['it_name']} @@ -114,13 +114,13 @@ {$lt}ftend{$gt} HEREDOC; + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); } $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price/naver_new.php b/shop/price/naver_new.php index a68ea7c70..c0a93eb8d 100644 --- a/shop/price/naver_new.php +++ b/shop/price/naver_new.php @@ -85,7 +85,7 @@ // 포인트 $it_point = get_item_point($row); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}mapid{$gt}{$row['it_id']} {$lt}pname{$gt}{$row['it_name']} @@ -115,13 +115,13 @@ {$lt}ftend{$gt} HEREDOC; + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); } $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price/naver_new_summary.php b/shop/price/naver_new_summary.php index e07831e55..3618dc52e 100644 --- a/shop/price/naver_new_summary.php +++ b/shop/price/naver_new_summary.php @@ -29,29 +29,31 @@ { $stock_qty = get_it_stock_qty($row['it_id']); - echo "{$lt}begin{$gt}\n"; - echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + $str = ''; + + $str .= "{$lt}begin{$gt}\n"; + $str .= "{$lt}mapid{$gt}{$row['it_id']}\n"; if ($stock_qty <= 0) { // 품절 상품 양식 - echo "{$lt}class{$gt}D\n"; + $str .= "{$lt}class{$gt}D\n"; } else { // 업데이트 상품 양식 & 품절 복구 상품 양식 - echo "{$lt}pname{$gt}{$row['it_name']}\n"; - echo "{$lt}price{$gt}{$row['it_price']}\n"; - echo "{$lt}class{$gt}U\n"; + $str .= "{$lt}pname{$gt}{$row['it_name']}\n"; + $str .= "{$lt}price{$gt}{$row['it_price']}\n"; + $str .= "{$lt}class{$gt}U\n"; } - echo "{$lt}utime{$gt}{$row['it_time']}\n"; - echo "{$lt}ftend{$gt}\n"; + $str .= "{$lt}utime{$gt}{$row['it_time']}\n"; + $str .= "{$lt}ftend{$gt}\n"; + + // 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 + echo iconv('utf-8', 'euc-kr', $str); } $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price/naver_summary.php b/shop/price/naver_summary.php index 47042358f..0d8a81708 100644 --- a/shop/price/naver_summary.php +++ b/shop/price/naver_summary.php @@ -26,29 +26,31 @@ { $stock_qty = get_it_stock_qty($row['it_id']); - echo "{$lt}begin{$gt}\n"; - echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + $str = ''; + + $str .= "{$lt}begin{$gt}\n"; + $str .= "{$lt}mapid{$gt}{$row['it_id']}\n"; if ($stock_qty <= 0) { // 품절 상품 양식 - echo "{$lt}class{$gt}D\n"; + $str .= "{$lt}class{$gt}D\n"; } else { // 업데이트 상품 양식 & 품절 복구 상품 양식 - echo "{$lt}pname{$gt}{$row['it_name']}\n"; - echo "{$lt}price{$gt}{$row['it_price']}\n"; - echo "{$lt}class{$gt}U\n"; + $str .= "{$lt}pname{$gt}{$row['it_name']}\n"; + $str .= "{$lt}price{$gt}{$row['it_price']}\n"; + $str .= "{$lt}class{$gt}U\n"; } - echo "{$lt}utime{$gt}{$row['it_time']}\n"; - echo "{$lt}ftend{$gt}\n"; + $str .= "{$lt}utime{$gt}{$row['it_time']}\n"; + $str .= "{$lt}ftend{$gt}\n"; + + // 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 + echo iconv('utf-8', 'euc-kr', $str); } $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price2/daum.php b/shop/price2/daum.php index 1009bcb95..1439f849c 100644 --- a/shop/price2/daum.php +++ b/shop/price2/daum.php @@ -107,7 +107,7 @@ // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; @@ -124,7 +124,7 @@ $deliv2 = ""; } - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}pid{$gt}{$row['it_id']} {$lt}price{$gt}$it_price @@ -148,6 +148,9 @@ HEREDOC; +// 131227 : 쇼핑하우에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); + } else { $subj = explode(',', $row['it_option_subject']); for($k=0; $row2=sql_fetch_array($result2); $k++) { @@ -171,7 +174,7 @@ $deliv2 = ""; } - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}pid{$gt}{$row['it_id']} {$lt}price{$gt}$it_price @@ -195,6 +198,9 @@ HEREDOC; +// 131227 : 쇼핑하우에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); + } } } @@ -202,8 +208,5 @@ $content = ob_get_contents(); ob_end_clean(); -// 131227 : 쇼핑하우에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price2/naver.php b/shop/price2/naver.php index 3491a41b4..3ad75262b 100644 --- a/shop/price2/naver.php +++ b/shop/price2/naver.php @@ -79,7 +79,7 @@ // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; @@ -88,7 +88,7 @@ $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); $it_point = get_item_point($row); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}mapid{$gt}{$row['it_id']} {$lt}pname{$gt}$it_name @@ -119,6 +119,9 @@ HEREDOC; +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); + } else { $subj = explode(',', $row['it_option_subject']); for($k=0; $row2=sql_fetch_array($result2); $k++) { @@ -134,7 +137,7 @@ $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); $it_point = get_item_point($row, $row2['io_id']); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}mapid{$gt}{$row['it_id']} {$lt}pname{$gt}$it_name @@ -164,6 +167,9 @@ {$lt}ftend{$gt} HEREDOC; + +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); } } } @@ -171,8 +177,5 @@ $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price2/naver_new.php b/shop/price2/naver_new.php index eaf443442..7909ab762 100644 --- a/shop/price2/naver_new.php +++ b/shop/price2/naver_new.php @@ -80,7 +80,7 @@ // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; @@ -89,7 +89,7 @@ $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); $it_point = get_item_point($row); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}mapid{$gt}{$row['it_id']} {$lt}pname{$gt}$it_name @@ -120,6 +120,9 @@ HEREDOC; +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); + } else { $subj = explode(',', $row['it_option_subject']); for($k=0; $row2=sql_fetch_array($result2); $k++) { @@ -135,7 +138,7 @@ $delivery = get_item_sendcost2($row['it_id'], $it_price, 1); $it_point = get_item_point($row, $row2['io_id']); - echo <<< HEREDOC + $str = <<< HEREDOC {$lt}begin{$gt} {$lt}mapid{$gt}{$row['it_id']} {$lt}pname{$gt}$it_name @@ -166,6 +169,9 @@ HEREDOC; +// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 +echo iconv('utf-8', 'euc-kr', $str); + } } } @@ -173,8 +179,5 @@ $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price2/naver_new_summary.php b/shop/price2/naver_new_summary.php index d4e0b1257..513ddffbc 100644 --- a/shop/price2/naver_new_summary.php +++ b/shop/price2/naver_new_summary.php @@ -30,29 +30,34 @@ // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; $it_price = $row['it_price']; $stock_qty = get_it_stock_qty($row['it_id']); - echo "{$lt}begin{$gt}\n"; - echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + $str = ''; + + $str .= "{$lt}begin{$gt}\n"; + $str .= "{$lt}mapid{$gt}{$row['it_id']}\n"; if ($stock_qty <= 0) { // 품절 상품 양식 - echo "{$lt}class{$gt}D\n"; + $str .= "{$lt}class{$gt}D\n"; } else { // 업데이트 상품 양식 & 품절 복구 상품 양식 - echo "{$lt}pname{$gt}{$it_name}\n"; - echo "{$lt}price{$gt}{$it_price}\n"; - echo "{$lt}class{$gt}U\n"; + $str .= "{$lt}pname{$gt}{$it_name}\n"; + $str .= "{$lt}price{$gt}{$it_price}\n"; + $str .= "{$lt}class{$gt}U\n"; } - echo "{$lt}utime{$gt}{$row['it_time']}\n"; - echo "{$lt}ftend{$gt}\n"; + $str .= "{$lt}utime{$gt}{$row['it_time']}\n"; + $str .= "{$lt}ftend{$gt}\n"; + + // 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 + echo iconv('utf-8', 'euc-kr', $str); } else { $subj = explode(',', $row['it_option_subject']); @@ -67,22 +72,27 @@ $it_price = $row['it_price'] + $row2['io_price']; $stock_qty = get_option_stock_qty($row['it_id'], $row2['io_id'], 0); - echo "{$lt}begin{$gt}\n"; - echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + $str = ''; + + $str .= "{$lt}begin{$gt}\n"; + $str .= "{$lt}mapid{$gt}{$row['it_id']}\n"; if ($stock_qty <= 0) { // 품절 상품 양식 - echo "{$lt}class{$gt}D\n"; + $str .= "{$lt}class{$gt}D\n"; } else { // 업데이트 상품 양식 & 품절 복구 상품 양식 - echo "{$lt}pname{$gt}{$it_name}\n"; - echo "{$lt}price{$gt}{$it_price}\n"; - echo "{$lt}class{$gt}U\n"; + $str .= "{$lt}pname{$gt}{$it_name}\n"; + $str .= "{$lt}price{$gt}{$it_price}\n"; + $str .= "{$lt}class{$gt}U\n"; } - echo "{$lt}utime{$gt}{$row['it_time']}\n"; - echo "{$lt}ftend{$gt}\n"; + $str .= "{$lt}utime{$gt}{$row['it_time']}\n"; + $str .= "{$lt}ftend{$gt}\n"; + + // 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 + echo iconv('utf-8', 'euc-kr', $str); } } } @@ -90,8 +100,5 @@ $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/price2/naver_summary.php b/shop/price2/naver_summary.php index ded9fc60a..ba286a765 100644 --- a/shop/price2/naver_summary.php +++ b/shop/price2/naver_summary.php @@ -27,29 +27,34 @@ // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; $it_price = $row['it_price']; $stock_qty = get_it_stock_qty($row['it_id']); - echo "{$lt}begin{$gt}\n"; - echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + $str = ''; + + $str .= "{$lt}begin{$gt}\n"; + $str .= "{$lt}mapid{$gt}{$row['it_id']}\n"; if ($stock_qty <= 0) { // 품절 상품 양식 - echo "{$lt}class{$gt}D\n"; + $str .= "{$lt}class{$gt}D\n"; } else { // 업데이트 상품 양식 & 품절 복구 상품 양식 - echo "{$lt}pname{$gt}{$it_name}\n"; - echo "{$lt}price{$gt}{$it_price}\n"; - echo "{$lt}class{$gt}U\n"; + $str .= "{$lt}pname{$gt}{$it_name}\n"; + $str .= "{$lt}price{$gt}{$it_price}\n"; + $str .= "{$lt}class{$gt}U\n"; } - echo "{$lt}utime{$gt}{$row['it_time']}\n"; - echo "{$lt}ftend{$gt}\n"; + $str .= "{$lt}utime{$gt}{$row['it_time']}\n"; + $str .= "{$lt}ftend{$gt}\n"; + + // 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 + echo iconv('utf-8', 'euc-kr', $str); } else { $subj = explode(',', $row['it_option_subject']); @@ -64,22 +69,27 @@ $it_price = $row['it_price'] + $row2['io_price']; $stock_qty = get_option_stock_qty($row['it_id'], $row2['io_id'], 0); - echo "{$lt}begin{$gt}\n"; - echo "{$lt}mapid{$gt}{$row['it_id']}\n"; + $str = ''; + + $str .= "{$lt}begin{$gt}\n"; + $str .= "{$lt}mapid{$gt}{$row['it_id']}\n"; if ($stock_qty <= 0) { // 품절 상품 양식 - echo "{$lt}class{$gt}D\n"; + $str .= "{$lt}class{$gt}D\n"; } else { // 업데이트 상품 양식 & 품절 복구 상품 양식 - echo "{$lt}pname{$gt}{$it_name}\n"; - echo "{$lt}price{$gt}{$it_price}\n"; - echo "{$lt}class{$gt}U\n"; + $str .= "{$lt}pname{$gt}{$it_name}\n"; + $str .= "{$lt}price{$gt}{$it_price}\n"; + $str .= "{$lt}class{$gt}U\n"; } - echo "{$lt}utime{$gt}{$row['it_time']}\n"; - echo "{$lt}ftend{$gt}\n"; + $str .= "{$lt}utime{$gt}{$row['it_time']}\n"; + $str .= "{$lt}ftend{$gt}\n"; + + // 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 + echo iconv('utf-8', 'euc-kr', $str); } } @@ -88,8 +98,5 @@ $content = ob_get_contents(); ob_end_clean(); -// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음 -$content = iconv('utf-8', 'euc-kr', $content); - echo $content; ?> \ No newline at end of file diff --git a/shop/wishlist.php b/shop/wishlist.php index 6b81f656d..a30e53c34 100644 --- a/shop/wishlist.php +++ b/shop/wishlist.php @@ -47,7 +47,7 @@ $sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) "; $sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc "; $result = sql_query($sql); - for ($i=0; $row = mysql_fetch_array($result); $i++) { + for ($i=0; $row = sql_fetch_array($result); $i++) { $out_cd = ''; $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' "; diff --git a/skin/shop/basic/boxcategory.skin.php b/skin/shop/basic/boxcategory.skin.php index 78511a122..7e9ffb12f 100644 --- a/skin/shop/basic/boxcategory.skin.php +++ b/skin/shop/basic/boxcategory.skin.php @@ -20,7 +20,7 @@ // 2단계 분류 판매 가능한 것만 $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_order, ca_id "; $result2 = sql_query($sql2); - $count = mysql_num_rows($result2); + $count = sql_num_rows($result2); ?>

    1. diff --git a/theme/basic/mobile/shop/category.php b/theme/basic/mobile/shop/category.php index 2bda3e411..3f96b08ac 100644 --- a/theme/basic/mobile/shop/category.php +++ b/theme/basic/mobile/shop/category.php @@ -34,7 +34,7 @@ function get_mshop_category($ca_id, $len) '.get_text($mshop_ca_row1['ca_name']).' 하위분류 열기'.PHP_EOL; for($j=0; $mshop_ca_row2=sql_fetch_array($mshop_ca_res2); $j++) { @@ -45,7 +45,7 @@ function get_mshop_category($ca_id, $len) - '.get_text($mshop_ca_row2['ca_name']).' 하위분류 열기'.PHP_EOL; for($k=0; $mshop_ca_row3=sql_fetch_array($mshop_ca_res3); $k++) { @@ -56,7 +56,7 @@ function get_mshop_category($ca_id, $len) - '.get_text($mshop_ca_row3['ca_name']).' 하위분류 열기'.PHP_EOL; for($m=0; $mshop_ca_row4=sql_fetch_array($mshop_ca_res4); $m++) { @@ -67,7 +67,7 @@ function get_mshop_category($ca_id, $len) - '.get_text($mshop_ca_row4['ca_name']).' 하위분류 열기'.PHP_EOL; for($n=0; $mshop_ca_row5=sql_fetch_array($mshop_ca_res5); $n++) { diff --git a/theme/basic/mobile/skin/shop/basic/main.event.skin.php b/theme/basic/mobile/skin/shop/basic/main.event.skin.php index 0c7a478ab..31e821811 100644 --- a/theme/basic/mobile/skin/shop/basic/main.event.skin.php +++ b/theme/basic/mobile/skin/shop/basic/main.event.skin.php @@ -5,7 +5,7 @@ $hsql = " select ev_id, ev_subject, ev_subject_strong from {$g5['g5_shop_event_table']} where ev_use = '1' order by ev_id desc "; $hresult = sql_query($hsql); -if(mysql_num_rows($hresult)) { +if(sql_num_rows($hresult)) { // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); ?> diff --git a/theme/basic/skin/shop/basic/boxcategory.skin.php b/theme/basic/skin/shop/basic/boxcategory.skin.php index 78511a122..7e9ffb12f 100644 --- a/theme/basic/skin/shop/basic/boxcategory.skin.php +++ b/theme/basic/skin/shop/basic/boxcategory.skin.php @@ -20,7 +20,7 @@ // 2단계 분류 판매 가능한 것만 $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_order, ca_id "; $result2 = sql_query($sql2); - $count = mysql_num_rows($result2); + $count = sql_num_rows($result2); ?>