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.
225 lines
7.1 KiB
225 lines
7.1 KiB
<!DOCTYPE html>
|
|
<html lang="zh-Hant-TW">
|
|
<head>
|
|
<!-- Google Tag Manager -->
|
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
})(window,document,'script','dataLayer','GTM-TS4X59X');</script>
|
|
<!-- End Google Tag Manager -->
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
|
|
<meta name="description" content="">
|
|
<title>最新消息 - 永佳捷電梯</title>
|
|
<link rel="icon" sizes="48x48" href="images/header/favicon.ico" type="image/x-icon" />
|
|
<link rel="shortcut icon" sizes="48x48" href="images/header/favicon.ico" type="image/x-icon" />
|
|
<link rel="Bookmark" sizes="48x48" href="images/header/favicon.ico" type="image/x-icon" />
|
|
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
|
|
<link rel="stylesheet" type="text/css" href="css/all.min.css">
|
|
<link rel="stylesheet" type="text/css" href="css/animate.min.css" />
|
|
<link rel="stylesheet" href="common/css/jquery.dataTables.min.css">
|
|
<link rel="stylesheet" href="common/css/select.dataTables.min.css">
|
|
<link rel="stylesheet" type="text/css" href="css/creer.css">
|
|
<style>
|
|
table.dataTable tbody tr {
|
|
background-color: #fff0;
|
|
}
|
|
tbody, td, tfoot, th, thead, tr {
|
|
border-style: none;
|
|
}
|
|
table.dataTable thead th, table.dataTable thead td {
|
|
border-bottom: 1px solid #ea5413;
|
|
}
|
|
table.dataTable tbody td {
|
|
border-bottom: 1px solid #ffffff66;
|
|
}
|
|
.table-responsive {
|
|
overflow-x: hidden;
|
|
}
|
|
#list_paginate {
|
|
float: inherit;
|
|
}
|
|
.pagination {
|
|
margin-top: 30px;
|
|
}
|
|
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
|
background: none;
|
|
color: black!important; /*change the hover text color*/
|
|
}
|
|
|
|
|
|
/*below block of css for change style when active*/
|
|
|
|
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
|
background: none;
|
|
color: black!important;
|
|
}
|
|
|
|
th { white-space:nowrap; }
|
|
</style>
|
|
<!-- Google tag (gtag.js) -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HZGXDG5Y12"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', 'G-HZGXDG5Y12');
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<!-- Google Tag Manager (noscript) -->
|
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TS4X59X"
|
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|
<!-- End Google Tag Manager (noscript) -->
|
|
<header w3-include-html="include/header.html"></header>
|
|
<div id="pre-loader">
|
|
<div class="spinner">
|
|
<div class="rect1"></div>
|
|
<div class="rect2"></div>
|
|
<div class="rect3"></div>
|
|
<div class="rect4"></div>
|
|
<div class="rect5"></div>
|
|
</div>
|
|
</div>
|
|
<main class="news-list-page">
|
|
<section class="banner-area text-center">
|
|
<div class="page-title"></div>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="page-title-name">
|
|
<h2>最新消息</h2>
|
|
</div>
|
|
<nav style="--bs-breadcrumb-divider: '/';" aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="index.html">首頁</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">最新消息</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="page-info position-relative">
|
|
<div class="news-bg"></div>
|
|
<div class="container">
|
|
<header class="section-title">
|
|
<b>news</b>
|
|
<h1 class="wow fadeInDown">最新消息列表</h1>
|
|
</header>
|
|
<div class="table-responsive">
|
|
<table id="list" data-toggle="table" class="table-striped table-bordered table-sm" cellspacing="0" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th nowrap="nowrap">發佈日期</th>
|
|
<th nowrap="nowrap" class="no-sort">標題</th>
|
|
<th nowrap="nowrap" class="no-sort">發佈媒體</th>
|
|
<th nowrap="nowrap">文章分類</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
<footer w3-include-html="include/footer.html"></footer>
|
|
<a href="javascript:void(0);" class="scrollup">
|
|
<span class="scrollup-txt">TOP</span>
|
|
<div class="read-more-line">
|
|
<div class="line"></div>
|
|
<div class="dot"></div>
|
|
</div>
|
|
</a>
|
|
<a href="tel:+886800803666" class="call-btn">
|
|
<img src="images/footer/call.png" alt="" class="img-fluid">
|
|
立即電話諮詢
|
|
</a>
|
|
<script type="text/javascript" src="js/jquery-3.6.0-min.js"></script>
|
|
<script type="text/javascript" src="js/bootstrap.bundle.min.js"></script>
|
|
<script type="text/javascript" src="js/wow.min.js"></script>
|
|
<script type="text/javascript" src="common/js/jquery.dataTables.min.js"></script>
|
|
<script type="text/javascript" src="common/js/dataTables.bootstrap5.min.js"></script>
|
|
<script type="text/javascript" src="common/js/dataTables.select.min.js"></script>
|
|
<script type="text/javascript" src="common/js/dataTable-page-input.js"></script>
|
|
<script type="text/javascript" src="common/js/sweetalert.min.js"></script>
|
|
<script type="text/javascript" src="js/creer.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
//將資料填入 datatable
|
|
fillDataTableRows();
|
|
let list = $('#list').DataTable({
|
|
searching: false,
|
|
"bLengthChange" : false,
|
|
"bInfo":false,
|
|
columnDefs: [{
|
|
orderable: false,
|
|
targets: "no-sort"
|
|
}],
|
|
order: [[0, 'desc']],
|
|
language: {
|
|
url: 'common/js/zh-TW.json'
|
|
},
|
|
"dom": `<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-12'p>>`
|
|
});
|
|
|
|
});
|
|
|
|
function fillDataTableRows() {
|
|
let dataRows = getListDataByAction();
|
|
let tbody = $('#list tbody');
|
|
let index=1;
|
|
for(let data of dataRows) {
|
|
let row = $('<tr>');
|
|
$('<td>').text(data.publish_date).appendTo(row);
|
|
$('<td>').html('<a type="text" href="news/news.html?id='+data.uuid+'">'+data.title+'</a>').appendTo(row);
|
|
$('<td>').text(data.news_source).appendTo(row);
|
|
$('<td>').text(data.category).appendTo(row);
|
|
row.appendTo(tbody);
|
|
index++;
|
|
}
|
|
}
|
|
|
|
function getListDataByAction(action) {
|
|
let formData = new FormData();
|
|
let listData = [];
|
|
|
|
$.ajax({
|
|
async: false,
|
|
url: 'common/ajax/news/NewsList.php',
|
|
type: 'post',
|
|
data: formData,
|
|
processData: false,
|
|
success: function(data) {
|
|
obj = JSON.parse(data);
|
|
if ( obj.status == 'success' ){
|
|
listData = obj.news;
|
|
} else if ( obj.status == 'failed' ){
|
|
Swal.fire({
|
|
title: '警告!',
|
|
html: obj.errMsg,
|
|
icon: 'warning',
|
|
confirmButtonText: '確認'
|
|
});
|
|
} else {
|
|
swal("錯誤!", obj.errMsg, "error");
|
|
Swal.fire({
|
|
title: '錯誤!',
|
|
html: obj.errMsg,
|
|
icon: 'error',
|
|
confirmButtonText: '確認'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
return listData;
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|