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.
116 lines
3.1 KiB
116 lines
3.1 KiB
<?php
|
|
include "header.php";
|
|
// 載入db.php來連結資料庫
|
|
require_once "database.php";
|
|
|
|
// 設置一個空陣列來放資料
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$sql = "select * from maintance_contract_review order by id";
|
|
$data = mysqli_query($link,$sql);
|
|
?>
|
|
<!--<p>-->
|
|
<!--<a href="review-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>-->
|
|
</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['signrole']; ?></td>
|
|
<td><?php echo $data['signer']; ?></td>
|
|
<td><?php echo $data['signresult']; ?></td>
|
|
<td><?php echo $data['Contentdescription']; ?></td>
|
|
<td><?php echo $data['updatee_at']; ?></td>
|
|
<!-- <td>-->
|
|
<!-- <p>-->
|
|
<!-- <a href="review-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="review-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";
|
|
?>
|