From b7edd3fa2652a0eaa68e8ec445908df3152f80db Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 23 Jun 2017 12:26:34 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C=20AND=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=EC=9D=84=20=EC=9D=B4=EC=9A=A9=ED=95=9C=20?= =?UTF-8?q?=EC=B7=A8=EC=95=BD=EC=A0=90=20=EC=88=98=EC=A0=95=20(17-455)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/search.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bbs/search.php b/bbs/search.php index 32ebf3e99..9aa1ca42b 100644 --- a/bbs/search.php +++ b/bbs/search.php @@ -54,15 +54,19 @@ if ($stx) { $g5_search['read_level'][] = $row['bo_read_level']; } - $search_query = 'sfl='.urlencode($sfl).'&stx='.urlencode($stx).'&sop='.$sop; - - - $text_stx = get_text(stripslashes($stx)); - $op1 = ''; // 검색어를 구분자로 나눈다. 여기서는 공백 $s = explode(' ', strip_tags($stx)); + + if( count($s) > 1 ){ + $s = array_slice($s, 0, 2); + $stx = implode(' ', $s); + } + + $text_stx = get_text(stripslashes($stx)); + + $search_query = 'sfl='.urlencode($sfl).'&stx='.urlencode($stx).'&sop='.$sop; // 검색필드를 구분자로 나눈다. 여기서는 + $field = explode('||', trim($sfl)); @@ -233,4 +237,4 @@ if (!$sop) $sop = 'or'; include_once($search_skin_path.'/search.skin.php'); include_once('./_tail.php'); -?> +?> \ No newline at end of file