$sub_menu = '400410'; include_once('./_common.php'); auth_check($auth[$sub_menu], "r"); $g4['title'] = '주문개별내역'; if ($sel_field == 'ct_status') $g4['title'] .= ' ('.$search.')'; include_once (G4_ADMIN_PATH.'/admin.head.php'); $where = " where "; $sql_search = ""; if ($search != "") { if ($sel_field == "c.ca_id") { $sql_search .= " $where $sel_field like '$search%' "; $where = " and "; } else if ($sel_field != "") { $sql_search .= " $where $sel_field like '%$search%' "; $where = " and "; } if ($save_search != $search) $page = 1; } if ($sel_field == "") $sel_field = "od_id"; if ($sort1 == "") $sort1 = "od_id"; if ($sort2 == "") $sort2 = "desc"; $sql_common = " from {$g4['shop_order_table']} a left join {$g4['shop_cart_table']} b on (a.uq_id = b.uq_id) left join {$g4['shop_item_table']} c on (b.it_id = c.it_id) $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; // 시작 열을 구함 $sql = " select a.od_id, a.mb_id, a.od_name, a.od_deposit_name, a.od_time, b.it_opt1, b.it_opt2, b.it_opt3, b.it_opt4, b.it_opt5, b.it_opt6, b.ct_status, b.ct_qty, b.ct_amount, b.ct_point, (b.ct_qty * b.ct_amount) as ct_sub_amount, (b.ct_qty * b.ct_point) as ct_sub_point, c.it_id, c.it_name, c.it_opt1_subject, c.it_opt2_subject, c.it_opt3_subject, c.it_opt4_subject, c.it_opt5_subject, c.it_opt6_subject $sql_common order by $sort1 $sort2 limit $from_record, $rows "; $result = sql_query($sql); $lines = array(); for ($i=0; $row=sql_fetch_array($result); $i++) { $lines[$i] = $row; $tot_amount += $row['ct_amount']; $tot_qty += $row['ct_qty']; $tot_sub_amount += $row['ct_sub_amount']; $tot_sub_point += $row['ct_sub_point']; } $qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&save_search=$search"; $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page"; $listall = ''; if ($search) // 검색렬일 때만 처음 버튼을 보여줌 $listall = '전체목록'; ?>
| ">주문번호 순 정렬 주문일시 |
">상품명 순 정렬 | ">주문자 순 정렬 입금자 |
">회원ID 순 정렬 | ">판매가 순 정렬 | ">수량 순 정렬 | ">소계 순 정렬 | ">포인트 순 정렬 | ">상태 순 정렬 | 수정 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 합 계 | =number_format($tot_amount)?> | =number_format($tot_qty)?> | =number_format($tot_sub_amount)?> | =number_format($tot_sub_point)?> | ||||||
|
=$lines[$i]['od_id']?> =$lines[$i]['od_time']?> |
=get_it_image($lines[$i]['it_id'].'_s', 50, 50)?>=$it_name?> |
=cut_str($lines[$i]['od_name'],10,"")?>
if ($lines[$i]['od_deposit_name'] != "") echo ' '.$lines[$i]['od_deposit_name']?> |
=$lines[$i]['mb_id']?> | =number_format($lines[$i]['ct_amount'])?> | =$lines[$i]['ct_qty']?> | =number_format($lines[$i]['ct_sub_amount'])?> | =number_format($lines[$i]['ct_sub_point'])?> | =$lines[$i]['ct_status']?> | 수정 | |
| 자료가 한건도 없습니다. | ||||||||||