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; } ?>
보내는 사람과 받는 사람이 동일합니다.
| 상품명(선택사항) | 판매가 | 수량 | 소계 | 배송비 |
|---|---|---|---|---|
| 배송비 | 1 | |||
| 추가 배송비 | 1 | |||
| 합계 | ||||
상점메모 $od_shop_memo
"; echo " $od_memo $od_shop_memo "; ?>