setActiveSheetIndex(0)->getStyle( "A1:{$last_char}1" )->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB($header_bgcolor); $excel->setActiveSheetIndex(0)->getStyle( "A:$last_char" )->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER)->setWrapText(true); foreach($widths as $i => $w) $excel->setActiveSheetIndex(0)->getColumnDimension( column_char($i) )->setWidth($w); $excel->getActiveSheet()->fromArray($data,NULL,'A1'); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"orderlist-".date("ymd", time()).".xls\""); header("Cache-Control: max-age=0"); $writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5'); $writer->save('php://output'); } function get_order($od_id) { global $g5; $sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "; return sql_fetch($sql); } $g5['title'] = "주문내역"; include_once(G5_PATH.'/head.sub.php'); if ($case == 1) { $fr_date = date_conv($fr_date); $to_date = date_conv($to_date); $sql = " SELECT DISTINCT a.od_id FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b where a.od_id = b.od_id and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' "; } else { $sql = " SELECT DISTINCT a.od_id FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b where a.od_id = b.od_id and a.od_id between '$fr_od_id' and '$to_od_id' "; } if ($ct_status) $sql .= " and b.ct_status = '$ct_status' "; $sql .= " order by a.od_id "; $result = sql_query($sql); if (sql_num_rows($result) == 0) { echo ""; exit; } ?>

주문번호

보내는 사람 :

주소
휴대폰
전화번호

보내는 사람과 받는 사람이 동일합니다.

받는 사람 :

주소
휴대폰
전화번호

주문 목록

= 0) $price_plus = '+'; $it_name = "$it_name ({$row2['ct_option']} ".$price_plus.display_price($row2['io_price']).")"; if($save_it_id != $row2['it_id']) { switch($row2['ct_send_cost']) { case 1: $ct_send_cost = '착불'; break; case 2: $ct_send_cost = '무료'; break; default: $ct_send_cost = '선불'; break; } // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, SUM(ct_qty) as qty from {$g5['g5_shop_cart_table']} where it_id = '{$row2['it_id']}' and od_id = '{$row2['od_id']}' "; $sum = sql_fetch($sql); // 조건부무료 if($row2['it_sc_type'] == 2) { $sendcost = get_item_sendcost($row2['it_id'], $sum['price'], $sum['qty'], $row['od_id']); if($sendcost == 0) $ct_send_cost = '무료'; } $save_it_id = $row2['it_id']; } $fontqty1 = $fontqty2 = ""; if ($row2['ct_qty'] >= 2) { $fontqty1 = ""; $fontqty2 = ""; } ?>
주문 목록
상품명(선택사항) 판매가 수량 소계 배송비
배송비 1
추가 배송비 1
합계
비고 $od_memo

"; if ($od_shop_memo) $od_shop_memo = "

상점메모 $od_shop_memo

"; echo " $od_memo $od_shop_memo "; ?>
전체 <출력 끝>