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.
145 lines
5.1 KiB
145 lines
5.1 KiB
<?php
|
|
include "header.php";
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$db_query = "SELECT * FROM schedule WHERE id=$id";
|
|
|
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$data = mysqli_query($link,$db_query);
|
|
/*
|
|
include "inc/record_update.php";
|
|
|
|
try {
|
|
// 設置一個空陣列來放資料
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$db_query = "SELECT * FROM expert WHERE id=$id";
|
|
|
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$data = mysqli_query($link,$db_query);
|
|
}catch (Exception $e) {
|
|
echo 'Caught exception: ', $e->getMessage(), "\n";
|
|
}
|
|
*/
|
|
foreach($data as $data) :
|
|
?>
|
|
|
|
<div class="container">
|
|
<form class="form-inline" method="post" action="schedule-record-update.php" enctype="multipart/form-data">
|
|
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
|
|
|
<div>
|
|
<label for="contractno">合約號</label>
|
|
<input type="text" name="contractno" id="contractno" value="<?php echo $data['contractno']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="facilityno">作番號</label>
|
|
<input type="text" name="facilityno" id="facilityno" value="<?php echo $data['facilityno']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="combono">保養套餐編號</label>
|
|
<input type="text" name="combono" id="combono" value="<?php echo $data['combono']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="repairerid">保養人員工號</label>
|
|
<input type="text" name="repairerid" id="repairerid" value="<?php echo $data['repairerid']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="repairername">保養人員姓名</label>
|
|
<input type="text" name="repairername" id="repairername" value="<?php echo $data['repairername']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="duedate">應保養日期</label>
|
|
<input type="text" name="duedate" id="duedate" value="<?php echo $data['duedate']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="actualdate">實際保養日期</label>
|
|
<input type="text" name="actualdate" id="actualdate" data-date-format="yyyy-mm-dd" value="<?php echo $data['actualdate']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="item">保養項目編號</label>
|
|
<input type="text" name="item" id="item" value="<?php echo $data['item']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="item_detail">保養項目內容</label>
|
|
<input type="text" name="item_detail" id="item_detail" value="<?php echo $data['item_detail']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="result">保養結果</label>
|
|
<input type="text" name="result" id="result" value="<?php echo $data['result']; ?>">
|
|
</div>
|
|
|
|
<!--
|
|
<div>
|
|
<label for="evidences">上傳照片</label>
|
|
<input type="text" name="evidences" id="evidences" >
|
|
</div>
|
|
-->
|
|
|
|
<div>
|
|
<label for="descriptons">說明</label>
|
|
<input type="text" name="descriptons" id="descriptons" value="<?php echo $data['descriptons']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="customer_login_id">客戶評價登入帳號</label>
|
|
<input type="text" name="customer_login_id" id="customer_login_id" value="<?php echo $data['customer_login_id']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="customer_login_name">客戶姓名</label>
|
|
<input type="text" name="customer_login_name" id="customer_login_name" value="<?php echo $data['customer_login_name']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="stars">保養品質/評價等級(1-5星)</label>
|
|
<input type="text" name="stars" id="stars" onkeyup="if(value<0)value=0;if(value>5)value=5;value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" value="<?php echo $data['stars_c1']; ?>">
|
|
</div>
|
|
<div>
|
|
<label for="stars2">服務態度/評價等級(1-5星)</label>
|
|
<input type="text" name="stars2" id="stars2" onkeyup="if(value<0)value=0;if(value>5)value=5;value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" value="<?php echo $data['stars_c2']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="details">內容</label>
|
|
<input type="text" name="details" id="details" value="<?php echo $data['details']; ?>">
|
|
</div>
|
|
<!--
|
|
<div>
|
|
<label for="customer_signature">簽名檔</label>
|
|
<input type="text" name="customer_signature" id="customer_signature" value="<?php echo $data['customer_signature']; ?>">
|
|
</div>
|
|
-->
|
|
<div>
|
|
<label for="creater">建檔人</label>
|
|
<input type="text" name="creater" id="creater" value="<?php echo $data['creater']; ?>" readonly>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<br>
|
|
<button type="submit" name="update">確認</button>
|
|
</div>
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
|
|
endforeach;
|
|
|
|
include "footer.php";
|
|
|
|
?>
|
|
|