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.
80 lines
2.8 KiB
80 lines
2.8 KiB
<?php
|
|
include "header.php";
|
|
?>
|
|
<script>
|
|
$(function() {});
|
|
</script>
|
|
<div class="container">
|
|
<?php
|
|
include "board-record-submit.php";
|
|
/*
|
|
if($_SERVER["REQUEST_METHOD"] == "POST"){
|
|
if(empty($_POST["id"]) && empty($_POST["expert_id"]) && empty($_POST["personal_id"])){
|
|
echo "<p class='error'>Please fill up the required field!</p>";
|
|
} else {
|
|
echo "<p class='success'>Record has added successfully</p>";
|
|
}
|
|
}
|
|
*/
|
|
?>
|
|
|
|
<form class="form-inline" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" enctype="multipart/form-data">
|
|
<div class='container'>
|
|
<div class='row'>
|
|
<div class='col-md-6 col-12'>
|
|
<label for="title">主旨</label>
|
|
<input type="text" name="title" id="title" size="30" maxlength="25" required>
|
|
</div>
|
|
<div class='col-md-6 col-12'>
|
|
<label for="attatch1">附件上傳</label>
|
|
<div>
|
|
<input type="file" name="attatch1" id="attatch1">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='row'>
|
|
<div class='col-md-3 col-3'>
|
|
<label>連結名稱</label>
|
|
<input type="text" id="linkName">
|
|
</div>
|
|
<div class='col-md-9 col-6'>
|
|
<label>連結網址</label>
|
|
<input type="text" id="linkURL">
|
|
</div>
|
|
<div class='col-md-2 col-2'>
|
|
<button type='button' onclick="insertLink()">插入超連結</button>
|
|
</div>
|
|
</div>
|
|
<div class='row'>
|
|
<div class='col-md-12 col-12'>
|
|
<label for="content">公告內容</label><br>
|
|
<textarea class="form-control2" name="content" id="content" rows="8" cols="100" required></textarea>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class='row'>
|
|
<div class='col-md-12 col-12'>
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
<button type="submit" name="submit" id="submit">確定</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
function insertLink() {
|
|
var linkName = document.getElementById('linkName').value;
|
|
var linkURL = document.getElementById('linkURL').value;
|
|
|
|
if (linkName !== '' && linkURL !== '') {
|
|
var textarea = document.getElementById('content');
|
|
var link = '<a style="color:blue" href="' + linkURL + '">' + linkName + '</a>';
|
|
|
|
// 插入超連結到 textarea 中
|
|
textarea.value += link;
|
|
} else {
|
|
alert('請輸入連結名稱和 URL');
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<?php include "footer.php"; ?>
|