excelDownBillEnd.php
2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?>
<?
$obj = new AdminOperate($_REQUEST, "") ;
$list = $obj->getListOfEndHistoryForExcel() ;
$vnum = $obj->virtualNum ;
?>
<?
$fileName = "공과금 리스트_".date("YmdHis",time());
header( "Content-type: application/vnd.ms-excel; charset=utf-8");
header( "Content-Disposition: attachment; filename=$fileName.xls" );
header( "Content-Description: PHP4 Generated Data" );
?>
<meta http-equiv="Content-Type" content="application/vnd.ms-excel; charset=utf-8">
<table border='1'>
<tr style = 'background-color:#EBF4FF ;'>
<td>No</td>
<td>입주기간</td>
<td>퇴실자</td>
<td>보증금</td>
<td>예치금</td>
<td>차감액</td>
<td>잔액</td>
<td>상태</td>
</tr>
<tbody><!-- 10줄 리스트// 마지막 tr에 class="last" 넣어주세요 -->
<? for($i=0; $i<sizeof($list); $i++){ ?>
<tr>
<td class="no center">
<?=$vnum--?>
</td>
<td class="center">
<?=$list[$i]["entering_due_date"]."~".$list[$i]["leaving_due_date"]?>
</td>
<td class="center">
<?=$list[$i]["contractor_name"]?>
</td>
<td class="center">
<?=$list[$i]["deposit"]?>
</td>
<td class="center">
<?=$list[$i]["Rbalance"]?>
</td>
<td class="center">
<?=$list[$i]["subtraction_total"]?>
</td>
<td class="center">
<?=$list[$i]["Ebalance"]?>
</td>
<td>
<?
if($list[$i]["is_paid"]==0) echo "미납";
else if($list[$i]["is_paid"]==1) echo "납입";
else echo "청구중";
?>
</td>
</tr>
<? } ?>
</tbody>
</table>