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.
168 lines
4.6 KiB
168 lines
4.6 KiB
<?php
|
|
include "../header.php";
|
|
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$sql_cmd = sql_myself($user_id, "handlestaff");
|
|
// 張珈瑄、莊雅涵、賴定國、何維光可瀏覽近兩個月資料
|
|
if ($user_id == "M0061" || $user_id == "M0112" || $user_id == "C0004" || $user_id == "M0154") {
|
|
$last2mon = date("Y/m/d 00:00:00", strtotime("-2 month"));
|
|
$sql_cmd = "where calltime >= '$last2mon'";
|
|
}
|
|
$sql = "select * from fault_notification_job_handling $sql_cmd order by id desc";
|
|
$data = mysqli_query($link,$sql);
|
|
/*
|
|
$permissionsql = "select * from account_permission where permissiontype='B' and accountid='$user_id'";
|
|
$permissiondata = mysqli_query($link,$permissionsql);
|
|
$row = mysqli_fetch_array($permissiondata, MYSQLI_ASSOC);
|
|
$permission = $row['permission'];
|
|
*/
|
|
if ($user_auth&2) {
|
|
?>
|
|
<p><a href="fault-create.php?function_name=faultreview&<?php echo $token_link; ?>" class="btn btn-info btn-sm" style="margin-left: 12px"> <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;
|
|
|
|
}
|
|
|
|
@media screen and (max-width: 600px) {
|
|
|
|
table {
|
|
border: 0;
|
|
}
|
|
|
|
table thead {
|
|
display: none;
|
|
}
|
|
|
|
table tr {
|
|
margin-bottom: 10px;
|
|
display: block;
|
|
border-bottom: 2px solid #ddd;
|
|
}
|
|
|
|
table td {
|
|
display: block;
|
|
text-align: right;
|
|
font-size: 14px;
|
|
border-bottom: 1px dotted #ccc;
|
|
}
|
|
|
|
table td:last-child {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
table td:before {
|
|
content: attr(data-label);
|
|
float: left;
|
|
text-transform: uppercase;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
</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>
|
|
<?php //if($permission==0) {?>
|
|
<?php if ($user_auth&2) { ?>
|
|
<th>修改</th>
|
|
<!-- <th>刪除</th>-->
|
|
<?php }?>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
foreach($data as $key=>$data) :
|
|
?>
|
|
<tr>
|
|
<td><?php echo $key+1; ?></td>
|
|
<td><?php echo $data['facilityno']; ?></td>
|
|
<td><a href="fault-detail.php?account=<?php echo $user_id;?>&id=<?php echo $data['id']; ?>&function_name=faultreview&<?php echo $token_link; ?>"><?php echo $data['sitename']; ?></a></td>
|
|
<td><?php echo $data['faultstate']; ?></td>
|
|
<td><?php echo $data['caller']; ?></td>
|
|
<td><?php echo $data['address']; ?></td>
|
|
<!-- <td>--><?php //echo $data['buildingnumber']; ?><!--</td>-->
|
|
<!-- <td>--><?php //echo $data['positionnumber']; ?><!--</td>-->
|
|
<!-- <td>--><?php //echo $data['brandmodel']; ?><!--</td>-->
|
|
<td><?php echo $data['calltime']; ?></td>
|
|
<td><?php echo $data['handlestaff']; ?></td>
|
|
<td><?php echo $data['remarks']; ?></td>
|
|
<?php //if($permission==0) {?>
|
|
<?php if ($user_auth&2) { ?>
|
|
<td>
|
|
<p>
|
|
<a href="faultreview-edit.php?account=<?php echo $user_id;?>&id=<?php echo $data['id']; ?>&function_name=faultreview&<?php echo $token_link; ?>" class="btn btn-info btn-sm">
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
|
</a>
|
|
</p>
|
|
</td>
|
|
<!-- <td>-->
|
|
<!-- <p>-->
|
|
<!-- <a href="faultreview-delete.php?account=--><?php //echo $user_id;?><!--&id=--><?php //echo $data['id']; ?><!--" class="btn btn-info btn-sm" onClick="return confirm('確定刪除?')">-->
|
|
<!-- <span class="glyphicon glyphicon-remove"></span>-->
|
|
<!-- </a>-->
|
|
<!-- </p>-->
|
|
<!---->
|
|
<!-- </td>-->
|
|
<?php }?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
else:
|
|
echo "<h2>There is no record!</h2>";
|
|
endif;
|
|
|
|
#代表結束連線
|
|
mysqli_close($link);
|
|
|
|
include "../footer.php";
|
|
?>
|