0 "; break; default: $where[] = " a.od_status = '$od_status'"; break; } switch ($od_status) { case '주문' : $sort1 = "a.od_id"; $sort2 = "desc"; break; case '입금' : // 결제완료 $sort1 = "a.od_receipt_time"; $sort2 = "desc"; break; case '배송' : // 배송중 $sort1 = "a.od_invoice_time"; $sort2 = "desc"; break; } } if ($od_settle_case) { $where[] = " a.od_settle_case = '$od_settle_case' "; } if ($od_misu) { $where[] = " a.od_misu != 0 "; } if ($od_cancel_price) { $where[] = " a.od_cancel_price != 0 "; } if ($od_refund_price) { $where[] = " a.od_refund_price != 0 "; } if ($od_receipt_point) { $where[] = " a.od_receipt_point != 0 "; } if ($od_coupon) { $where[] = " ( a.od_cart_coupon > 0 or a.od_coupon > 0 or a.od_send_coupon > 0 ) "; } if ($od_escrow) { $where[] = " a.od_escrow = 1 "; } if ($fr_date && $to_date) { $where[] = " a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' "; } if ($where) { $sql_search = ' where '.implode(' and ', $where); } if ($sel_field == "") $sel_field = "a.od_id"; if ($sort1 == "") $sort1 = "a.od_id"; if ($sort2 == "") $sort2 = "desc"; // 상품명, 단가, 수량, 카테고리를 불러오기 위해 DB를 합친다 $sql_common = " FROM {$g5['g5_shop_order_table']} AS a LEFT JOIN {$g5['g5_shop_cart_table']} AS b ON a.od_id = b.od_id JOIN {$g5['g5_shop_item_table']} AS c ON b.it_id = c.it_id "; $sql_common .= $sql_search; $sql = " select count(a.od_id) 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 < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " SELECT a.*, (a.od_cart_coupon + a.od_coupon + a.od_send_coupon) as couponprice, b.it_name, b.ct_qty, b.ct_price, b.ct_option, c.ca_id $sql_common ORDER BY $sort1 $sort2 LIMIT $from_record, $rows "; $result = sql_query($sql); $qstr1 = "od_status=".urlencode($od_status)."& od_settle_case=".urlencode($od_settle_case)."& od_misu=$od_misu& od_cancel_price=$od_cancel_price& od_refund_price=$od_refund_price& od_receipt_point=$od_receipt_point& od_coupon=$od_coupon& fr_date=$fr_date& to_date=$to_date& sel_field=$sel_field& search=$search& save_search=$search"; if($default['de_escrow_use']) $qstr1 .= "&od_escrow=$od_escrow"; $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page"; $listall = '전체목록'; // 주문삭제 히스토리 테이블 필드 추가 if(!sql_query(" select mb_id from {$g5['g5_shop_order_delete_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_order_delete_table']}` ADD `mb_id` varchar(20) NOT NULL DEFAULT '' AFTER `de_data`, ADD `de_ip` varchar(255) NOT NULL DEFAULT '' AFTER `mb_id`, ADD `de_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `de_ip` ", true); } ?>
전체 주문내역 0) { ?> 엑셀배송처리
주문상태 > > > > > > >
결제수단 > > > > > > > >
주문일자 ~
'; // 간편결제 if($row['od_settle_case'] == '간편결제') { switch($row['od_pg']) { case 'lg': $s_receipt_way = 'PAYNOW'; break; case 'inicis': $s_receipt_way = 'KPAY'; break; case 'kcp': $s_receipt_way = 'PAYCO'; break; default: $s_receipt_way = $row['od_settle_case']; break; } } } else { $s_receipt_way = '결제수단없음'; $s_br = '
'; } if ($row['od_receipt_point'] > 0) $s_receipt_way .= $s_br."포인트"; $mb_nick = get_sideview($row['mb_id'], get_text($row['od_name']), $row['od_email'], ''); $od_cnt = 0; if ($row['mb_id']) { $sql2 = " select count(*) as cnt from {$g5['g5_shop_order_table']} where mb_id = '{$row['mb_id']}' "; $row2 = sql_fetch($sql2); $od_cnt = $row2['cnt']; } // 주문 번호에 device 표시 $od_mobile = ''; if($row['od_mobile']) $od_mobile = '(M)'; // 주문번호에 - 추가 switch(strlen($row['od_id'])) { case 16: $disp_od_id = substr($row['od_id'],0,8).'-'.substr($row['od_id'],8); break; default: $disp_od_id = substr($row['od_id'],0,6).'-'.substr($row['od_id'],6); break; } // 주문 번호에 에스크로 표시 $od_paytype = ''; if($row['od_test']) $od_paytype .= '테스트'; if($default['de_escrow_use'] && $row['od_escrow']) $od_paytype .= '에스크로'; $uid = md5($row['od_id'].$row['od_time'].$row['od_ip']); $invoice_time = is_null_time($row['od_invoice_time']) ? G5_TIME_YMDHIS : $row['od_invoice_time']; $delivery_company = $row['od_delivery_company'] ? $row['od_delivery_company'] : $default['de_delivery_company']; $bg = 'bg'.($i%2); $td_color = 0; if($row['od_cancel_price'] > 0) { $bg .= 'cancel'; $td_color = 1; } ?> '; ?>
주문 내역 목록
">주문번호 주문상태 승인번호 결제수단 상품명 주문자 주문자전화 단가 주문수량 주문합계 입금합계 주문취소 확인 상세
완료 보기
자료가 없습니다.
  합 계
주문상태에서만 삭제가 가능합니다.

<완료>를 클릭하면 주문처리가 완료됩니다.