From 2ce975f38d5e70e2f9af9da5a6e225cc1b53ba2e Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 29 Apr 2014 17:59:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=87=BC=ED=95=91=EB=AA=B0=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EA=B2=80=EC=83=89=EB=B2=94=EC=9C=84=20checked=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/search.php | 36 +++++++++++++++++++++++++++--------- shop/search.php | 36 +++++++++++++++++++++++++++--------- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/mobile/shop/search.php b/mobile/shop/search.php index 61e20e177..b6376c385 100644 --- a/mobile/shop/search.php +++ b/mobile/shop/search.php @@ -17,14 +17,32 @@ if (isset($_GET['qname']) || isset($_GET['qexplan']) || isset($_GET['qid'])) $search_all = false; $q = utf8_strcut(trim($_GET['q']), 30, ""); -$qname = trim($_GET['qname']); -$qexplan = trim($_GET['qexplan']); -$qid = trim($_GET['qid']); -$qcaid = trim($_GET['qcaid']); -$qfrom = trim($_GET['qfrom']); -$qto = trim($_GET['qto']); +$qname = isset($_GET['qname']) ? trim($_GET['qname']) : ''; +$qexplan = isset($_GET['qexplan']) ? trim($_GET['qexplan']) : ''; +$qid = isset($_GET['qid']) ? trim($_GET['qid']) : ''; +$qcaid = isset($_GET['qcaid']) ? trim($_GET['qcaid']) : ''; +$qfrom = isset($_GET['qfrom']) ? trim($_GET['qfrom']) : ''; +$qto = isset($_GET['qto']) ? trim($_GET['qto']) : ''; $qsort = trim($_GET['qsort']); +// 검색범위 checkbox 처리 +$qname_check = false; +$qexplan_check = false; +$qid_check = false; + +if($search_all) { + $qname_check = true; + $qexplan_check = true; + $qid_check = true; +} else { + if($qname) + $qname_check = true; + if($qexplan) + $qexplan_check = true; + if($qid) + $qid_check = true; +} + if ($q) { $arr = explode(" ", $q); $detail_where = array(); @@ -95,9 +113,9 @@ $total_page = ceil($total_count / $items); // 전체 페이지 계산
검색범위 - > - > - >
+ > + > + >
상품가격 (원) diff --git a/shop/search.php b/shop/search.php index 1940d3650..1ae6d4e76 100644 --- a/shop/search.php +++ b/shop/search.php @@ -22,14 +22,32 @@ if (isset($_GET['qname']) || isset($_GET['qexplan']) || isset($_GET['qid'])) $search_all = false; $q = utf8_strcut(trim($_GET['q']), 30, ""); -$qname = trim($_GET['qname']); -$qexplan = trim($_GET['qexplan']); -$qid = trim($_GET['qid']); -$qcaid = trim($_GET['qcaid']); -$qfrom = trim($_GET['qfrom']); -$qto = trim($_GET['qto']); +$qname = isset($_GET['qname']) ? trim($_GET['qname']) : ''; +$qexplan = isset($_GET['qexplan']) ? trim($_GET['qexplan']) : ''; +$qid = isset($_GET['qid']) ? trim($_GET['qid']) : ''; +$qcaid = isset($_GET['qcaid']) ? trim($_GET['qcaid']) : ''; +$qfrom = isset($_GET['qfrom']) ? trim($_GET['qfrom']) : ''; +$qto = isset($_GET['qto']) ? trim($_GET['qto']) : ''; $qsort = trim($_GET['qsort']); +// 검색범위 checkbox 처리 +$qname_check = false; +$qexplan_check = false; +$qid_check = false; + +if($search_all) { + $qname_check = true; + $qexplan_check = true; + $qid_check = true; +} else { + if($qname) + $qname_check = true; + if($qexplan) + $qexplan_check = true; + if($qid) + $qid_check = true; +} + if ($q) { $arr = explode(" ", $q); $detail_where = array(); @@ -103,9 +121,9 @@ if ($is_admin) {
검색범위 - > - > - > + > + > + >
상품가격 (원)