관리자 이벤트 관련 상품 검색 기능 추가
This commit is contained in:
@ -205,9 +205,12 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
<option value="">분류선택</option>
|
<option value="">분류선택</option>
|
||||||
<?php echo $category_select; ?>
|
<?php echo $category_select; ?>
|
||||||
</select>
|
</select>
|
||||||
|
<label for="sch_name" class="sound_only">상품명</label>
|
||||||
|
<input type="text" name="sch_name" id="sch_name" class="frm_input" size="15">
|
||||||
|
<button type="button" id="btn_search_item" class="btn_frmline">검색</button>
|
||||||
</span>
|
</span>
|
||||||
<div id="sch_item_list" class="srel_list">
|
<div id="sch_item_list" class="srel_list">
|
||||||
<p>상품 검색을 위해 상품의 분류를 선택해주십시오.</p>
|
<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -314,17 +317,18 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#sch_ca_id").change(function() {
|
$("#btn_search_item").click(function() {
|
||||||
var ca_id = $(this).val();
|
var ca_id = $("#sch_ca_id").val();
|
||||||
|
var it_name = $.trim($("#sch_name").val());
|
||||||
|
|
||||||
if(ca_id == "") {
|
if(ca_id == "" && it_name == "") {
|
||||||
$("#sch_item_list").html("<p>상품 검색을 위해 상품의 분류를 선택해주십시오.</p>");
|
$("#sch_item_list").html("<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#sch_item_list").load(
|
$("#sch_item_list").load(
|
||||||
"./itemeventsearch.php",
|
"./itemeventsearch.php",
|
||||||
{ w: "<?php echo $w; ?>", ev_id: "<?php echo $ev_id; ?>", ca_id: ca_id }
|
{ w: "<?php echo $w; ?>", ev_id: "<?php echo $ev_id; ?>", ca_id: ca_id, it_name: it_name }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -4,13 +4,22 @@ include_once('./_common.php');
|
|||||||
|
|
||||||
auth_check($auth[$sub_menu], "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
if(!trim($_POST['ca_id']))
|
$ca_id = trim($ca_id);
|
||||||
die("");
|
$it_name = trim(stripslashes($it_name));
|
||||||
|
|
||||||
|
if(!$ca_id && !$it_name)
|
||||||
|
die('<p>상품의 분류를 선택하시거나 상품명을 입력하신 후 검색하여 주십시오.</p>');
|
||||||
|
|
||||||
$sql = " select it_id, it_name
|
$sql = " select it_id, it_name
|
||||||
from {$g5['g5_shop_item_table']}
|
from {$g5['g5_shop_item_table']}
|
||||||
where ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' )
|
where (1) ";
|
||||||
order by ca_id, it_name ";
|
if($ca_id)
|
||||||
|
$sql .= " and ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' ) ";
|
||||||
|
|
||||||
|
if($it_name)
|
||||||
|
$sql .= " and it_name like '%$it_name%' ";
|
||||||
|
|
||||||
|
$sql .= " order by ca_id, it_name ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$list = '';
|
$list = '';
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
$sub_menu = '400300';
|
$sub_menu = '400300';
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
$ca_id = trim($ca_id);
|
$ca_id = trim($ca_id);
|
||||||
$it_name = trim(stripslashes($it_name));
|
$it_name = trim(stripslashes($it_name));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user