From b3a8b90cfe22cc9f71279caa44d6af93910d7650 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 6 Nov 2013 13:16:27 +0900 Subject: [PATCH] =?UTF-8?q?it=5Fexplan=5Fstrip=5Ftags=20=EB=A5=BC=20it=5Fe?= =?UTF-8?q?xplan2=20=EB=A1=9C=20=EC=9D=B4=EB=A6=84=20=EB=B3=80=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'];
-
검색어 | 검색 결과
+
검색어 | 검색 결과