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.
60 lines
2.1 KiB
60 lines
2.1 KiB
<?php
|
|
exit;
|
|
require_once "database.php";
|
|
include "header.php";
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$db_query = "select * from board where id = '$id'";
|
|
$data = mysqli_query($link, $db_query);
|
|
|
|
foreach($data as $data) :
|
|
?>
|
|
<script>
|
|
$(function(){
|
|
});
|
|
</script>
|
|
<div class="container">
|
|
<form class="form-inline" method="post" action="board-record-update.php" enctype="multipart/form-data">
|
|
<div>
|
|
<label for="title">主旨</label>
|
|
<input type="text" name="title" id="title" size="30" maxlength="25" value="<?php echo $data['title']; ?>" required>
|
|
</div>
|
|
<!--<div>
|
|
<label for="sdate">開始日期</label><br>
|
|
<input type="date" name="sdate" id="sdate" value="<?php echo $data['sdate']; ?>" required>
|
|
</div>
|
|
<div>
|
|
<label for="edate">結束日期</label><br>
|
|
<input type="date" name="edate" id="edate" value="<?php echo $data['edate']; ?>" required>
|
|
</div>-->
|
|
<div>
|
|
<label for="pin">置頂</label>
|
|
<select name="pin" id="pin">
|
|
<option value="Y"<?php if ($data["pin"]>1) echo " selected"; ?>>是</option>
|
|
<option value="N"<?php if ($data["pin"]==1) echo " selected"; ?>>否</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="attatch1">附件上傳</label>
|
|
<a href="<?php echo $data['attach']; ?>" target="_blank"><?php echo str_replace("/wms/board-attach/","",$data['attach']); ?></a>
|
|
<div>
|
|
<input type="file" name="attatch1" id="attatch1">
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label for="content">公告內容</label><br>
|
|
<textarea class="form-control2" name="content" id="content" rows="8" cols="100" required><?php echo $data['content']; ?></textarea>
|
|
</div>
|
|
<div>
|
|
<br>
|
|
<button type="submit" name="update" id="update">確定</button>
|
|
</div>
|
|
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
|
</form>
|
|
</div>
|
|
<?php
|
|
endforeach;
|
|
|
|
include "footer.php";
|
|
?>
|