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.
86 lines
2.9 KiB
86 lines
2.9 KiB
<?php
|
|
include "header.php";
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$data = array();
|
|
// sql语法存在变数中
|
|
$db_query = "SELECT * FROM wipinstallation 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) :
|
|
?>
|
|
<script>
|
|
$(function () {
|
|
$('#accountid').keyup(function(){ $(this).val($(this).val().replace(/[^\w\.\/]/ig,'')); })
|
|
$('#facilityno').keyup(function(){ $(this).val($(this).val().replace(/[^\w\.\/]/ig,'')); })
|
|
});
|
|
</script>
|
|
<div class="container">
|
|
<form class="form-inline" method="post" action="wipinstallation-record-update.php" enctype="multipart/form-data">
|
|
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
|
|
|
<div>
|
|
<label for="accountid">客戶帳號</label>
|
|
<input type="text" name="accountid" id="accountid" value="<?php echo $data['accountid']; ?>" maxlength="10" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="facilityno">電梯編號</label>
|
|
<input type="text" name="facilityno" id="facilityno" value="<?php echo $data['facilityno']; ?>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="issue_time">時間</label><br>
|
|
<input type="date" name="issue_time" id="issue_time" value="<?php echo substr($data['issue_time'],0,10); ?>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="process">階段</label>
|
|
<select name="process" id="process" required>
|
|
<option value="">請選擇</option>
|
|
<option value="進場施工"<?php if ($data['process']=="進場施工") echo " selected"; ?>>進場施工</option>
|
|
<option value="安裝"<?php if ($data['process']=="安裝") echo " selected"; ?>>安裝</option>
|
|
<option value="試車"<?php if ($data['process']=="試車") echo " selected"; ?>>試車</option>
|
|
<option value="交車"<?php if ($data['process']=="交車") echo " selected"; ?>>交車</option>
|
|
</select>
|
|
</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";
|
|
|
|
?>
|
|
|
|
|