$sub_menu = '400640'; include_once('./_common.php'); auth_check($auth[$sub_menu], "r"); $g4['title'] = '이벤트일괄처리'; include_once (G4_ADMIN_PATH.'/admin.head.php'); $where = " where "; $sql_search = ""; if ($search != "") { if ($sel_field != "") { $sql_search .= " $where $sel_field like '%$search%' "; $where = " and "; } } if ($sel_ca_id != "") { $sql_search .= " $where ca_id like '$sel_ca_id%' "; } if ($sel_field == "") { $sel_field = "it_name"; } $sql_common = " from {$g4['shop_item_table']} a left join {$g4['shop_event_item_table']} b on (a.it_id=b.it_id and b.ev_id='$ev_id') "; $sql_common .= $sql_search; // 테이블의 전체 레코드수만 얻음 $sql = " select count(*) as cnt " . $sql_common; $row = sql_fetch($sql); $total_count = $row['cnt']; $rows = $config['cf_page_rows']; $total_page = ceil($total_count / $rows); // 전체 페이지 계산 if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 if (!$sort1) { $sort1 = "b.ev_id"; } if (!$sort2) { $sort2 = "desc"; } $sql = " select a.*, b.ev_id $sql_common order by $sort1 $sort2 limit $from_record, $rows "; $result = sql_query($sql); //$qstr1 = 'sel_ca_id='.$sel_ca_id.'&sel_field='.$sel_field.'&search='.$search; $qstr1 = 'ev_id='.$ev_id.'&sel_ca_id='.$sel_ca_id.'&sel_field='.$sel_field.'&search='.$search; $qstr = $qstr1.'&sort1='.$sort1.'&sort2='.$sort2.'&page='.$page; $listall = ''; if ($stx) // 검색 결과일 때만 처음 버튼을 보여줌 $listall = '전체목록'; // 이벤트 아이디와 제목을 분리 - 지운아빠 2013-04-15 if (isset($ev_set)) { $ev_exp = explode('`',$ev_set); $ev_id = $ev_exp[0]; $ev_title = $ev_exp[1]; } ?>
상품을 이벤트별로 일괄 처리합니다. 현재 선택된 이벤트는 =$ev_title?>입니다.