You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
2.8 KiB
125 lines
2.8 KiB
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<!-- 主頁header -->
|
|
<?php
|
|
|
|
/*--- 處理session ----*/
|
|
include "include-session-security.php"; #確認session
|
|
/*
|
|
if(isset($_SESSION['user_id'])){
|
|
#echo $_SESSION['user_id'];
|
|
$customerid = $_SESSION['user_id'];
|
|
}
|
|
*/
|
|
/*--- 處理session ----*/
|
|
|
|
#$customerid = "A000000001";
|
|
$contractdate = date("Y-m-d");
|
|
|
|
include "include-header.php";
|
|
|
|
require_once "db/database.php"; # 載入db.php來連結資料庫
|
|
$data = array(); # 設置一個空陣列來放資料
|
|
$sql = "SELECT * FROM receivable WHERE contractno = any(SELECT contractno FROM contract where customerid = '$user_id') order by contractno";
|
|
$data = mysqli_query($link,$sql); # 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
|
|
/*
|
|
foreach($data as $data){
|
|
echo $data["facilityno"] . "<br>";
|
|
}
|
|
*/
|
|
|
|
|
|
?>
|
|
<!-- * 主頁header -->
|
|
|
|
<body>
|
|
|
|
<!-- loader -->
|
|
<div id="loader">
|
|
<div class="spinner-border text-primary" role="status"></div>
|
|
</div>
|
|
<!-- * loader -->
|
|
|
|
<!-- App Header -->
|
|
<div class="appHeader bg-primary text-light">
|
|
<div class="left">
|
|
<a href="javascript:;" class="headerButton goBack">
|
|
<ion-icon name="chevron-back-outline"></ion-icon>
|
|
</a>
|
|
</div>
|
|
<div class="pageTitle">繳費紀錄</div>
|
|
<!--
|
|
<div class="right">
|
|
</div>
|
|
-->
|
|
</div>
|
|
<!-- * App Header -->
|
|
|
|
<!-- App Capsule -->
|
|
<div id="appCapsule">
|
|
|
|
<!-- <label>XXXX年XX月維保款 <span class="badge badge-primary">已繳</span></label> -->
|
|
<div class="section full mb-2">
|
|
<div class="wide-block p-0">
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">項次</th>
|
|
<th scope="col">合約編號<br>(電梯編號)</th>
|
|
<th scope="col">金額<br>(元)</th>
|
|
<th scope="col">應繳<br>日期</th>
|
|
<th scope="col">實繳<br>日期</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$j=0;
|
|
foreach($data as $data){
|
|
$j=$j+1;
|
|
?>
|
|
<tr>
|
|
<th scope="row"><?php echo $j; ?></th>
|
|
<td><?php echo $data["contractno"] . "<br>(" . $data["facilityno"] . ')'; ?></td>
|
|
<td><?php echo $data["receivable"]; ?></td>
|
|
<td><?php echo $data["receivable_date"]; ?></td>
|
|
<td><?php echo $data["actual_date"]; ?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- * App Capsule -->
|
|
|
|
<!-- 主頁頁尾 -->
|
|
<?php
|
|
include "include-footer.php";
|
|
mysqli_close($link); #代表結束連線
|
|
?>
|
|
<!-- * 主頁頁尾 -->
|
|
|
|
<!-- 主頁頁尾按鈕 -->
|
|
<?php
|
|
# include "include-bottom-menu.php";
|
|
?>
|
|
<!-- * 主頁頁尾按鈕 -->
|
|
|
|
<!-- ///////////// Js Files //////////////////// -->
|
|
<!-- Jquery -->
|
|
<?php
|
|
include "include-jsfiles.php";
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|