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.
158 lines
6.4 KiB
158 lines
6.4 KiB
<?php
|
|
$token = $_REQUEST["token"];
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" />
|
|
<title>公告欄</title>
|
|
<link rel="stylesheet" href="css/plugins/fontawesome-free/css/all.min.css">
|
|
<link rel="stylesheet" href="css/dist/css/adminlte.min.css">
|
|
<script src="../css/jquery.min.js"></script>
|
|
<script src="../css/bootstrap.min.js"></script>
|
|
<!--<link rel="stylesheet" href="../css/styles.css" />
|
|
<link rel="stylesheet" href="../css/bootstrap.min.css">
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>-->
|
|
<style>
|
|
.content-wrapper {
|
|
background-color: #fff;
|
|
}
|
|
.col-lg-6 {
|
|
padding:8px 0 0 0!important;
|
|
}
|
|
.card {
|
|
height: 90vh;
|
|
line-height: 14 px;
|
|
font-size: 14px;
|
|
}
|
|
.card-header {
|
|
background-color: #f4f6f9;
|
|
padding-left: 16px;
|
|
}
|
|
.card-body ol {
|
|
font-size: 14px;
|
|
margin-left: -30px;
|
|
}
|
|
.nav-pills .nav-link {
|
|
color: #446887;
|
|
}
|
|
h5 svg {
|
|
vertical-align: baseline;
|
|
}
|
|
h5 a {
|
|
color: #000;
|
|
}
|
|
@media screen and (max-width: 992px){
|
|
.card {
|
|
height: 95vh;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Main content -->
|
|
<div class="content">
|
|
<div class="container">
|
|
<div class="row">
|
|
<!-- /.col-md-6 -->
|
|
<div class="col-lg-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="card-title m-0"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"><path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/><path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/></svg>
|
|
<a href="/wms/board-index.php?function_name=board&token=<?php echo $token; ?>" target="_parent">公告欄</a></h5>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
Loading...
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.col-md-6 -->
|
|
</div>
|
|
<!-- /.row -->
|
|
</div><!-- /.container-fluid -->
|
|
</div>
|
|
<!-- /.content -->
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
</div>
|
|
<!--
|
|
<div class="col-12" style="margin:4px;padding:0 8px;">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="card-title">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
|
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
|
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
|
</svg>
|
|
公告欄</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
Loading...
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-->
|
|
<script>
|
|
$(document).ready(function() {
|
|
here();
|
|
});
|
|
|
|
function here() {
|
|
var URL = 'api_getdata.php?p=board';
|
|
$.ajax({
|
|
type: "GET",
|
|
url: URL,
|
|
success: function (msg) {
|
|
var obj = JSON.parse(msg);
|
|
var barr = [];
|
|
var myhtml = '';
|
|
var jid = '';
|
|
var jtitle = '';
|
|
var jcontent = '';
|
|
var jattach = '';
|
|
var jcreater = '';
|
|
var jcreate_at = '';
|
|
if (obj.st == 'ok') {
|
|
myhtml += '<ul class="nav nav-pills flex-column">';
|
|
for (i=1; i<=Object.keys(obj.content).length; i++) {
|
|
jid = obj.content[i].id;
|
|
jtitle = obj.content[i].title;
|
|
jcontent = obj.content[i].board_content;
|
|
jattach = obj.content[i].attach;
|
|
jcreater = obj.content[i].creater;
|
|
jcreate_at = obj.content[i].create_at;
|
|
barr[jid]=jtitle+'@@'+jcontent+'@@'+jattach+'@@'+jcreater+'@@'+jcreate_at;
|
|
myhtml += '<li class="nav-item"><a href="#boardModal" id="'+jid+'" class="nav-link" data-toggle="modal" data-target="#boardModal">'+jtitle+'</a></li>';
|
|
}
|
|
if (Object.keys(obj.content).length == 6) {
|
|
myhtml += '<li class="nav-item"><a href="/wms/board-index.php?function_name=board&token=<?php echo $token; ?>" class="nav-link" target="_parent">.... 顯示更多</a></li>';
|
|
}
|
|
myhtml += '</ul>';
|
|
$('.card-body').empty().append(myhtml);
|
|
|
|
$("li > a").click(function(){
|
|
//console.log('barr='+barr[$(this).attr('id')]);
|
|
//console.log('id='+$(this).attr('id'));
|
|
var str = barr[$(this).attr('id')].split('@@');
|
|
//window.parent.parent.$(".modal-title").html('主旨:'+str[0]);
|
|
//window.parent.parent.$(".modal-body").html('內容:<p>'+str[1]+'</p><p>附件:<a href="/wms/board-attach/'+str[2]+'" target="_blank">'+str[2]+'</a></p><p>建檔人員:'+str[3]+'</p><p>建檔時間:'+str[4]+'</p>');
|
|
window.parent.parent.$(".board-title").html(str[0]);
|
|
window.parent.parent.$(".board-content").html(str[1]);
|
|
window.parent.parent.$(".board-attach").html('<a href="/wms/board-file.php?id='+$(this).attr('id')+'" target="_blank">'+str[2]+'</a>');
|
|
window.parent.parent.$(".board-creater").html(str[3]);
|
|
window.parent.parent.$(".board-create_at").html(str[4]);
|
|
window.parent.parent.$('#boardModal').modal('show');
|
|
});
|
|
|
|
}
|
|
}
|
|
})
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|