{"id":6465,"date":"2025-08-21T15:44:20","date_gmt":"2025-08-21T08:44:20","guid":{"rendered":"https:\/\/sport.mcu.ac.th\/?page_id=6465"},"modified":"2025-09-17T11:31:20","modified_gmt":"2025-09-17T04:31:20","slug":"%e0%b8%95%e0%b8%b2%e0%b8%a3%e0%b8%b2%e0%b8%87%e0%b8%a3%e0%b8%b2%e0%b8%a2%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%9c%e0%b8%a5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%81%e0%b8%82%e0%b9%88%e0%b8%87%e0%b8%82%e0%b8%b1-2","status":"publish","type":"page","link":"https:\/\/sport.mcu.ac.th\/?page_id=6465","title":{"rendered":"\u0e15\u0e32\u0e23\u0e32\u0e07\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19\u0e01\u0e35\u0e2c\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e1a\u0e49\u0e32\u0e19 \u0e21\u0e2b\u0e32\u0e08\u0e38\u0e2c\u0e32\u0e25\u0e33\u0e1e\u0e39\u0e19\u0e40\u0e01\u0e21\u0e2a\u0e4c \u0e04\u0e23\u0e31\u0e49\u0e07\u0e17\u0e35\u0e48 16"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"th\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\u0e15\u0e32\u0e23\u0e32\u0e07\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19\u0e01\u0e35\u0e2c\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e1a\u0e49\u0e32\u0e19 \u0e21\u0e2b\u0e32\u0e08\u0e38\u0e2c\u0e32\u0e25\u0e33\u0e1e\u0e39\u0e19\u0e40\u0e01\u0e21\u0e2a\u0e4c \u0e04\u0e23\u0e31\u0e49\u0e07\u0e17\u0e35\u0e48 16<\/title>\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin>\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Prompt:wght@400;500;700&#038;display=swap\" rel=\"stylesheet\">\n    <style>\n        :root {\n            --border-radius: 20px;\n            --box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);\n        }\n\n        body {\n            font-family: 'Prompt', sans-serif;\n            margin: 0;\n            padding: 20px;\n            color: #333;\n            background-color: #4158D0;\n            background-image: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);\n            background-attachment: fixed;\n        }\n\n        .container {\n            max-width: 1200px;\n            margin: auto;\n            padding: 20px;\n        }\n\n        header {\n            display: flex;\n            align-items: center;\n            justify-content: space-between;\n            flex-wrap: wrap;\n            gap: 20px;\n            margin-bottom: 30px;\n            color: white;\n            text-shadow: 0 2px 4px rgba(0,0,0,0.2);\n        }\n\n        .header-title {\n            display: flex;\n            align-items: center;\n            gap: 15px;\n        }\n\n        .header-title img {\n            width: 80px;\n            height: 80px;\n            border-radius: 50%;\n            background-color: rgba(255, 255, 255, 0.25);\n            padding: 5px;\n        }\n\n        .header-title h1 {\n            font-size: 1.8em;\n            margin: 0;\n        }\n        \n        .search-container {\n            position: relative;\n        }\n        \n        .search-box {\n            width: 100%;\n            max-width: 300px;\n            padding: 10px 15px;\n            border-radius: var(--border-radius);\n            border: 1px solid rgba(255, 255, 255, 0.5);\n            background: rgba(255, 255, 255, 0.2);\n            font-family: 'Prompt', sans-serif;\n            font-size: 1em;\n            color: white;\n            outline: none;\n        }\n        \n        .search-box::placeholder {\n            color: rgba(255, 255, 255, 0.8);\n        }\n\n        .dashboard {\n            \/* Keep the original dashboard style for the container box *\/\n            background: rgba(255, 255, 255, 0.25);\n            backdrop-filter: blur(10px);\n            -webkit-backdrop-filter: blur(10px);\n            border-radius: var(--border-radius);\n            border: 1px solid rgba(255, 255, 255, 0.18);\n            box-shadow: var(--box-shadow);\n            padding: 20px;\n            overflow-x: auto; \/* For responsive table *\/\n        }\n        \n        \/* \u2705 New and improved table styling \n        The table will now have a solid white background, making it stand out and easy to read.\n        *\/\n        table {\n            width: 100%;\n            border-collapse: collapse;\n            text-align: left;\n            background-color: white; \/* \ud83d\udc48 Set a solid white background for the table *\/\n            border-radius: 15px; \/* Add some rounding to the table edges *\/\n            overflow: hidden; \/* Ensures the border-radius is applied correctly *\/\n        }\n\n        th, td {\n            padding: 12px 15px;\n            color: #333; \/* Ensure text is dark and readable on the white background *\/\n        }\n\n        thead {\n            background-color: #e9ecef; \/* A light grey background for the header makes it easy to differentiate *\/\n        }\n        \n        th {\n            font-weight: 700; \/* Bolder font for headers for better visibility *\/\n            color: #1a1a1a;\n        }\n\n        tbody tr {\n            border-bottom: 1px solid #dee2e6; \/* A light grey line between rows *\/\n        }\n        \n        tbody tr:last-child {\n            border-bottom: none;\n        }\n        \n        \/* Style for alternating rows *\/\n        tbody tr:nth-child(even) {\n            background-color: #f8f9fa;\n        }\n\n        .status {\n            padding: 5px 10px;\n            border-radius: 10px;\n            color: white;\n            font-size: 0.9em;\n            text-align: center;\n        }\n        \n        .status.completed { background-color: #28a745; }\n        .status.pending { background-color: #ffc107; color: #333; }\n        .status.live { background-color: #dc3545; }\n\n        footer {\n            text-align: center;\n            margin-top: 40px;\n            padding: 20px;\n            color: white;\n            font-size: 0.9em;\n            background: rgba(0, 0, 0, 0.1);\n            border-radius: var(--border-radius);\n            box-shadow: var(--box-shadow);\n        }\n\n        \/* Responsive Styles *\/\n        @media (max-width: 768px) {\n            .header-title h1 {\n                font-size: 1.2em;\n            }\n            .header-title img {\n                width: 60px;\n                height: 60px;\n            }\n            .search-box {\n                max-width: 100%;\n            }\n            header {\n                flex-direction: column;\n                align-items: flex-start;\n            }\n        }\n    <\/style>\n<\/head>\n<body>\n\n    <div class=\"container\">\n        <header>\n            <div class=\"header-title\">\n                <img decoding=\"async\" src=\"https:\/\/sport.mcu.ac.th\/wp-content\/uploads\/2025\/04\/%E0%B8%99%E0%B8%B1%E0%B8%99%E0%B8%97%E0%B8%99%E0%B8%B2%E0%B8%81%E0%B8%B2%E0%B8%A3-150x150.png\" alt=\"Logo\">\n                <h1>\u0e15\u0e32\u0e23\u0e32\u0e07\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19\u0e01\u0e35\u0e2c\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e1a\u0e49\u0e32\u0e19<br>\u0e21\u0e2b\u0e32\u0e08\u0e38\u0e2c\u0e32\u0e25\u0e33\u0e1e\u0e39\u0e19\u0e40\u0e01\u0e21\u0e2a\u0e4c \u0e04\u0e23\u0e31\u0e49\u0e07\u0e17\u0e35\u0e48 16<\/h1>\n            <\/div>\n            <div class=\"search-container\">\n                <input type=\"text\" id=\"searchInput\" onkeyup=\"searchTable()\" class=\"search-box\" placeholder=\"\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e01\u0e32\u0e23\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19...\">\n            <\/div>\n        <\/header>\n\n        <main class=\"dashboard\">\n            <table id=\"resultsTable\">\n                <thead>\n                    <tr>\n                        <th>\u0e27\u0e31\u0e19\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19<\/th>\n                        <th>\u0e40\u0e27\u0e25\u0e32<\/th>\n                        <th>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17<\/th>\n                        <th>\ud83e\udd47 \u0e2d\u0e31\u0e19\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48 1<\/th>\n                        <th>\ud83e\udd48 \u0e2d\u0e31\u0e19\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48 2<\/th>\n                        <th>\ud83e\udd49 \u0e2d\u0e31\u0e19\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48 3<\/th>\n                        <th>\u0e2a\u0e16\u0e32\u0e19\u0e30<\/th>\n                    <\/tr>\n                <\/thead>\n                <tbody>\n                    <tr>\n                        <td colspan=\"7\" style=\"text-align:center;\">\u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25&#8230;<\/td>\n                    <\/tr>\n                <\/tbody>\n            <\/table>\n        <\/main>\n\n        <footer>\n            <p>\u0e42\u0e04\u0e23\u0e07\u0e01\u0e32\u0e23\u0e2a\u0e48\u0e07\u0e40\u0e2a\u0e23\u0e34\u0e21\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e\u0e41\u0e25\u0e30\u0e28\u0e31\u0e01\u0e22\u0e20\u0e32\u0e1e\u0e01\u0e32\u0e23\u0e1b\u0e0f\u0e34\u0e1a\u0e31\u0e15\u0e34\u0e07\u0e32\u0e19<br>\u0e02\u0e2d\u0e07\u0e1a\u0e38\u0e04\u0e25\u0e32\u0e01\u0e23\u0e1d\u0e48\u0e32\u0e22\u0e04\u0e24\u0e2b\u0e31\u0e2a\u0e16\u0e4c \u0e21\u0e2b\u0e32\u0e27\u0e34\u0e17\u0e22\u0e32\u0e25\u0e31\u0e22\u0e21\u0e2b\u0e32\u0e08\u0e38\u0e2c\u0e32\u0e25\u0e07\u0e01\u0e23\u0e13\u0e23\u0e32\u0e0a\u0e27\u0e34\u0e17\u0e22\u0e32\u0e25\u0e31\u0e22 \u0e04\u0e23\u0e31\u0e49\u0e07\u0e17\u0e35\u0e48 16<\/p>\n        <\/footer>\n    <\/div>\n    \n    <script>\n        \/\/ Fetch data from Google Apps Script Web App\n        const webAppUrl = 'https:\/\/script.google.com\/macros\/s\/AKfycbxjMoos8d8FwtFhUCo_4NDxoWwUPNI4Vx_5JHbtsSqAcq1zlMuRDGKsDP_M_mhzmkAI\/exec'; \/\/ <-- \u2757\ufe0f \u0e43\u0e2a\u0e48 URL \u0e02\u0e2d\u0e07 Web App \u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 Apps Script \u0e15\u0e23\u0e07\u0e19\u0e35\u0e49\n\n        fetch(webAppUrl)\n            .then(response => response.json())\n            .then(data => {\n                const tableBody = document.querySelector(\"#resultsTable tbody\");\n                tableBody.innerHTML = \"\"; \/\/ Clear loading message\n                data.forEach(row => {\n                    \/\/ Skip header row if it's included\n                    if (row[0] === '\u0e27\u0e31\u0e19\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19') return;\n\n                    let statusClass = '';\n                    let statusText = row[6] || ''; \/\/ Status is in the 7th column (index 6)\n                    if (statusText.toLowerCase().includes('\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e2a\u0e34\u0e49\u0e19')) {\n                        statusClass = 'completed';\n                    } else if (statusText.toLowerCase().includes('\u0e01\u0e33\u0e25\u0e31\u0e07\u0e41\u0e02\u0e48\u0e07')) {\n                        statusClass = 'live';\n                    } else {\n                        statusClass = 'pending';\n                    }\n\n                    const newRow = `<tr>\n                        <td>${row[0]}<\/td>\n                        <td>${row[1]}<\/td>\n                        <td>${row[2]}<\/td>\n                        <td>${row[3]}<\/td>\n                        <td>${row[4]}<\/td>\n                        <td>${row[5]}<\/td>\n                        <td><span class=\"status ${statusClass}\">${statusText}<\/span><\/td>\n                    <\/tr>`;\n                    tableBody.innerHTML += newRow;\n                });\n            })\n            .catch(error => {\n                console.error('Error fetching data:', error);\n                const tableBody = document.querySelector(\"#resultsTable tbody\");\n                tableBody.innerHTML = '<tr><td colspan=\"7\" style=\"text-align:center; color: red;\">\u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14\u0e43\u0e19\u0e01\u0e32\u0e23\u0e42\u0e2b\u0e25\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25<\/td><\/tr>';\n            });\n\n        \/\/ Search Function\n        function searchTable() {\n            const input = document.getElementById(\"searchInput\");\n            const filter = input.value.toUpperCase();\n            const table = document.getElementById(\"resultsTable\");\n            const tr = table.getElementsByTagName(\"tr\");\n\n            for (let i = 1; i < tr.length; i++) { \/\/ Start from 1 to skip header row\n                let td = tr[i].getElementsByTagName(\"td\")[2]; \/\/ Column for '\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17' is at index 2\n                if (td) {\n                    let txtValue = td.textContent || td.innerText;\n                    if (txtValue.toUpperCase().indexOf(filter) > -1) {\n                        tr[i].style.display = \"\";\n                    } else {\n                        tr[i].style.display = \"none\";\n                    }\n                }\n            }\n        }\n    <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\u0e15\u0e32\u0e23\u0e32\u0e07\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e41\u0e02\u0e48\u0e07\u0e02\u0e31\u0e19\u0e01\u0e35\u0e2c\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e1a\u0e49\u0e32\u0e19 \u0e21\u0e2b\u0e32\u0e08\u0e38\u0e2c\u0e32\u0e25\u0e33\u0e1e\u0e39\u0e19\u0e40\u0e01\u0e21\u0e2a\u0e4c \u0e04 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"_links":{"self":[{"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/6465"}],"collection":[{"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6465"}],"version-history":[{"count":4,"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/6465\/revisions"}],"predecessor-version":[{"id":6927,"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=\/wp\/v2\/pages\/6465\/revisions\/6927"}],"wp:attachment":[{"href":"https:\/\/sport.mcu.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}