검색어 특수문자 처리 추가

This commit is contained in:
chicpro
2014-05-28 17:46:16 +09:00
parent 208a76014c
commit ab80c9c6c8
4 changed files with 11 additions and 11 deletions

View File

@ -16,13 +16,13 @@ $search_all = true;
if (isset($_GET['qname']) || isset($_GET['qexplan']) || isset($_GET['qid']))
$search_all = false;
$q = utf8_strcut(trim($_GET['q']), 30, "");
$q = utf8_strcut(get_search_string(trim($_GET['q'])), 30, "");
$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']) : '';
$qfrom = isset($_GET['qfrom']) ? preg_replace('/[^0-9]/', '', trim($_GET['qfrom'])) : '';
$qto = isset($_GET['qto']) ? preg_replace('/[^0-9]/', '', trim($_GET['qto'])) : '';
$qsort = trim($_GET['qsort']);
// 검색범위 checkbox 처리

View File

@ -28,7 +28,7 @@ include_once(G5_LIB_PATH.'/latest.lib.php');
<div class="sch_inner">
<h2>상품 검색</h2>
<label for="sch_str" class="sound_only">상품명<strong class="sound_only"> 필수</strong></label>
<input type="text" name="q" value="<?php echo stripslashes(get_text($q)); ?>" id="sch_str" required class="frm_input">
<input type="text" name="q" value="<?php echo stripslashes(get_text(get_search_string($q))); ?>" id="sch_str" required class="frm_input">
<input type="submit" value="검색" class="btn_submit">
<button type="button" class="pop_close"><span class="sound_only">검색 </span>닫기</button>
</div>