monthly.php 1.57 KB
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiBill.php"; ?>
<?
	$obj = new ApiBill($_REQUEST);
	
	$result = $obj->getMonthlyList() ; 

	$list = $result["list"] ;
	$data = $result["data"] ;
	
	//
// 	echo json_encode($_COOKIE) ;
	
	
// 	echo json_encode($list) ;
?>


<script language="javascript">

	$(document).ready(function(){
	}) ;

</script>

<!-- 건물명/년도 -->
<div class="year">
	<ul>
		<li><a><?= $data["buildingName"] ?> <?= $data["roomName"] ?></a></li>
		<li><a class="jPopup" page="popupYear.php" rpage="monthly.php"><?= $_REQUEST["year"] == "" ? date("Y") : $_REQUEST["year"] ?></a></li>
	</ul>
	<div style="clear:both"></div>
</div>
<!-- 건물명/년도 -->

<!-- 리스트 -->
<section>
	<!-- 리스트 1개당 ul반복 -->
	<? for($i=0; $i<sizeof($list); $i++) { 
			$row = $list[$i] ;
			$month = explode("-", $row["month"]) ;
	?>
	<ul class="jMonthlyView" _no="<?= $row["NO"] ?>">
		<li>
			<div class="date">
				<p><?= $month[1]?></p><!-- 날짜 -->
			</div>
		</li>
		<li>
			<p style="margin:20px 0px 7px 0px;"><?= $row["monthDate"] ?> (월세+관리비)</p>
			<p class="price"><?= number_format($row["current_month_charge"]) ?></p><!-- 금액 -->
		</li>
		<li class="status_box">
		<? if($row["is_paid"] == 1) { ?>
			<div class="status orange"><a>납입</a></div>
		<? } else if($row["is_paid"] == 0) {  ?>
			<div class="status red"><a>연체</a></div>
		<? } else if($row["is_paid"] == 2) {  ?>
			<div class="status orange"><a>청구</a></div>
		<? } ?>
		</li>
		<div style="clear:both;"></div>
	</ul>
	<? } ?>
	<!-- 리스트 1개당 ul반복 -->