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.
138 lines
3.7 KiB
138 lines
3.7 KiB
<?php
|
|
include "header.php";
|
|
// 載入db.php來連結資料庫
|
|
require_once "database.php";
|
|
|
|
// 設置一個空陣列來放資料
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$sql = "select * from maintance_contract_detail order by id";
|
|
$data = mysqli_query($link,$sql);
|
|
|
|
|
|
?>
|
|
<!--<p>-->
|
|
<!--<a href="facility-create.php" class="btn btn-info btn-sm">-->
|
|
<!-- <span class="glyphicon glyphicon-plus"></span>-->
|
|
<!--</a>-->
|
|
<!--</p>-->
|
|
|
|
<?php
|
|
if ($data):
|
|
?>
|
|
<style>
|
|
table {
|
|
table-layout:fixed;
|
|
width: 100%;
|
|
}
|
|
|
|
td {
|
|
word-wrap:break-word;
|
|
}
|
|
|
|
img {
|
|
width:125px;
|
|
}
|
|
|
|
.width_style_1 {
|
|
width:125px;
|
|
}
|
|
|
|
table{
|
|
width:100%;
|
|
}
|
|
#table_index_filter{
|
|
float:right;
|
|
}
|
|
#table_index_paginate{
|
|
float:right;
|
|
}
|
|
label {
|
|
display: inline-flex;
|
|
margin-bottom: .5rem;
|
|
margin-top: .5rem;
|
|
|
|
}
|
|
</style>
|
|
<div style="overflow-x:auto;">
|
|
<table id="table_index" class="table table-striped table-bordered" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>編號</th>
|
|
<th>價審單號</th>
|
|
<th>電梯編號</th>
|
|
<th>品牌</th>
|
|
<th>型號</th>
|
|
<th>速度</th>
|
|
<th>載重</th>
|
|
<th>電梯使用性質</th>
|
|
<th>使用年限</th>
|
|
<th>台數</th>
|
|
<th>年檢日期</th>
|
|
<th>標準價</th>
|
|
|
|
<th>議定價</th>
|
|
<th>校驗費</th>
|
|
<th>年檢費</th>
|
|
<th>小計</th>
|
|
<th>修改</th>
|
|
<th>刪除</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach($data as $key=>$data) :
|
|
$allow_st = "";
|
|
if (!$data["checker_1"] && !$data["checker_2"] && !$data["checker_3"]) $allow_st = 1;
|
|
else if (!$data["checker_2"] && !$data["checker_3"]) $allow_st = 2;
|
|
else if (!$data["checker_3"]) $allow_st = 3;
|
|
?>
|
|
<tr>
|
|
<td><?php echo $$key+1; ?></td>
|
|
<td><?php echo $data['maintance_contract_id']; ?></td>
|
|
<td><?php echo $data['facilityno']; ?></td>
|
|
<td><?php echo $data['brand']; ?></td>
|
|
<td><?php echo $data['type']; ?></td>
|
|
<td><?php echo $data['speed']; ?></td>
|
|
<td><?php echo $data['weight']; ?></td>
|
|
<td><?php echo $data['usednature']; ?></td>
|
|
<td><?php echo $data['usedage']; ?></td>
|
|
<td><?php echo $data['tai_count']; ?></td>
|
|
<td><?php echo $data['yearlyinspectiondate']; ?></td>
|
|
<td><?php echo $data['standardprice']; ?></td>
|
|
<td><?php echo $data['discusspricing']; ?></td>
|
|
<td><?php echo $data['calibrationfee']; ?></td>
|
|
<td><?php echo $data['yearlyinspectionfee']; ?></td>
|
|
<td><?php echo $data['sumfee']; ?></td>
|
|
|
|
<td>
|
|
<p>
|
|
<a href="facilityreview-edit.php?account=<?php echo $_GET['account'];?>&id=<?php echo $data['id']; ?>" class="btn btn-info btn-sm">
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
|
</a>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<?php if (!$allow_st || $allow_st > 1) echo "--"; else { ?>
|
|
<p>
|
|
<a href="facilityreview-delete.php?id=<?php echo $data['id']; ?>" class="btn btn-info btn-sm" onClick="return confirm('Are you sure you want to delete?')">
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
</a>
|
|
</p>
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
else:
|
|
echo "<h2>There is no record!</h2>";
|
|
endif;
|
|
|
|
#代表結束連線
|
|
mysqli_close($link);
|
|
|
|
include "footer.php";
|
|
?>
|