$sub_menu = '400400'; 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 ($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) $sql_search "; // 김선용 200805 : 조인 사용으로 전체카운트가 일정레코드 이상일 때 지연시간 문제가 심각하므로 변경 /* $result = sql_query(" select DISTINCT od_id ".$sql_common); $total_count = mysql_num_rows($result); */ $sql = " select count(distinct 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 == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 열을 구함 $sql = " select a.*, "._MISU_QUERY_." $sql_common group by a.od_id order by $sort1 $sort2 limit $from_record, $rows "; $result = sql_query($sql, false); $lines = array(); $tot_itemcnt = 0; $tot_orderamount = 0; $tot_ordercancel = 0; $tot_dc_amount = 0; $tot_receiptamount = 0; $tot_receiptcancel = 0; $tot_misuamount = 0; for ($i=0; $row=mysql_fetch_array($result); $i++) { $lines[$i] = $row; $tot_itemcount += $row['itemcount']; $tot_orderamount += $row['orderamount']; $tot_ordercancel += $row['ordercancel']; $tot_dc_amount += $row['od_dc_amount']; $tot_receiptamount += $row['receiptamount']; $tot_receiptcancel += $row['receiptcancel']; $tot_misu += $row['misu']; } //$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search"; // 김선용 200805 : sel_ca_id - 쓰레기 코드 //$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&save_search=$search"; $qstr1 = "sel_field=$sel_field&search=$search&save_search=$search"; $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page"; $listall = ''; if ($search) // 검색렬일 때만 처음 버튼을 보여줌 $listall = '전체목록'; ?>
=help('주의! 주문번호를 클릭하여 나오는 주문상세내역의 주소를 외부에서 조회가 가능한곳에 올리지 마십시오.')?>
| ">주문번호 순 정렬 주문일시 |
">주문자 순 정렬 ">회원ID 순 정렬 |
">건수 순 정렬 | " class="order_sum">주문합계 순 정렬 | ">주문취소 순 정렬 | ">DC 순 정렬 | " class="order_sum">입금합계 순 정렬 | ">입금취소 순 정렬 | " class="order_outstanding">미수금 순 정렬 | 결제수단 | 관리 |
|---|---|---|---|---|---|---|---|---|---|---|
| 합 계 | =(int)$tot_itemcount?>건 | =number_format($tot_orderamount)?> | =number_format($tot_ordercancel)?> | =number_format($tot_dc_amount)?> | =number_format($tot_receiptamount)?> | =number_format($tot_receiptcancel)?> | =number_format($tot_misu)?> | |||
|
=$lines[$i]['od_id']?> 주문일시 =$lines[$i]['od_time']?> |
=$mb_nick?> =$lines[$i]['mb_id']?> |
=$lines[$i]['itemcount']?>건 누적 =$row2['cnt']?>건 |
=number_format($lines[$i]['orderamount'])?> | =number_format($lines[$i]['ordercancel'])?> | =number_format($lines[$i]['od_dc_amount'])?> | =number_format($lines[$i]['receiptamount'])?> | =number_format($lines[$i]['receiptcancel'])?> | =number_format($lines[$i]['misu'])?> | =$s_receipt_way?> | 수정 삭제 |
| 자료가 한건도 없습니다. | ||||||||||