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.
73 lines
2.4 KiB
73 lines
2.4 KiB
<?php
|
|
include "header.php";
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$db_query = "SELECT * FROM facility_current_status 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="facility_current_status-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']; ?>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="customerid">顧客編號</label>
|
|
<input type="text" name="customerid" id="customerid" value="<?php echo $data['customerid']; ?>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="facilityno">作番號</label>
|
|
<input type="text" name="facilityno" id="facilityno" value="<?php echo $data['facilityno']; ?>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="walking_hours">運轉時數</label>
|
|
<input type="text" name="walking_hours" id="walking_hours" value="<?php echo $data['walking_hours']; ?>" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="walking_times">運轉次數</label>
|
|
<input type="text" name="walking_times" id="walking_times" value="<?php echo $data['walking_times']; ?>" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" required>
|
|
</div>
|
|
|
|
<div>
|
|
<button type="submit" name="update">確定</button>
|
|
</div>
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
|
|
endforeach;
|
|
|
|
include "footer.php";
|
|
|
|
?>
|
|
|
|
|