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.
126 lines
4.5 KiB
126 lines
4.5 KiB
<?php
|
|
include "header.php";
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$db_query = "SELECT * FROM expert WHERE id=$id";
|
|
|
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$data = mysqli_query($link,$db_query);
|
|
/*
|
|
include "inc/expert-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="expert-record-update.php" enctype="multipart/form-data">
|
|
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
|
|
|
<div>
|
|
<label for="expert_id">專家ID</label>
|
|
<input type="text" name="expert_id" id="expert_id" value="<?php echo $data['expert_id']; ?>" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="personal_id">身分證字號</label>
|
|
<input type="text" name="personal_id" id="personal_id" value="<?php echo $data['personal_id']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="name">顯示姓名</label>
|
|
<input type="text" name="name" id="name" value="<?php echo $data['name']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="title">稱謂</label>
|
|
<input type="text" name="title" id="title" value="<?php echo $data['title']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="major">專長</label>
|
|
<input type="text" name="major" id="major" value="<?php echo $data['major']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="tel">電話</label>
|
|
<input type="text" name="tel" id="tel" value="<?php echo $data['tel']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="tel_count">電話支援次數</label>
|
|
<input type="text" name="tel_count" id="tel_count" value="<?php echo $data['tel_count']; ?>" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="chat_id">文字客服連結</label>
|
|
<input type="text" name="chat_id" id="chat_id" value="<?php echo $data['chat_id']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="chat_count">文字客服次數</label>
|
|
<input type="text" name="chat_count" id="chat_count" value="<?php echo $data['chat_count']; ?>" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="video_call">遠程視頻連結</label>
|
|
<input type="text" name="video_call" id="video_call" value="<?php echo $data['video_call']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="video_count">遠程視頻次數</label>
|
|
<input type="text" name="video_count" id="video_count" value="<?php echo $data['video_count']; ?>" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="onsite_call">現場支援電話</label>
|
|
<input type="text" name="onsite_call" id="onsite_call" value="<?php echo $data['onsite_call']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="onsite_count">現場支援次數</label>
|
|
<input type="text" name="onsite_count" id="onsite_count" value="<?php echo $data['onsite_count']; ?>" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d)?).*$/g, '$1')" required>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="creater">建檔人</label>
|
|
<input type="text" name="creater" id="creater" value="<?php echo $data['creater']; ?>" readonly>
|
|
</div>
|
|
|
|
<div class="bottom-margin">
|
|
<label for="create_at">頭像</label>
|
|
<a><?php echo $data['picture']; ?></a>
|
|
<img width="125px" src="<?php echo $data['picture']?>" alt="" class="index-image">
|
|
</div>
|
|
<div class="bottom-margin">
|
|
<input type="file" name="fileToUpload" id="fileToUpload">
|
|
</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";
|
|
|
|
?>
|
|
|