From b3a8b90cfe22cc9f71279caa44d6af93910d7650 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 6 Nov 2013 13:16:27 +0900 Subject: [PATCH 1/3] =?UTF-8?q?it=5Fexplan=5Fstrip=5Ftags=20=EB=A5=BC=20it?= =?UTF-8?q?=5Fexplan2=20=EB=A1=9C=20=EC=9D=B4=EB=A6=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemformupdate.php | 4 +- extend/shop.extend2.php | 4 +- install/gnuboard5shop.sql | 2 +- shop/search.php | 67 +++++++++++++++++-------------- 4 files changed, 40 insertions(+), 37 deletions(-) diff --git a/adm/shop_admin/itemformupdate.php b/adm/shop_admin/itemformupdate.php index 19b0ad922..435a558c0 100644 --- a/adm/shop_admin/itemformupdate.php +++ b/adm/shop_admin/itemformupdate.php @@ -260,8 +260,6 @@ $it_name = strip_tags(trim($_POST['it_name'])); if ($it_name == "") alert("상품명을 입력해 주십시오."); -$it_explan_strip_tags = strip_tags(trim($_POST['it_explan'])); - $sql_common = " ca_id = '$ca_id', ca_id2 = '$ca_id2', ca_id3 = '$ca_id3', @@ -280,7 +278,7 @@ $sql_common = " ca_id = '$ca_id', it_type5 = '$it_type5', it_basic = '$it_basic', it_explan = '$it_explan', - it_explan_strip_tags= '$it_explan_strip_tags', + it_explan2 = '".strip_tags(trim($_POST['it_explan']))."', it_mobile_explan = '$it_mobile_explan', it_cust_price = '$it_cust_price', it_price = '$it_price', diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php index 8b3e81de4..9659ad593 100644 --- a/extend/shop.extend2.php +++ b/extend/shop.extend2.php @@ -650,8 +650,8 @@ if(stripos($row['Type'], 'enum') !== false) { // 상품테이블에 검색을 위하여 태그없는 상품설명 저장용 필드 추가 -if(!sql_query(" select it_explan_strip_tags from {$g5['g5_shop_item_table']} limit 1 ", false)) { +if(!sql_query(" select it_explan2 from {$g5['g5_shop_item_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` - ADD `it_explan_strip_tags` METIUMTEXT NOT NULL AFTER `it_explan` ", true); + ADD `it_explan2 METIUMTEXT NOT NULL AFTER `it_explan` ", true); } ?> diff --git a/install/gnuboard5shop.sql b/install/gnuboard5shop.sql index 7fe0e06fc..64bf30029 100644 --- a/install/gnuboard5shop.sql +++ b/install/gnuboard5shop.sql @@ -426,7 +426,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_item` ( `it_type5` tinyint(4) NOT NULL DEFAULT '0', `it_basic` text NOT NULL, `it_explan` mediumtext NOT NULL, - `it_explan_strip_tags` mediumtext NOT NULL, + `it_explan2` mediumtext NOT NULL, `it_mobile_explan` mediumtext NOT NULL, `it_cust_price` int(11) NOT NULL DEFAULT '0', `it_price` int(11) NOT NULL DEFAULT '0', diff --git a/shop/search.php b/shop/search.php index 7289b4ffa..d5627467b 100644 --- a/shop/search.php +++ b/shop/search.php @@ -11,38 +11,45 @@ include_once('./_head.php'); // QUERY 문에 공통적으로 들어가는 내용 // 상품명에 검색어가 포한된것과 상품판매가능인것만 -$sql_common = " from {$g5['g5_shop_item_table']} a, - {$g5['g5_shop_category_table']} b - where a.ca_id=b.ca_id - and a.it_use = 1 - and b.ca_use = 1 - /* 중복검색에 대한 오류로 인해 막음 : where (a.ca_id=b.ca_id or a.ca_id2=b.ca_id or a.ca_id3=b.ca_id) */ "; -if ($search_str) { - $sql_common .= " and ( a.it_id like '$search_str%' or - a.it_name like '%$search_str%' or - a.it_basic like '%$search_str%' or - a.it_explan like '%$search_str%' ) "; -} -/* -// 공백을 구분하여 검색을 할때는 이 코드를 사용하십시오. or 조건 -if ($search_str) { - $s_str = explode(" ", $search_str); - $or = " "; - $sql_common .= " and ( "; - for ($i=0; $i @@ -50,7 +57,7 @@ $total_count = $row['cnt'];
-
검색어 | 검색 결과
+
검색어 | 검색 결과
Date: Wed, 6 Nov 2013 13:16:42 +0900 Subject: [PATCH 2/3] =?UTF-8?q?$search=5Fstr=20=EC=9D=84=20$q=20=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/shop.head.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shop/shop.head.php b/shop/shop.head.php index 339cf5550..0cc0253ff 100644 --- a/shop/shop.head.php +++ b/shop/shop.head.php @@ -52,7 +52,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php'); - + From ad6123a7f42f65e33f7e565574135abac2fbf786 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 6 Nov 2013 18:29:14 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EC=83=81=ED=92=88=EC=9D=BC=EA=B4=84?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=EC=97=90=20=ED=95=84=EB=93=9C=EA=B0=80=20?= =?UTF-8?q?=ED=95=98=EB=82=98=20=EB=8D=94=20=EC=B6=94=EA=B0=80=EB=90=98?= =?UTF-8?q?=EB=8D=94=EB=9D=BC=EB=8F=84=20=EB=B0=B0=EC=97=B4=EC=B2=A8?= =?UTF-8?q?=EC=9E=90=EB=A5=BC=20=EB=B3=80=EA=B2=BD=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8F=84=EB=A1=9D=20$j++=20=EB=A1=9C=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemexcelupdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/shop_admin/itemexcelupdate.php b/adm/shop_admin/itemexcelupdate.php index 6d611877d..71dd5d4b9 100644 --- a/adm/shop_admin/itemexcelupdate.php +++ b/adm/shop_admin/itemexcelupdate.php @@ -185,7 +185,7 @@ if($_FILES['excelfile']['tmp_name']) { it_img7 = '$it_img7', it_img8 = '$it_img8', it_img9 = '$it_img9', - it_img10 = '$it_img10'; "; + it_img10 = '$it_img10' "; sql_query($sql); $succ_count++;