excelDownBillMonth.php 2.55 KB
<? 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>