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.
155 lines
4.0 KiB
155 lines
4.0 KiB
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<!-- 主頁header -->
|
|
<?php
|
|
|
|
|
|
/*--- 處理session ----*/
|
|
include "include-session-security.php"; #確認session
|
|
/*--- 處理session ----*/
|
|
|
|
|
|
$id_schedule = $_REQUEST['id_schedule'];
|
|
$contractno = $_REQUEST['contractno'];
|
|
$facilityno = $_REQUEST['facilityno'];
|
|
$combono = $_REQUEST['combono'];
|
|
|
|
|
|
/*--- 處理重新刷新後id_schedule與token消失的補救方式
|
|
if ($id_schedule == "") {
|
|
$id_schedule = $_COOKIE['id_schedule'];
|
|
}else{
|
|
setcookie("id_schedule", $id_schedule);
|
|
}
|
|
if ($token == "") {
|
|
$token = $_COOKIE['token'];
|
|
}else{
|
|
setcookie("token", $token);
|
|
}
|
|
處理重新刷新後id_schedule與token消失的補救方式 ----*/
|
|
|
|
$item = array();
|
|
$item_detail = array();
|
|
$result = array();
|
|
|
|
|
|
# Get到所有的item, item_description, result
|
|
include "include-function-allparts.php"; //產生$item, $item_detail, result
|
|
#$item = get_maintenance_item($combono, $data);
|
|
#$item_detail = get_maintenance_item_detail($combono, $data);
|
|
#$result = get_maintenance_result($combono, $data);
|
|
|
|
# Get到所有的item, item_description, result
|
|
#include "include-function.php"; //產生$item, $item_detail, result
|
|
#$item = get_maintenance_item($combono, $data);
|
|
#$item_detail = get_maintenance_item_detail($combono, $data);
|
|
#$result = get_maintenance_result($combono, $data);
|
|
|
|
/*
|
|
include "include-function-byparts.php"; //產生$item, $item_detail, result
|
|
$item = get_maintenance_item($combono);
|
|
$item_detail = get_maintenance_item_detail($combono);
|
|
$result = get_maintenance_result($combono);
|
|
*/
|
|
|
|
|
|
#print_r($item);
|
|
#echo "<br>";
|
|
#print_r($item_detail);
|
|
#echo "<br>";
|
|
#print_r($result);
|
|
#echo "<br>";
|
|
|
|
/*
|
|
$i=count($result);
|
|
for($j=0 ; $j<$i ; $j++){
|
|
echo "[" . $item[$j] . "][" . $item_detail[$j] . "][" . $result[$j] . "]";
|
|
echo "<br><br>";
|
|
}
|
|
*/
|
|
|
|
include "include-header.php";
|
|
$actualdate = date('Y/m/d H:i:s');
|
|
|
|
$result = json_encode($result); #轉成json格式
|
|
$item = json_encode($item); #轉成json格式
|
|
$item_detail = urldecode(json_encode($item_detail)); #轉成json格式,利用urldecode確保進入資料庫是正確的中文。(GET時有特別urlencode過)
|
|
require_once "db/database.php"; # 載入db.php來連結資料庫
|
|
$sql_query = "UPDATE schedule set item = '$item', item_detail = '$item_detail', result = '$result', actualdate = '$actualdate' WHERE id='$id_schedule'";
|
|
mysqli_query($link, $sql_query);
|
|
|
|
?>
|
|
<!-- * 主頁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 no-border transparent position-absolute">
|
|
<!--
|
|
<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="login-form">
|
|
<div class="section">
|
|
<h1>回傳成功</h1>
|
|
<h4>感謝您!!!</h4>
|
|
|
|
<div class="section full mt-2">
|
|
<!-- do not forget to delete mr-1 and mb-1 when copy / paste codes -->
|
|
<!-- do not forget to delete mr-1 and mb-1 when copy / paste codes -->
|
|
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='app-maintenance-uploadsuccess-photo-review.php?id_schedule=<?php echo $id_schedule; ?>&token=<?php echo $token; ?>'">
|
|
檢視保養前後圖片
|
|
</button>
|
|
</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>
|