#262 이벤트 폼에서 이벤트 상품 관리할 수 있도록 수정
This commit is contained in:
38
adm/shop_admin/itemeventsearch.php
Normal file
38
adm/shop_admin/itemeventsearch.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
$sub_menu = '400630';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
if(!trim($_POST['ca_id']))
|
||||
die("");
|
||||
|
||||
$sql = " select it_id, it_name
|
||||
from {$g4['shop_item_table']}
|
||||
where ( ca_id like '$ca_id%' or ca_id2 like '$ca_id%' or ca_id3 like '$ca_id%' )
|
||||
order by ca_id, it_name ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$list = '';
|
||||
for($i=0;$row=sql_fetch_array($result);$i++) {
|
||||
if($w == 'u') {
|
||||
$sql2 = " select count(*) as cnt from {$g4['shop_event_item_table']} where ev_id = '$ev_id' and it_id = '{$row['it_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
if ($row2['cnt'])
|
||||
continue;
|
||||
}
|
||||
|
||||
$it_name = get_it_image($row['it_id'], 50, 50).' '.$row['it_name'];
|
||||
|
||||
$list .= '<li>';
|
||||
$list .= '<input type="hidden" name="it_id[]" value="'.$row['it_id'].'">';
|
||||
$list .= $it_name;
|
||||
$list .= '<button type="button" class="add_item">추가</button>';
|
||||
$list .= '</li>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if($list)
|
||||
$list = '<ul>'.$list.'</ul>';
|
||||
|
||||
echo $list;
|
||||
?>
|
||||
Reference in New Issue
Block a user