쇼핑몰 검색 검색범위 checked 오류 수정
This commit is contained in:
@ -17,14 +17,32 @@ if (isset($_GET['qname']) || isset($_GET['qexplan']) || isset($_GET['qid']))
|
|||||||
$search_all = false;
|
$search_all = false;
|
||||||
|
|
||||||
$q = utf8_strcut(trim($_GET['q']), 30, "");
|
$q = utf8_strcut(trim($_GET['q']), 30, "");
|
||||||
$qname = trim($_GET['qname']);
|
$qname = isset($_GET['qname']) ? trim($_GET['qname']) : '';
|
||||||
$qexplan = trim($_GET['qexplan']);
|
$qexplan = isset($_GET['qexplan']) ? trim($_GET['qexplan']) : '';
|
||||||
$qid = trim($_GET['qid']);
|
$qid = isset($_GET['qid']) ? trim($_GET['qid']) : '';
|
||||||
$qcaid = trim($_GET['qcaid']);
|
$qcaid = isset($_GET['qcaid']) ? trim($_GET['qcaid']) : '';
|
||||||
$qfrom = trim($_GET['qfrom']);
|
$qfrom = isset($_GET['qfrom']) ? trim($_GET['qfrom']) : '';
|
||||||
$qto = trim($_GET['qto']);
|
$qto = isset($_GET['qto']) ? trim($_GET['qto']) : '';
|
||||||
$qsort = trim($_GET['qsort']);
|
$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) {
|
if ($q) {
|
||||||
$arr = explode(" ", $q);
|
$arr = explode(" ", $q);
|
||||||
$detail_where = array();
|
$detail_where = array();
|
||||||
@ -95,9 +113,9 @@ $total_page = ceil($total_count / $items); // 전체 페이지 계산
|
|||||||
<input type="hidden" name="qcaid" id="qcaid" value="<?php echo $qcaid ?>">
|
<input type="hidden" name="qcaid" id="qcaid" value="<?php echo $qcaid ?>">
|
||||||
<div>
|
<div>
|
||||||
<strong>검색범위</strong>
|
<strong>검색범위</strong>
|
||||||
<input type="checkbox" name="qname" id="ssch_qname" <?php echo isset($qname)?'checked="checked"':'';?>> <label for="ssch_qname">상품명</label>
|
<input type="checkbox" name="qname" id="ssch_qname" <?php echo $qname_check?'checked="checked"':'';?>> <label for="ssch_qname">상품명</label>
|
||||||
<input type="checkbox" name="qexplan" id="ssch_qexplan" <?php echo isset($qexplan)?'checked="checked"':'';?>> <label for="ssch_qexplan"><span class="sound_only">상품</span>설명</label>
|
<input type="checkbox" name="qexplan" id="ssch_qexplan" <?php echo $qexplan_check?'checked="checked"':'';?>> <label for="ssch_qexplan"><span class="sound_only">상품</span>설명</label>
|
||||||
<input type="checkbox" name="qid" id="ssch_qid" <?php echo isset($qid)?'checked="checked"':'';?>> <label for="ssch_qid"><span class="sound_only">상품</span>코드</label><br>
|
<input type="checkbox" name="qid" id="ssch_qid" <?php echo $qid_check?'checked="checked"':'';?>> <label for="ssch_qid"><span class="sound_only">상품</span>코드</label><br>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>상품가격 (원)</strong>
|
<strong>상품가격 (원)</strong>
|
||||||
|
|||||||
@ -22,14 +22,32 @@ if (isset($_GET['qname']) || isset($_GET['qexplan']) || isset($_GET['qid']))
|
|||||||
$search_all = false;
|
$search_all = false;
|
||||||
|
|
||||||
$q = utf8_strcut(trim($_GET['q']), 30, "");
|
$q = utf8_strcut(trim($_GET['q']), 30, "");
|
||||||
$qname = trim($_GET['qname']);
|
$qname = isset($_GET['qname']) ? trim($_GET['qname']) : '';
|
||||||
$qexplan = trim($_GET['qexplan']);
|
$qexplan = isset($_GET['qexplan']) ? trim($_GET['qexplan']) : '';
|
||||||
$qid = trim($_GET['qid']);
|
$qid = isset($_GET['qid']) ? trim($_GET['qid']) : '';
|
||||||
$qcaid = trim($_GET['qcaid']);
|
$qcaid = isset($_GET['qcaid']) ? trim($_GET['qcaid']) : '';
|
||||||
$qfrom = trim($_GET['qfrom']);
|
$qfrom = isset($_GET['qfrom']) ? trim($_GET['qfrom']) : '';
|
||||||
$qto = trim($_GET['qto']);
|
$qto = isset($_GET['qto']) ? trim($_GET['qto']) : '';
|
||||||
$qsort = trim($_GET['qsort']);
|
$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) {
|
if ($q) {
|
||||||
$arr = explode(" ", $q);
|
$arr = explode(" ", $q);
|
||||||
$detail_where = array();
|
$detail_where = array();
|
||||||
@ -103,9 +121,9 @@ if ($is_admin) {
|
|||||||
<input type="hidden" name="qcaid" id="qcaid" value="<?php echo $qcaid ?>">
|
<input type="hidden" name="qcaid" id="qcaid" value="<?php echo $qcaid ?>">
|
||||||
<div>
|
<div>
|
||||||
<strong>검색범위</strong>
|
<strong>검색범위</strong>
|
||||||
<input type="checkbox" name="qname" id="ssch_qname" class="frm_input" <?php echo isset($qname)?'checked="checked"':'';?>> <label for="ssch_qname">상품명</label>
|
<input type="checkbox" name="qname" id="ssch_qname" class="frm_input" <?php echo $qname_check?'checked="checked"':'';?>> <label for="ssch_qname">상품명</label>
|
||||||
<input type="checkbox" name="qexplan" id="ssch_qexplan" class="frm_input" <?php echo isset($qexplan)?'checked="checked"':'';?>> <label for="ssch_qexplan">상품설명</label>
|
<input type="checkbox" name="qexplan" id="ssch_qexplan" class="frm_input" <?php echo $qexplan_check?'checked="checked"':'';?>> <label for="ssch_qexplan">상품설명</label>
|
||||||
<input type="checkbox" name="qid" id="ssch_qid" class="frm_input" <?php echo isset($qid)?'checked="checked"':'';?>> <label for="ssch_qid">상품코드</label>
|
<input type="checkbox" name="qid" id="ssch_qid" class="frm_input" <?php echo $qid_check?'checked="checked"':'';?>> <label for="ssch_qid">상품코드</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>상품가격 (원)</strong>
|
<strong>상품가격 (원)</strong>
|
||||||
|
|||||||
Reference in New Issue
Block a user