excelDownBillMonth.php
2.55 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?>
<?
$obj = new AdminOperate($_REQUEST, "") ;
$list = $obj->getListOfRentHistoryForExcel() ;
//$list = array(array());
$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>
<td> 렌트1/렌트2/기타 </td>
<td> 상태 </td>
</tr>
<? for($i=0; $i<sizeof($list); $i++){ ?>
<tr>
<td class="no center">
<?=$vnum--?>
</td>
<td class="center">
<?=$list[$i]["b_year"]."/".$list[$i]["b_month"]?>
</td>
<td class="center">
<?=$list[$i]["contractor_name"]?>
</td>
<td class="center">
<?=$list[$i]["monthly_rent_date"]?>
</td>
<td class="center">
<?=$list[$i]["monthly_rent"]?>
</td>
<td class="center">
<?=$list[$i]["maintenance_fee"]?>
</td>
<td class="center">
<?=$list[$i]["cable"]?>
</td>
<td class="center">
<?=$list[$i]["internet"]?>
</td>
<td class="center">
<?
echo $list[$i]["rent_1"];
echo " / ";
echo $list[$i]["rent_2"];
echo " / ";
echo $list[$i]["etc"];
?>
</td>
<td class="center">
<?
if($list[$i]["is_paid"]==0) echo "연체";
else if($list[$i]["is_paid"]==1) echo "납입";
else echo "청구중";
?>
</td>
</tr>
<? } ?>
</table>