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.
173 lines
5.4 KiB
173 lines
5.4 KiB
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<!-- 主頁header -->
|
|
<?php
|
|
|
|
|
|
/*--- 處理session ----*/
|
|
include "include-session-security.php"; #確認session
|
|
/*--- 處理session ----*/
|
|
|
|
$id_schedule = $_REQUEST["id_schedule"];
|
|
|
|
$image_directory = "maintenance_uploads/";
|
|
$photo_before = glob($image_directory . $id_schedule . "-" . "before" . "-" . "*.*");
|
|
$photo_after = glob($image_directory . $id_schedule . "-" . "after" . "-" . "*.*");
|
|
|
|
|
|
include "include-header.php";
|
|
require_once "db/database.php";
|
|
#echo "id_schedule: " . $id_schedule . "<br>";
|
|
#echo "token: " . $token;
|
|
$actualdate = date('Y/m/d H:i:s');
|
|
|
|
|
|
$sql = "select stars, stars_b2, stars_c1, stars_c2 from schedule where facilityno in (select facilityno from schedule where id = '$id_schedule') and actualdate is not null order by id desc limit 1";
|
|
$res = mysqli_query($link, $sql);
|
|
while ($row = mysqli_fetch_assoc($res)) {
|
|
$stars = ($row["stars_c1"] <> "") ? $row["stars_c1"] : (($row["stars"] <> "") ? $row["stars"] : "");
|
|
$stars2 = ($row["stars_c2"] <> "") ? $row["stars_c2"] : (($row["stars_b2"] <> "") ? $row["stars_b2"] : "");
|
|
}
|
|
mysqli_free_result($res);
|
|
?>
|
|
<style>
|
|
.star{
|
|
/*display: inline-block;*/
|
|
font-size: 13px;
|
|
position:relative;
|
|
}
|
|
.star-item{
|
|
display: inline-block;
|
|
width: 0px;
|
|
height:20px;
|
|
vertical-align:sub;
|
|
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAMAAADJ7yrpAAAAYFBMVEUAAAD92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92Un92UmCTPEWAAAAH3RSTlMA9iwe++hAgPLJo13i3Td8JO3Sk4xtYkYUC76cVBIjGgBFCwAAAMtJREFUKM+1kUkOhCAQRUEFBHGep67737JRlEFNJ73wbyAv9WtRD/1O3z/AqrqzDqC7spEAkPECGagwlwRJE28wbpJAk5xjcIJ5rmBBwAsp9nLpsvJYkMWWxRk6QrHZSJFJesIU2UQnjCwLwSQ0kG4zQmzzdmcCuA5VocaQGNiyQX8G1qK/8q6jNH1wtCx3RxwhfnUkM3Vs6ToSdNUDK52NI6JL+4R1JD/HYaXriOsP9xxN+p08R0JV1ZlnzxELRBSJIPccSe1IvufoCxGAFoLwSVOBAAAAAElFTkSuQmCC') left top repeat;
|
|
}
|
|
</style>
|
|
<!-- * 主頁header -->
|
|
|
|
|
|
<body class="bg-white">
|
|
|
|
<!-- 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">
|
|
|
|
<div class="section full mb-3">
|
|
<div class="section-title">保養前(含檢查項目)</div>
|
|
<div class="wide-block pb-1 pt-2">
|
|
<div class="carousel-multiple owl-carousel owl-theme">
|
|
<?php
|
|
foreach ($photo_before as $photo_path) {
|
|
echo "<div class='item'>";
|
|
echo "<img src='$photo_path' alt='alt' class='imaged w-100'>";
|
|
echo "</div>";
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section full mb-3">
|
|
<div class="section-title">保養後(含檢查項目)</div>
|
|
<div class="wide-block pb-1 pt-2">
|
|
<div class="carousel-multiple owl-carousel owl-theme">
|
|
<?php
|
|
foreach ($photo_after as $photo_path) {
|
|
echo "<div class='item'>";
|
|
echo "<img src='$photo_path' alt='alt' class='imaged w-100'>";
|
|
echo "</div>";
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal fade" id="imagemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<img src="" id="imagepreview" style="width: 100%;" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section full mb-auto">
|
|
<div class="section-title">客戶評價</div>
|
|
<div class="wide-block pb-1 pt-1">
|
|
<div class="star">保養品質:<span class="star-item" data-rate="<?php echo $stars; ?>"></span></div>
|
|
<div class="star">服務態度:<span class="star-item" data-rate="<?php echo $stars2; ?>"></span></div>
|
|
</div>
|
|
</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>
|
|
<script>
|
|
$(function(){
|
|
$('.star .star-item').each(function(){
|
|
//console.log($(this).attr('data-rate'));
|
|
$(this).css({'width':$(this).attr('data-rate')*20+'px'});
|
|
|
|
if ($(this).attr('data-rate')=='' || $(this).attr('data-rate')==0) {
|
|
$(this).css({'width':'100px'});
|
|
$(this).css({'background-position':'left bottom'});
|
|
}
|
|
});
|
|
$('.item > img').on('click', function() {
|
|
$('#imagepreview').attr('src', $(this).attr('src'));
|
|
$('#imagemodal').modal('show');
|
|
});
|
|
});
|
|
</script>
|
|
</html>
|