{"id":8624,"date":"2026-01-19T16:03:48","date_gmt":"2026-01-19T13:03:48","guid":{"rendered":"https:\/\/1.cbm.ua\/?page_id=8624"},"modified":"2026-01-19T17:10:06","modified_gmt":"2026-01-19T14:10:06","slug":"___-%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b0%d0%b2%d1%82%d0%be%d0%bc%d0%b0%d1%82%d0%b8%d1%87%d0%b5%d1%81%d0%ba%d0%b8-%d1%81%d1%82%d0%b0%d1%82%d0%b5%d1%82%d1%8c-%d1%81-%d1%82%d0%b5%d0%ba","status":"publish","type":"page","link":"https:\/\/1.cbm.ua\/?page_id=8624","title":{"rendered":"___ \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u0442\u0435\u0442\u044c \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0447\u0438\u0442\u0430\u043b\u043a\u0438 \u0433\u0443\u0433\u043b."},"content":{"rendered":"\n    <style>\n        * { box-sizing: border-box; }\n        body { \n            font-family: system-ui, sans-serif; \n            max-width: 600px; \n            margin: 0 auto; \n            padding: 20px;\n            background: #f5f5f5;\n        }\n        input, textarea, button, select {\n            width: 100%;\n            padding: 12px;\n            margin-bottom: 15px;\n            border: 1px solid #ddd;\n            border-radius: 8px;\n            font-size: 16px;\n        }\n        textarea { min-height: 200px; resize: vertical; }\n        button {\n            background: #0073aa;\n            color: white;\n            border: none;\n            cursor: pointer;\n            font-weight: bold;\n        }\n        button:disabled { background: #ccc; }\n        .status { padding: 10px; border-radius: 8px; margin-top: 10px; }\n        .success { background: #d4edda; color: #155724; }\n        .error { background: #f8d7da; color: #721c24; }\n    <\/style>\n\n    <h2>\ud83d\udcdd \u041d\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/h2>\n\n    <input type=\"text\" id=\"cbm_post_title\" placeholder=\"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\">\n\n    <textarea id=\"cbm_post_content\" placeholder=\"\u0422\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 (\u043c\u043e\u0436\u043d\u043e HTML)\"><\/textarea>\n\n    <select id=\"cbm_post_status\">\n        <option value=\"draft\">\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a<\/option>\n        <option value=\"publish\">\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443<\/option>\n    <\/select>\n\n    <button id=\"cbm_post_submit\">\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c<\/button>\n\n    <div id=\"cbm_post_result\"><\/div>\n\n    <script>\n        \/\/ === \u041d\u0410\u0421\u0422\u0420\u041e\u0419\u041a\u0418 ===\n        const CONFIG = {\n            siteUrl: 'https:\/\/1.cbm.ua',  \/\/ \u0431\u0435\u0437 \u0441\u043b\u0435\u0448\u0430 \u0432 \u043a\u043e\u043d\u0446\u0435\n            username: 'user_JS_entries',\n            appPassword: 'zWDx 78Pr DAhD ToWu nGmq fPhe' \/\/ Application Password\n        };\n\n        document.getElementById('cbm_post_submit').addEventListener('click', async () => {\n            const btn = document.getElementById('cbm_post_submit');\n            const result = document.getElementById('cbm_post_result');\n\n            const title = document.getElementById('cbm_post_title').value.trim();\n            const content = document.getElementById('cbm_post_content').value.trim();\n            const status = document.getElementById('cbm_post_status').value;\n            \n            if (!title || !content) {\n                result.className = 'status error';\n                result.textContent = '\u0417\u0430\u043f\u043e\u043b\u043d\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0442\u0435\u043a\u0441\u0442';\n                return;\n            }\n            \n            btn.disabled = true;\n            btn.textContent = '\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430...';\n            result.textContent = '';\n            \n            try {\n                \/\/ const response = await fetch(`${CONFIG.siteUrl}\/wp-json\/wp\/v2\/posts`, {\n                const response = await fetch(`${CONFIG.siteUrl}\/?rest_route=\/wp\/v2\/posts`, {\n\n                    method: 'POST',\n                    headers: {\n                        'Content-Type': 'application\/json',\n                        'Authorization': 'Basic ' + btoa(`${CONFIG.username}:${CONFIG.appPassword}`)\n                    },\n                    body: JSON.stringify({\n                        title: title,\n                        content: content,\n                        status: status\n                    })\n                });\n                \n                const data = await response.json();\n                \n                if (response.ok) {\n                    result.className = 'status success';\n                    result.innerHTML = `\u2705 \u0413\u043e\u0442\u043e\u0432\u043e! <a href=\"${data.link}\" target=\"_blank\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c<\/a>`;\n                    document.getElementById('cbm_post_title').value = '';\n                    document.getElementById('cbm_post_content').value = '';\n                } else {\n                    throw new Error(data.message || '\u041e\u0448\u0438\u0431\u043a\u0430 API');\n                }\n            } catch (err) {\n                result.className = 'status error';\n                result.textContent = '\u274c ' + err.message;\n            }\n            \n            btn.disabled = false;\n            btn.textContent = '\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c';\n        });\n    <\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udcdd \u041d\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"class_list":["post-8624","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/pages\/8624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8624"}],"version-history":[{"count":6,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/pages\/8624\/revisions"}],"predecessor-version":[{"id":8636,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/pages\/8624\/revisions\/8636"}],"wp:attachment":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}