{"id":2386,"date":"2026-07-20T16:11:05","date_gmt":"2026-07-20T09:11:05","guid":{"rendered":"https:\/\/indus.srru.ac.th\/?page_id=2386"},"modified":"2026-07-20T16:11:31","modified_gmt":"2026-07-20T09:11:31","slug":"%e0%b8%ab%e0%b8%99%e0%b8%b1%e0%b8%87%e0%b8%aa%e0%b8%b7%e0%b8%ad%e0%b9%80%e0%b8%a7%e0%b8%b5%e0%b8%a2%e0%b8%99%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%82%e0%b9%88%e0%b8%b2%e0%b8%a7%e0%b8%9b%e0%b8%a3%e0%b8%b0","status":"publish","type":"page","link":"https:\/\/indus.srru.ac.th\/?page_id=2386","title":{"rendered":"\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19\u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2386\" class=\"elementor elementor-2386\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3dfb488 e-flex e-con-boxed e-con e-parent\" data-id=\"3dfb488\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5e7d0e3 elementor-widget elementor-widget-html\" data-id=\"5e7d0e3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\r\n<html lang=\"th\">\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n<title>\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19\u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c \u2014 \u0e04\u0e13\u0e30\u0e40\u0e17\u0e04\u0e42\u0e19\u0e42\u0e25\u0e22\u0e35\u0e2d\u0e38\u0e15\u0e2a\u0e32\u0e2b\u0e01\u0e23\u0e23\u0e21<\/title>\r\n<style>\r\n  * { box-sizing: border-box; margin: 0; padding: 0; }\r\n  body { font-family: 'Sarabun', sans-serif; background: #f5f4f8; color: #1a1a2e; }\r\n\r\n  \/* TOPBAR *\/\r\n  .topbar { background: #4a2d8f; padding: 0 2rem; height: 52px; display: flex; align-items: center; justify-content: space-between; }\r\n  .topbar-logo { color: #fff; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }\r\n  .topbar-logo svg { width: 28px; height: 28px; }\r\n  .topbar-nav { display: flex; gap: 1.5rem; }\r\n  .topbar-nav a { color: rgba(255,255,255,0.8); font-size: 13px; text-decoration: none; }\r\n  .topbar-nav a.active { color: #fff; font-weight: 600; border-bottom: 2px solid #f0c040; padding-bottom: 2px; }\r\n\r\n  \/* HERO *\/\r\n  .hero { background: #4a2d8f; padding: 2rem 2rem 1.75rem; }\r\n  .hero h1 { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 5px; }\r\n  .hero p { color: rgba(255,255,255,0.7); font-size: 14px; }\r\n\r\n  \/* CONTENT *\/\r\n  .content { max-width: 900px; margin: 0 auto; padding: 1.5rem 1.5rem; }\r\n\r\n  \/* DRIVE BANNER *\/\r\n  .drive-banner { background: #ede9fc; border: 1px solid #b9adee; border-radius: 10px; padding: 12px 16px; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }\r\n  .drive-banner-text { font-size: 13px; color: #3C3489; display: flex; align-items: center; gap: 8px; }\r\n  .btn-drive { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 16px; border-radius: 8px; background: #4a2d8f; color: #fff; text-decoration: none; white-space: nowrap; }\r\n  .btn-drive:hover { background: #3a1f7f; }\r\n\r\n  \/* STATS *\/\r\n  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 1.25rem; }\r\n  .stat-card { background: #fff; border-radius: 10px; padding: 12px 14px; border: 1px solid #e0ddf0; }\r\n  .stat-label { font-size: 12px; color: #888; margin-bottom: 4px; }\r\n  .stat-value { font-size: 22px; font-weight: 700; }\r\n\r\n  \/* TOOLBAR *\/\r\n  .toolbar { display: flex; gap: 10px; margin-bottom: 1rem; flex-wrap: wrap; }\r\n  .search-box { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 0 12px; height: 38px; }\r\n  .search-box input { border: none; background: transparent; outline: none; font-size: 13px; color: #1a1a2e; flex: 1; font-family: 'Sarabun', sans-serif; }\r\n  .search-box input::placeholder { color: #aaa; }\r\n  .filter-select { height: 38px; border: 1px solid #ccc; border-radius: 8px; padding: 0 10px; font-size: 13px; background: #fff; color: #1a1a2e; cursor: pointer; font-family: 'Sarabun', sans-serif; }\r\n\r\n  \/* TABS *\/\r\n  .tabs { display: flex; border-bottom: 2px solid #e0ddf0; margin-bottom: 1rem; }\r\n  .tab { padding: 8px 18px; font-size: 13px; color: #888; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }\r\n  .tab.active { color: #4a2d8f; border-bottom-color: #4a2d8f; font-weight: 600; }\r\n\r\n  \/* NEWS LIST *\/\r\n  .news-list { display: flex; flex-direction: column; gap: 10px; }\r\n  .news-card { background: #fff; border: 1px solid #e0ddf0; border-radius: 12px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; transition: border-color 0.15s; }\r\n  .news-card:hover { border-color: #9b87d8; }\r\n  .news-num { font-size: 12px; font-weight: 600; color: #aaa; min-width: 40px; padding-top: 2px; }\r\n  .news-body { flex: 1; }\r\n  .news-title { font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 6px; line-height: 1.45; }\r\n  .news-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }\r\n  .badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 500; }\r\n  .badge-\u0e2d\u0e1a\u0e23\u0e21 { background: #EEEDFE; color: #3C3489; }\r\n  .badge-\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23 { background: #E1F5EE; color: #085041; }\r\n  .badge-\u0e41\u0e1a\u0e1a\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21 { background: #FAEEDA; color: #633806; }\r\n  .badge-\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23 { background: #E6F1FB; color: #0C447C; }\r\n  .badge-\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e { background: #FAECE7; color: #712B13; }\r\n  .badge-default { background: #f0eef8; color: #4a2d8f; }\r\n  .news-date { font-size: 11px; color: #aaa; }\r\n  .deadline { font-size: 11px; display: flex; align-items: center; gap: 3px; }\r\n  .deadline.soon { color: #A32D2D; font-weight: 600; }\r\n  .deadline.ok { color: #3B6D11; }\r\n  .deadline.expired { color: #bbb; text-decoration: line-through; }\r\n  .news-actions { display: flex; align-items: flex-start; }\r\n  .btn-view { font-size: 12px; padding: 5px 13px; border-radius: 7px; background: #4a2d8f; color: #fff; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; border: none; cursor: pointer; font-family: 'Sarabun', sans-serif; }\r\n  .btn-view:hover { background: #3a1f7f; }\r\n\r\n  \/* EMPTY \/ LOADING *\/\r\n  .state-msg { text-align: center; padding: 3rem 1rem; color: #aaa; font-size: 14px; }\r\n  .spinner { display: inline-block; width: 22px; height: 22px; border: 3px solid #e0ddf0; border-top-color: #4a2d8f; border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 10px; }\r\n  @keyframes spin { to { transform: rotate(360deg); } }\r\n\r\n  \/* PAGINATION *\/\r\n  .pagination { display: flex; gap: 6px; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }\r\n  .page-btn { min-width: 34px; height: 34px; border: 1px solid #ddd; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; color: #555; background: #fff; padding: 0 8px; }\r\n  .page-btn.active { background: #4a2d8f; color: #fff; border-color: #4a2d8f; font-weight: 600; }\r\n  .page-btn:hover:not(.active) { background: #f0eef8; }\r\n\r\n  @media (max-width: 600px) {\r\n    .topbar-nav { display: none; }\r\n    .stats { grid-template-columns: repeat(2, 1fr); }\r\n    .news-card { flex-wrap: wrap; }\r\n  }\r\n<\/style>\r\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Sarabun:wght@400;500;600;700&display=swap\" rel=\"stylesheet\">\r\n<\/head>\r\n<body>\r\n\r\n<div class=\"topbar\">\r\n  <div class=\"topbar-logo\">\r\n    <svg viewBox=\"0 0 28 28\" fill=\"none\"><circle cx=\"14\" cy=\"14\" r=\"14\" fill=\"rgba(255,255,255,0.2)\"\/><text x=\"14\" y=\"19\" text-anchor=\"middle\" fill=\"#fff\" font-size=\"13\" font-weight=\"700\">\u0e2d\u0e01<\/text><\/svg>\r\n    \u0e04\u0e13\u0e30\u0e40\u0e17\u0e04\u0e42\u0e19\u0e42\u0e25\u0e22\u0e35\u0e2d\u0e38\u0e15\u0e2a\u0e32\u0e2b\u0e01\u0e23\u0e23\u0e21 \u0e21\u0e23\u0e20.\u0e2a\u0e38\u0e23\u0e34\u0e19\u0e17\u0e23\u0e4c\r\n  <\/div>\r\n  <div class=\"topbar-nav\">\r\n    <a href=\"https:\/\/indus.srru.ac.th\">\u0e2b\u0e19\u0e49\u0e32\u0e41\u0e23\u0e01<\/a>\r\n    <a href=\"https:\/\/indus.srru.ac.th\" class=\"active\">\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c<\/a>\r\n    <a href=\"https:\/\/indus.srru.ac.th\">\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d<\/a>\r\n  <\/div>\r\n<\/div>\r\n\r\n<div class=\"hero\">\r\n  <h1>\ud83d\udce2 \u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19\u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c<\/h1>\r\n  <p>\u0e23\u0e27\u0e1a\u0e23\u0e27\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19 \u0e02\u0e48\u0e32\u0e27\u0e2d\u0e1a\u0e23\u0e21 \u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23 \u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e02\u0e2d\u0e07\u0e04\u0e13\u0e30\u0e2f<\/p>\r\n<\/div>\r\n\r\n<div class=\"content\">\r\n\r\n  <div class=\"drive-banner\">\r\n    <div class=\"drive-banner-text\">\r\n      \ud83d\udcc1 \u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23\u0e15\u0e49\u0e19\u0e09\u0e1a\u0e31\u0e1a\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19 Google Drive \u2014 \u0e01\u0e14\u0e1b\u0e38\u0e48\u0e21\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e42\u0e14\u0e22\u0e15\u0e23\u0e07\r\n    <\/div>\r\n    <a href=\"https:\/\/drive.google.com\/drive\/folders\/1Dlfpcouy3H215ebvKPy38z1lAIydEWnD?usp=drive_link\" target=\"_blank\" class=\"btn-drive\">\r\n      \ud83d\udcc2 \u0e40\u0e1b\u0e34\u0e14 Google Drive\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <div class=\"stats\">\r\n    <div class=\"stat-card\">\r\n      <div class=\"stat-label\">\u0e02\u0e48\u0e32\u0e27\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14<\/div>\r\n      <div class=\"stat-value\" id=\"stat-total\" style=\"color:#4a2d8f\">\u2014<\/div>\r\n    <\/div>\r\n    <div class=\"stat-card\">\r\n      <div class=\"stat-label\">\u0e22\u0e31\u0e07\u0e40\u0e1b\u0e34\u0e14\u0e23\u0e31\u0e1a<\/div>\r\n      <div class=\"stat-value\" id=\"stat-open\" style=\"color:#3B6D11\">\u2014<\/div>\r\n    <\/div>\r\n    <div class=\"stat-card\">\r\n      <div class=\"stat-label\">\u0e43\u0e01\u0e25\u0e49\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15<\/div>\r\n      <div class=\"stat-value\" id=\"stat-soon\" style=\"color:#854F0B\">\u2014<\/div>\r\n    <\/div>\r\n    <div class=\"stat-card\">\r\n      <div class=\"stat-label\">\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15\u0e41\u0e25\u0e49\u0e27<\/div>\r\n      <div class=\"stat-value\" id=\"stat-expired\" style=\"color:#aaa\">\u2014<\/div>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"toolbar\">\r\n    <div class=\"search-box\">\r\n      \ud83d\udd0d <input type=\"text\" id=\"searchInput\" placeholder=\"\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48 \u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07...\">\r\n    <\/div>\r\n    <select class=\"filter-select\" id=\"catFilter\">\r\n      <option value=\"\">\u0e17\u0e38\u0e01\u0e2b\u0e21\u0e27\u0e14\u0e2b\u0e21\u0e39\u0e48<\/option>\r\n      <option value=\"\u0e2d\u0e1a\u0e23\u0e21\">\u0e2d\u0e1a\u0e23\u0e21 \/ \u0e2a\u0e31\u0e21\u0e21\u0e19\u0e32<\/option>\r\n      <option value=\"\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23\">\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e07\u0e32\u0e19<\/option>\r\n      <option value=\"\u0e41\u0e1a\u0e1a\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21\">\u0e41\u0e1a\u0e1a\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21<\/option>\r\n      <option value=\"\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\">\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b<\/option>\r\n      <option value=\"\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e\">\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e<\/option>\r\n    <\/select>\r\n    <select class=\"filter-select\" id=\"statusFilter\">\r\n      <option value=\"\">\u0e17\u0e38\u0e01\u0e2a\u0e16\u0e32\u0e19\u0e30<\/option>\r\n      <option value=\"open\">\u0e22\u0e31\u0e07\u0e40\u0e1b\u0e34\u0e14\u0e23\u0e31\u0e1a<\/option>\r\n      <option value=\"soon\">\u0e43\u0e01\u0e25\u0e49\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15 (7 \u0e27\u0e31\u0e19)<\/option>\r\n      <option value=\"expired\">\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15\u0e41\u0e25\u0e49\u0e27<\/option>\r\n    <\/select>\r\n  <\/div>\r\n\r\n  <div class=\"tabs\">\r\n    <div class=\"tab active\" data-tab=\"all\">\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14<\/div>\r\n    <div class=\"tab\" data-tab=\"circular\">\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19<\/div>\r\n    <div class=\"tab\" data-tab=\"news\">\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c<\/div>\r\n  <\/div>\r\n\r\n  <div id=\"newsList\" class=\"news-list\">\r\n    <div class=\"state-msg\"><div class=\"spinner\"><\/div><br>\u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25...<\/div>\r\n  <\/div>\r\n\r\n  <div class=\"pagination\" id=\"pagination\"><\/div>\r\n\r\n<\/div>\r\n\r\n<script>\r\nconst CSV_URL = 'https:\/\/docs.google.com\/spreadsheets\/d\/e\/2PACX-1vQieqrW6dozwjsyPXB4-MtDQ_sLbyp6-d4XjFUd2sfzn8BZbODPB_7-86WJitNKG6urqE1LJZKcufsT\/pub?gid=0&single=true&output=csv';\r\nconst DRIVE_URL = 'https:\/\/drive.google.com\/drive\/folders\/1Dlfpcouy3H215ebvKPy38z1lAIydEWnD?usp=drive_link';\r\nconst PER_PAGE = 10;\r\n\r\nlet allData = [];\r\nlet filtered = [];\r\nlet currentPage = 1;\r\nlet currentTab = 'all';\r\n\r\nfunction parseCSV(text) {\r\n  const lines = text.trim().split('\\n');\r\n  const headers = lines[0].split(',').map(h => h.replace(\/\"\/g, '').trim());\r\n  return lines.slice(1).map(line => {\r\n    const cols = [];\r\n    let cur = '', inQ = false;\r\n    for (let c of line) {\r\n      if (c === '\"') { inQ = !inQ; }\r\n      else if (c === ',' && !inQ) { cols.push(cur.trim()); cur = ''; }\r\n      else { cur += c; }\r\n    }\r\n    cols.push(cur.trim());\r\n    const obj = {};\r\n    headers.forEach((h, i) => obj[h] = (cols[i] || '').replace(\/\"\/g, '').trim());\r\n    return obj;\r\n  }).filter(r => r['\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48'] || r['\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07']);\r\n}\r\n\r\nfunction thaiDate(str) {\r\n  if (!str) return '';\r\n  const d = new Date(str);\r\n  if (isNaN(d)) return str;\r\n  const months = ['\u0e21.\u0e04.','\u0e01.\u0e1e.','\u0e21\u0e35.\u0e04.','\u0e40\u0e21.\u0e22.','\u0e1e.\u0e04.','\u0e21\u0e34.\u0e22.','\u0e01.\u0e04.','\u0e2a.\u0e04.','\u0e01.\u0e22.','\u0e15.\u0e04.','\u0e1e.\u0e22.','\u0e18.\u0e04.'];\r\n  return `${d.getDate()} ${months[d.getMonth()]} ${d.getFullYear() + 543}`;\r\n}\r\n\r\nfunction deadlineStatus(str) {\r\n  if (!str) return { cls: 'ok', label: '\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e33\u0e2b\u0e19\u0e14' };\r\n  const d = new Date(str);\r\n  if (isNaN(d)) return { cls: 'ok', label: str };\r\n  const diff = Math.ceil((d - new Date()) \/ 86400000);\r\n  if (diff < 0) return { cls: 'expired', label: `\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15 ${thaiDate(str)}` };\r\n  if (diff <= 7) return { cls: 'soon', label: `\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15 ${thaiDate(str)} (\u0e40\u0e2b\u0e25\u0e37\u0e2d ${diff} \u0e27\u0e31\u0e19)` };\r\n  return { cls: 'ok', label: `\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15 ${thaiDate(str)}` };\r\n}\r\n\r\nfunction getStatusKey(str) {\r\n  if (!str) return 'open';\r\n  const d = new Date(str);\r\n  if (isNaN(d)) return 'open';\r\n  const diff = Math.ceil((d - new Date()) \/ 86400000);\r\n  if (diff < 0) return 'expired';\r\n  if (diff <= 7) return 'soon';\r\n  return 'open';\r\n}\r\n\r\nfunction getBadgeClass(cat) {\r\n  if (!cat) return 'badge-default';\r\n  if (cat.includes('\u0e2d\u0e1a\u0e23\u0e21') || cat.includes('\u0e2a\u0e31\u0e21\u0e21\u0e19\u0e32')) return 'badge-\u0e2d\u0e1a\u0e23\u0e21';\r\n  if (cat.includes('\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23') || cat.includes('\u0e07\u0e32\u0e19')) return 'badge-\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23';\r\n  if (cat.includes('\u0e41\u0e1a\u0e1a\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21')) return 'badge-\u0e41\u0e1a\u0e1a\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21';\r\n  if (cat.includes('\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e')) return 'badge-\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e';\r\n  return 'badge-\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23';\r\n}\r\n\r\nfunction renderStats(data) {\r\n  const open = data.filter(r => getStatusKey(r['\u0e27\u0e31\u0e19\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15']) !== 'expired').length;\r\n  const soon = data.filter(r => getStatusKey(r['\u0e27\u0e31\u0e19\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15']) === 'soon').length;\r\n  const expired = data.filter(r => getStatusKey(r['\u0e27\u0e31\u0e19\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15']) === 'expired').length;\r\n  document.getElementById('stat-total').textContent = data.length;\r\n  document.getElementById('stat-open').textContent = open;\r\n  document.getElementById('stat-soon').textContent = soon;\r\n  document.getElementById('stat-expired').textContent = expired;\r\n}\r\n\r\nfunction renderList() {\r\n  const list = document.getElementById('newsList');\r\n  const start = (currentPage - 1) * PER_PAGE;\r\n  const page = filtered.slice(start, start + PER_PAGE);\r\n\r\n  if (filtered.length === 0) {\r\n    list.innerHTML = '<div class=\"state-msg\">\u0e44\u0e21\u0e48\u0e1e\u0e1a\u0e02\u0e48\u0e32\u0e27\u0e17\u0e35\u0e48\u0e15\u0e23\u0e07\u0e01\u0e31\u0e1a\u0e40\u0e07\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e02<\/div>';\r\n    document.getElementById('pagination').innerHTML = '';\r\n    return;\r\n  }\r\n\r\n  list.innerHTML = page.map(r => {\r\n    const dl = deadlineStatus(r['\u0e27\u0e31\u0e19\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15']);\r\n    const driveLink = r['\u0e25\u0e34\u0e07\u0e01\u0e4c Drive'] || DRIVE_URL;\r\n    const cat = r['\u0e2b\u0e21\u0e27\u0e14\u0e2b\u0e21\u0e39\u0e48'] || '\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23';\r\n    return `\r\n      <div class=\"news-card\">\r\n        <div class=\"news-num\">${r['\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48'] || '\u2014'}<\/div>\r\n        <div class=\"news-body\">\r\n          <div class=\"news-title\">${r['\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07'] || ''}<\/div>\r\n          <div class=\"news-meta\">\r\n            <span class=\"badge ${getBadgeClass(cat)}\">${cat}<\/span>\r\n            <span class=\"news-date\">\ud83d\udcc5 \u0e23\u0e31\u0e1a ${thaiDate(r['\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\u0e23\u0e31\u0e1a'])}<\/span>\r\n            <span class=\"deadline ${dl.cls}\">\u23f0 ${dl.label}<\/span>\r\n          <\/div>\r\n        <\/div>\r\n        <div class=\"news-actions\">\r\n          <a href=\"${driveLink}\" target=\"_blank\" class=\"btn-view\">\ud83d\udcc4 \u0e14\u0e39\u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23<\/a>\r\n        <\/div>\r\n      <\/div>`;\r\n  }).join('');\r\n\r\n  renderPagination();\r\n}\r\n\r\nfunction renderPagination() {\r\n  const total = Math.ceil(filtered.length \/ PER_PAGE);\r\n  const pg = document.getElementById('pagination');\r\n  if (total <= 1) { pg.innerHTML = ''; return; }\r\n  let html = '';\r\n  if (currentPage > 1) html += `<div class=\"page-btn\" onclick=\"goPage(${currentPage-1})\">\u2039<\/div>`;\r\n  for (let i = 1; i <= total; i++) {\r\n    if (i === 1 || i === total || Math.abs(i - currentPage) <= 1) {\r\n      html += `<div class=\"page-btn ${i===currentPage?'active':''}\" onclick=\"goPage(${i})\">${i}<\/div>`;\r\n    } else if (Math.abs(i - currentPage) === 2) {\r\n      html += `<div class=\"page-btn\" style=\"cursor:default\">\u2026<\/div>`;\r\n    }\r\n  }\r\n  if (currentPage < total) html += `<div class=\"page-btn\" onclick=\"goPage(${currentPage+1})\">\u203a<\/div>`;\r\n  pg.innerHTML = html;\r\n}\r\n\r\nfunction goPage(n) { currentPage = n; renderList(); window.scrollTo(0,0); }\r\n\r\nfunction applyFilters() {\r\n  const q = document.getElementById('searchInput').value.toLowerCase();\r\n  const cat = document.getElementById('catFilter').value;\r\n  const status = document.getElementById('statusFilter').value;\r\n\r\n  filtered = allData.filter(r => {\r\n    const matchTab = currentTab === 'all' ||\r\n      (currentTab === 'circular' && (r['\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17']||'').includes('\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d')) ||\r\n      (currentTab === 'news' && !(r['\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17']||'').includes('\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d'));\r\n    const matchQ = !q || (r['\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48']||'').toLowerCase().includes(q) || (r['\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07']||'').toLowerCase().includes(q);\r\n    const matchCat = !cat || (r['\u0e2b\u0e21\u0e27\u0e14\u0e2b\u0e21\u0e39\u0e48']||'').includes(cat);\r\n    const matchStatus = !status || getStatusKey(r['\u0e27\u0e31\u0e19\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15']) === status;\r\n    return matchTab && matchQ && matchCat && matchStatus;\r\n  });\r\n\r\n  currentPage = 1;\r\n  renderList();\r\n}\r\n\r\nasync function loadData() {\r\n  try {\r\n    const res = await fetch(CSV_URL);\r\n    const text = await res.text();\r\n    allData = parseCSV(text);\r\n    filtered = [...allData];\r\n    renderStats(allData);\r\n    renderList();\r\n  } catch (e) {\r\n    document.getElementById('newsList').innerHTML = '<div class=\"state-msg\">\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e44\u0e21\u0e48\u0e2a\u0e33\u0e40\u0e23\u0e47\u0e08 \u0e01\u0e23\u0e38\u0e13\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 Google Sheet<\/div>';\r\n  }\r\n}\r\n\r\ndocument.getElementById('searchInput').addEventListener('input', applyFilters);\r\ndocument.getElementById('catFilter').addEventListener('change', applyFilters);\r\ndocument.getElementById('statusFilter').addEventListener('change', applyFilters);\r\ndocument.querySelectorAll('.tab').forEach(t => {\r\n  t.addEventListener('click', () => {\r\n    document.querySelectorAll('.tab').forEach(x => x.classList.remove('active'));\r\n    t.classList.add('active');\r\n    currentTab = t.dataset.tab;\r\n    applyFilters();\r\n  });\r\n});\r\n\r\nloadData();\r\n<\/script>\r\n<\/body>\r\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19\u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c \u2014 \u0e04\u0e13\u0e30\u0e40\u0e17\u0e04\u0e42\u0e19\u0e42\u0e25\u0e22\u0e35\u0e2d\u0e38\u0e15\u0e2a\u0e32\u0e2b\u0e01\u0e23\u0e23\u0e21 \u0e2d\u0e01 \u0e04\u0e13\u0e30\u0e40\u0e17\u0e04\u0e42\u0e19\u0e42\u0e25\u0e22\u0e35\u0e2d\u0e38\u0e15\u0e2a\u0e32\u0e2b\u0e01\u0e23\u0e23\u0e21 \u0e21\u0e23\u0e20.\u0e2a\u0e38\u0e23\u0e34\u0e19\u0e17\u0e23\u0e4c \u0e2b\u0e19\u0e49\u0e32\u0e41\u0e23\u0e01 \u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d \ud83d\udce2 \u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19\u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e23\u0e27\u0e1a\u0e23\u0e27\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19 \u0e02\u0e48\u0e32\u0e27\u0e2d\u0e1a\u0e23\u0e21 \u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23 \u0e41\u0e25\u0e30\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e02\u0e2d\u0e07\u0e04\u0e13\u0e30\u0e2f \ud83d\udcc1 \u0e40\u0e2d\u0e01\u0e2a\u0e32\u0e23\u0e15\u0e49\u0e19\u0e09\u0e1a\u0e31\u0e1a\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19 Google Drive \u2014 \u0e01\u0e14\u0e1b\u0e38\u0e48\u0e21\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e42\u0e14\u0e22\u0e15\u0e23\u0e07 \ud83d\udcc2 \u0e40\u0e1b\u0e34\u0e14 Google Drive \u0e02\u0e48\u0e32\u0e27\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 \u2014 \u0e22\u0e31\u0e07\u0e40\u0e1b\u0e34\u0e14\u0e23\u0e31\u0e1a \u2014 \u0e43\u0e01\u0e25\u0e49\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15 \u2014 \u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15\u0e41\u0e25\u0e49\u0e27 \u2014 \ud83d\udd0d \u0e17\u0e38\u0e01\u0e2b\u0e21\u0e27\u0e14\u0e2b\u0e21\u0e39\u0e48\u0e2d\u0e1a\u0e23\u0e21 \/ \u0e2a\u0e31\u0e21\u0e21\u0e19\u0e32\u0e23\u0e31\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e07\u0e32\u0e19\u0e41\u0e1a\u0e1a\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21\u0e02\u0e48\u0e32\u0e27\u0e2a\u0e32\u0e23\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e \u0e17\u0e38\u0e01\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e22\u0e31\u0e07\u0e40\u0e1b\u0e34\u0e14\u0e23\u0e31\u0e1a\u0e43\u0e01\u0e25\u0e49\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15 (7 \u0e27\u0e31\u0e19)\u0e2b\u0e21\u0e14\u0e40\u0e02\u0e15\u0e41\u0e25\u0e49\u0e27 \u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 \u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e27\u0e35\u0e22\u0e19 \u0e02\u0e48\u0e32\u0e27\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-2386","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/2386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2386"}],"version-history":[{"count":3,"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/2386\/revisions"}],"predecessor-version":[{"id":2389,"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/2386\/revisions\/2389"}],"wp:attachment":[{"href":"https:\/\/indus.srru.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}