{"id":33,"date":"2026-01-29T14:23:00","date_gmt":"2026-01-29T14:23:00","guid":{"rendered":"https:\/\/jsyoo.dothome.co.kr\/?page_id=33"},"modified":"2026-03-04T01:05:42","modified_gmt":"2026-03-04T01:05:42","slug":"33-2","status":"publish","type":"page","link":"https:\/\/jsyoo.pe.kr\/?page_id=33","title":{"rendered":"\ubaa9\uc7a5\ubcf4\uace0\uc11c \uc81c\ucd9c"},"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 \uc81c\ucd9c<\/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            margin: 0; padding: 60px 20px; \n            background-color: #f0f2f5; \n            display: flex; justify-content: center;\n        }\n        .container { \n            width: 100%; \n            max-width: 1600px; \/* \ud655\uc778 \ud398\uc774\uc9c0\uc640 \ub3d9\uc77c\ud558\uac8c 1200px\ub85c \ud655\uc7a5 *\/\n            background: white; \n            padding: 50px; \n            border-radius: 16px; \n            box-shadow: 0 10px 30px rgba(0,0,0,0.05);\n            box-sizing: border-box;\n        }\n        h2 { text-align: center; color: #1a1a1a; margin-bottom: 10px; font-size: 32px; }\n        .date-badge { \n            text-align: center; margin-bottom: 40px; color: #28a745; \n            font-weight: bold; font-size: 1.2em; background: #eaf6ec;\n            display: inline-block; padding: 8px 20px; border-radius: 30px;\n            position: relative; left: 50%; transform: translateX(-50%);\n        }\n        \n        \/* \uadf8\ub9ac\ub4dc \ub808\uc774\uc544\uc6c3 (PC 2\uc5f4) *\/\n        .form-grid {\n            display: grid;\n            grid-template-columns: 1fr 1fr;\n            gap: 25px;\n        }\n        .form-group { margin-bottom: 10px; }\n        .full-width { grid-column: span 2; }\n\n        label { display: block; font-weight: 600; margin-bottom: 10px; color: #333; font-size: 16px; }\n        input, textarea { \n            width: 100%; padding: 14px; \n            box-sizing: border-box; border: 1px solid #e1e1e1; border-radius: 10px; \n            font-size: 16px; transition: all 0.2s ease;\n            background-color: #fafafa;\n        }\n        input:focus, textarea:focus { \n            border-color: #28a745; outline: none; background-color: #fff;\n            box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);\n        }\n        textarea { height: 140px; resize: vertical; }\n\n        button { \n            width: 100%; max-width: 400px; padding: 18px; \n            background: #28a745; color: white; border: none; border-radius: 10px; \n            cursor: pointer; font-size: 20px; font-weight: bold; \n            margin: 40px auto 0; display: block;\n            transition: all 0.3s;\n        }\n        button:hover { background: #218838; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3); }\n        button:disabled { background: #ccc; cursor: not-allowed; }\n\n        \/* \ubaa8\ubc14\uc77c \ub300\uc751 *\/\n        @media (max-width: 850px) {\n            .form-grid { grid-template-columns: 1fr; }\n            .full-width { grid-column: span 1; }\n            .container { padding: 30px 20px; }\n            h2 { font-size: 24px; }\n        }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"container\">\n        <h2>\ud83d\udccb \ubaa9\uc7a5\ubcf4\uace0\uc11c \uc791\uc131<\/h2>\n        <div class=\"date-badge\" id=\"baseDateDisplay\">\ubcf4\uace0 \uae30\uc900\uc77c \uacc4\uc0b0 \uc911&#8230;<\/div>\n\n        <form id=\"reportForm\">\n            <input type=\"hidden\" id=\"report_date\">\n            \n            <div class=\"form-grid\">\n                <div class=\"form-group\">\n                    <label>\ubaa9\uc7a5 (\uc22b\uc790\ub9cc \uc785\ub825)<\/label>\n                    <input type=\"number\" id=\"ranch_number\" placeholder=\"\uc608: 1\" required>\n                <\/div>\n                <div class=\"form-group\">\n                    <label>\uc791\uc131\uc790 \uc774\ub984<\/label>\n                    <input type=\"text\" id=\"name\" placeholder=\"\uc791\uc131\uc790 \uc131\ud568\uc744 \uc785\ub825\ud558\uc138\uc694\" required>\n                <\/div>\n                <div class=\"form-group\">\n                    <label>\uc8fc\uc77c\uc608\ubc30 \ucc38\uc11d\uc790<\/label>\n                    <input type=\"text\" id=\"attendance_worship\" placeholder=\"\ucc38\uc11d\uc790 \uba85\ub2e8\uc744 \uc785\ub825\ud558\uc138\uc694\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label>\ubaa9\uc7a5\ubaa8\uc784 \ucc38\uc11d\uc790<\/label>\n                    <input type=\"text\" id=\"attendance_meeting\" placeholder=\"\ucc38\uc11d\uc790 \uba85\ub2e8\uc744 \uc785\ub825\ud558\uc138\uc694\">\n                <\/div>\n\n                <div class=\"form-group full-width\">\n                    <label>\uc8fc\uc77c\uc608\ubc30 \uacb0\uc11d\uc790 \ubc0f \uc0ac\uc720<\/label>\n                    <textarea id=\"absence_reason\" placeholder=\"\uacb0\uc11d \uc778\uc6d0 \ubc0f \uad6c\uccb4\uc801\uc778 \uc0ac\uc720\ub97c \uc801\uc5b4\uc8fc\uc138\uc694\"><\/textarea>\n                <\/div>\n                <div class=\"form-group full-width\">\n                    <label>\ubaa9\uc7a5\ubaa8\uc784 \ub0b4\uc6a9<\/label>\n                    <textarea id=\"meeting_content\" placeholder=\"\ub098\ub208 \ub300\ud654\ub098 \ubaa8\uc784 \ub0b4\uc6a9\uc744 \uc694\uc57d\ud574 \uc8fc\uc138\uc694\"><\/textarea>\n                <\/div>\n                <div class=\"form-group full-width\">\n                    <label>\uae30\ub3c4\uc81c\ubaa9 \ubc0f \ud2b9\uc774\uc0ac\ud56d<\/label>\n                    <textarea id=\"prayer_requests\" placeholder=\"\ud568\uaed8 \uae30\ub3c4\ud560 \uc81c\ubaa9\uc774\ub098 \uacf5\uc720\ud560 \uc0ac\ud56d\uc744 \uc801\uc5b4\uc8fc\uc138\uc694\"><\/textarea>\n                <\/div>\n            <\/div>\n            \n            <button type=\"submit\" id=\"submitBtn\">\ubcf4\uace0\uc11c \uc81c\ucd9c\ud558\uae30<\/button>\n        <\/form>\n    <\/div>\n\n    <script>\n        \/\/ \uae30\uc900\uc77c \uacc4\uc0b0 (\uc77c\uc694\uc77c 00:00 ~ \ud1a0\uc694\uc77c 23:59)\n        function setBaseDate() {\n            const now = new Date();\n            const day = now.getDay();\n            const sunday = new Date(now);\n            sunday.setDate(now.getDate() - day);\n            \n            const y = sunday.getFullYear();\n            const m = String(sunday.getMonth() + 1).padStart(2, '0');\n            const d = String(sunday.getDate()).padStart(2, '0');\n            \n            const formattedDate = `${y}-${m}-${d}`;\n            document.getElementById('baseDateDisplay').innerText = `\ubcf4\uace0 \uae30\uc900\uc77c: ${y}\ub144 ${m}\uc6d4 ${d}\uc77c (\uc8fc\uc77c)`;\n            document.getElementById('report_date').value = formattedDate;\n        }\n\n        setBaseDate();\n\n        \/\/ 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        const form = document.getElementById('reportForm');\n        const btn = document.getElementById('submitBtn');\n\n        form.addEventListener('submit', async (e) => {\n            e.preventDefault();\n            btn.disabled = true;\n            btn.innerText = \"\uc81c\ucd9c \uc911\uc785\ub2c8\ub2e4...\";\n\n            const data = {\n                report_date: document.getElementById('report_date').value,\n                ranch_number: parseInt(document.getElementById('ranch_number').value),\n                name: document.getElementById('name').value,\n                attendance_worship: document.getElementById('attendance_worship').value,\n                absence_reason: document.getElementById('absence_reason').value,\n                attendance_meeting: document.getElementById('attendance_meeting').value,\n                meeting_content: document.getElementById('meeting_content').value,\n                prayer_requests: document.getElementById('prayer_requests').value\n            };\n\n            try {\n                const { error } = await _supabase.from('ranch_reports').insert([data]);\n                if (error) throw error;\n                alert('\u2705 \ubcf4\uace0\uc11c\uac00 \uc131\uacf5\uc801\uc73c\ub85c \uc81c\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4!');\n                form.reset();\n                setBaseDate();\n            } catch (error) {\n                alert('\u274c \uc81c\ucd9c \uc2e4\ud328: ' + error.message);\n            } finally {\n                btn.disabled = false;\n                btn.innerText = \"\ubcf4\uace0\uc11c \uc81c\ucd9c\ud558\uae30\";\n            }\n        });\n    <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>\ubaa9\uc7a5\ubcf4\uace0\uc11c \uc81c\ucd9c \ud83d\udccb \ubaa9\uc7a5\ubcf4\uace0\uc11c \uc791\uc131 \ubcf4\uace0 \uae30\uc900\uc77c \uacc4\uc0b0 \uc911&#8230; \ubaa9\uc7a5 (\uc22b\uc790\ub9cc \uc785\ub825) \uc791\uc131\uc790 \uc774\ub984 \uc8fc\uc77c\uc608\ubc30 \ucc38\uc11d\uc790 \ubaa9\uc7a5\ubaa8\uc784 \ucc38\uc11d\uc790 \uc8fc\uc77c\uc608\ubc30 \uacb0\uc11d\uc790 \ubc0f \uc0ac\uc720 \ubaa9\uc7a5\ubaa8\uc784 \ub0b4\uc6a9 \uae30\ub3c4\uc81c\ubaa9 \ubc0f \ud2b9\uc774\uc0ac\ud56d \ubcf4\uace0\uc11c \uc81c\ucd9c\ud558\uae30<\/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-33","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages\/33","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=33"}],"version-history":[{"count":1,"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages\/33\/revisions"}],"predecessor-version":[{"id":93,"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=\/wp\/v2\/pages\/33\/revisions\/93"}],"wp:attachment":[{"href":"https:\/\/jsyoo.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}