{"id":35,"date":"2026-01-29T14:23:31","date_gmt":"2026-01-29T14:23:31","guid":{"rendered":"https:\/\/jsyoo.dothome.co.kr\/?page_id=35"},"modified":"2026-03-03T11:19:27","modified_gmt":"2026-03-03T11:19:27","slug":"35-2","status":"publish","type":"page","link":"https:\/\/jsyoo.pe.kr\/?page_id=35","title":{"rendered":"\ubaa9\uc7a5\ubcf4\uace0\uc11c \ud655\uc778"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"ko\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\ubaa9\uc7a5\ubcf4\uace0\uc11c \ud655\uc778 (\ubcf4\uc548)<\/title>\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@supabase\/supabase-js@2\"><\/script>\n    <style>\n        body { \n            font-family: 'Pretendard', 'Malgun Gothic', sans-serif; \n            padding: 40px; background-color: #f8f9fa; margin: 0;\n            display: none; \/* \uc554\ud638 \ud655\uc778 \uc804\uae4c\uc9c0 \ud654\uba74 \uc228\uae40 *\/\n        }\n        .container {\n            max-width: 100%; margin: 0 auto; background: white;\n            padding: 15px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);\n        }\n        h2 { text-align: center; color: #333; margin-bottom: 30px; }\n        .table-wrapper { overflow-x: auto; }\n        table { width: 100%; border-collapse: collapse; min-width: 900px; \/* \uc804\uccb4 \ub108\ube44 \uc0b4\uc9dd \ucd95\uc18c *\/ }\n        th, td { border-bottom: 1px solid #eee; padding: 15px; text-align: left; font-size: 14px; line-height: 1.5; }\n        th { background-color: #28a745; color: white; font-weight: 600; position: sticky; top: 0; }\n        tr:hover { background-color: #f1f8f1; }\n        \n        .col-base-date { width: 110px; color: #28a745; font-weight: bold; }\n        \n        \/* \uc774\ub984 \uce78: \ud55c \uc0ac\ub78c \uc774\ub984 \ud655\ubcf4 \ubc0f \uc904\ubc14\uafc8 \ubc29\uc9c0 *\/\n        .col-name { min-width: 60px; white-space: nowrap; }\n        \n        \/* \uc608\ubc30\ucc38\uc11d \uce78: \ub450 \uc0ac\ub78c \uc774\ub984 \ud655\ubcf4 \ubc0f \uc904\ubc14\uafc8 \ubc29\uc9c0 *\/\n        .col-attendance { min-width: 110px; white-space: nowrap; }\n        \n        .loading { text-align: center; padding: 40px; color: #888; }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"container\">\n        <h2>\ud83d\udd0d \uc81c\ucd9c\ub41c \ubaa9\uc7a5\ubcf4\uace0\uc11c \ubaa9\ub85d (\uad00\ub9ac\uc790 \uc804\uc6a9)<\/h2>\n        <div class=\"table-wrapper\" id=\"reportList\">\n            <div class=\"loading\">\ub370\uc774\ud130\ub97c \ubd88\ub7ec\uc624\ub294 \uc911\uc785\ub2c8\ub2e4&#8230;<\/div>\n        <\/div>\n    <\/div>\n\n    <script>\n        \/\/ --- 1. \uc554\ud638 \ubcf4\uc548 \ub85c\uc9c1 ---\n        const ADMIN_PASSWORD = \"4480\";\n        \n        function checkAccess() {\n            const password = prompt(\"\uad00\ub9ac\uc790 \uc554\ud638\ub97c \uc785\ub825\ud558\uc138\uc694.\");\n            \n            if (password === ADMIN_PASSWORD) {\n                document.body.style.display = \"block\";\n                fetchReports();\n            } else {\n                alert(\"\uc554\ud638\uac00 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uc791\uc131 \ud398\uc774\uc9c0\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.\");\n                window.location.href = \"\/?page_id=33\"; \n            }\n        }\n\n        \/\/ --- 2. Supabase \uc124\uc815 ---\n        const SUPABASE_URL = 'https:\/\/nsbvvlqhsbxsijnkoptt.supabase.co';\n        const SUPABASE_KEY = 'sb_publishable_0DOuDe6uf2GauME5bWsjoA_X0cbN3d2';\n        const _supabase = supabase.createClient(SUPABASE_URL, SUPABASE_KEY);\n\n        async function fetchReports() {\n            try {\n                const { data, error } = await _supabase\n                    .from('ranch_reports')\n                    .select('*')\n                    .order('report_date', { ascending: false })\n                    .order('created_at', { ascending: false });\n\n                if (error) throw error;\n\n                if (!data || data.length === 0) {\n                    document.getElementById('reportList').innerHTML = '<div class=\"loading\">\uc81c\ucd9c\ub41c \ubcf4\uace0\uc11c\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.<\/div>';\n                    return;\n                }\n\n                let html = `<table>\n                    <thead>\n                        <tr>\n                            <th class=\"col-base-date\">\ubcf4\uace0 \uae30\uc900\uc77c<\/th>\n                            <th class=\"col-num\">\ubaa9\uc7a5<\/th>\n                            <th class=\"col-name\">\uc774\ub984<\/th>\n                            <th class=\"col-attendance\">\uc608\ubc30\ucc38\uc11d<\/th>\n                            <th>\uacb0\uc11d\uc0ac\uc720<\/th>\n                            <th>\ubaa8\uc784\ub0b4\uc6a9<\/th>\n                            <th>\uae30\ub3c4\uc81c\ubaa9<\/th>\n                        <\/tr>\n                    <\/thead>\n                    <tbody>`;\n                \n                data.forEach(r => {\n                    const baseDate = r.report_date || '\ubbf8\uc9c0\uc815';\n\n                    html += `<tr>\n                        <td class=\"col-base-date\">${baseDate}<\/td>\n                        <td><b>${r.ranch_number}<\/b><\/td>\n                        <td class=\"col-name\">${r.name}<\/td>\n                        <td class=\"col-attendance\">${r.attendance_worship || '-'}<\/td>\n                        <td>${r.absence_reason || '-'}<\/td>\n                        <td>${r.meeting_content || '-'}<\/td>\n                        <td>${r.prayer_requests || '-'}<\/td>\n                    <\/tr>`;\n                });\n                \n                html += '<\/tbody><\/table>';\n                document.getElementById('reportList').innerHTML = html;\n\n            } catch (error) {\n                document.getElementById('reportList').innerHTML = \n                    '<div class=\"loading\" style=\"color:red;\">\ub370\uc774\ud130 \ub85c\ub4dc \uc2e4\ud328: ' + error.message + '<\/div>';\n            }\n        }\n\n        \/\/ \uc989\uc2dc \uc554\ud638 \uccb4\ud06c \uc2e4\ud589\n        checkAccess();\n    <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\ubaa9\uc7a5\ubcf4\uace0\uc11c \ud655\uc778 (\ubcf4\uc548) \ud83d\udd0d \uc81c\ucd9c\ub41c \ubaa9\uc7a5\ubcf4\uace0\uc11c \ubaa9\ub85d (\uad00\ub9ac\uc790 \uc804\uc6a9) \ub370\uc774\ud130\ub97c \ubd88\ub7ec\uc624\ub294 \uc911\uc785\ub2c8\ub2e4&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-35","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":1,"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages\/35\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages\/35\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}