{"id":1566,"date":"2026-01-27T21:45:07","date_gmt":"2026-01-27T21:45:07","guid":{"rendered":"https:\/\/medibridge.kr\/?page_id=1566"},"modified":"2026-03-19T02:48:24","modified_gmt":"2026-03-19T02:48:24","slug":"ptp_write","status":"publish","type":"page","link":"https:\/\/medibridge.kr\/eng\/ptp_write\/","title":{"rendered":"Write"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"1566\" class=\"elementor elementor-1566\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3fd6cf0 e-flex e-con-boxed e-con e-parent\" data-id=\"3fd6cf0\" data-element_type=\"container\" data-settings=\"{&quot;animation&quot;:&quot;none&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-aed6fd3 animated-fast elementor-invisible elementor-widget elementor-widget-heading\" data-id=\"aed6fd3\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeInDown&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Register your product!<\/h2>\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-bcade88 e-con-full animated-fast e-flex elementor-invisible e-con e-child\" data-id=\"bcade88\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;,&quot;animation&quot;:&quot;fadeIn&quot;,&quot;animation_delay&quot;:700}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-694cc14 elementor-widget__width-initial elementor-widget elementor-widget-html\" data-id=\"694cc14\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div class=\"custom-product-form-container\" style=\"max-width: 88%; margin: 0 auto;\">\r\n\r\n<form method=\"post\" enctype=\"multipart\/form-data\" id=\"product-upload-form\" action=\"\">\r\n    <input type=\"hidden\" name=\"action\" value=\"handle_product_form\">\r\n\r\n    <!-- 1. \uc0c1\ud488 \uc81c\ubaa9 -->\r\n    <div class=\"form-group\" style=\"margin-bottom: 30px;\">\r\n        <label style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">Product Title<\/label>\r\n        <input type=\"text\" name=\"product_title\" required\r\n placeholder=\"Please enter the product name\"\r\n>\r\n    <\/div>\r\n\r\n        <!-- \u2705 3\uc5f4 1\ud589 \ubc30\uce58 (\uc7a5\ube44\ubd84\ub958 & \uc138\ubd80\ubd84\ub958 & \uc81c\ud488 \uc0c1\ud0dc) -->\r\n        <div style=\"display: flex; gap: 20px; margin-bottom: 20px;\">\r\n            <!-- \uc7a5\ube44\ubd84\ub958 -->\r\n            <div style=\"flex: 1;\">\r\n                <label for=\"product_category\" style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">\uc7a5\ube44\ubd84\ub958 *<\/label>\r\n                <select id=\"product_category\" name=\"product_category\" required style=\"width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\">\r\n                    <option value=\"\" disabled selected>\uc120\ud0dd\ud574\uc8fc\uc138\uc694<\/option>\r\n                    <option value=\"\uc9c4\ub2e8\uc7a5\ube44\">diagnostic equipment<\/option>\r\n                    <option value=\"\ubc29\uc0ac\uc120\uc7a5\ube44\">radiation equipment<\/option>\r\n                    <option value=\"\uce58\ub8cc\uc7a5\ube44\">treatment equipment<\/option>\r\n                    <option value=\"\uc218\uc220\uc7a5\ube44\">surgical equipment<\/option>\r\n                    <option value=\"\uc784\uc0c1\uc7a5\ube44\">clinical equipment<\/option>\r\n                    <option value=\"\ubb3c\ub9ac\uce58\ub8cc\">physical therapy<\/option>\r\n                    <option value=\"\ube44\ub9cc\/\ud53c\ubd80\">Obesity\/Skin<\/option>\r\n                    <option value=\"\ubcd1\uc6d0\uc124\ube44\">hospital equipment<\/option>\r\n                <\/select>\r\n            <\/div>\r\n\r\n            <!-- \uc138\ubd80 \ubd84\ub958 (\ucd08\uae30\uc5d4 \uc228\uae40) -->\r\n            <div style=\"flex: 1; display: none;\" id=\"sub_category_wrapper\">\r\n                <label for=\"sub_category\" style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">\uc138\ubd80 \ubd84\ub958 *<\/label>\r\n                <select id=\"sub_category\" name=\"sub_category\" style=\"width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\">\r\n                    <option value=\"\" disabled selected>\uc0c1\uc704 \uce74\ud14c\uace0\ub9ac\ub97c \uba3c\uc800 \uc120\ud0dd\ud558\uc138\uc694<\/option>\r\n                <\/select>\r\n            <\/div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n            <!-- \uc81c\ud488 \uc0c1\ud0dc -->\r\n            <div style=\"flex: 1;\">\r\n                <label for=\"is_used\" style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">\uc81c\ud488 \uc0c1\ud0dc *<\/label>\r\n                <select id=\"is_used\" name=\"is_used\" required style=\"width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;\">\r\n                    <option value=\"\" disabled selected>\uc120\ud0dd\ud574\uc8fc\uc138\uc694<\/option>\r\n                    <option value=\"0\">Brand new<\/option>\r\n                    <option value=\"1\">\uc911\uace0\uc81c\ud488<\/option>\r\n                    <option value=\"2\">Item transfer<\/option><\/option>\r\n                <\/select>\r\n            <\/div>\r\n        <\/div>\r\n<!-- \uacbd\uace0 \ubb38\uad6c \uc790\ub9ac (\uae30\ubcf8\uc801\uc73c\ub85c\ub294 \uc228\uaca8\uc838 \uc788\uc74c - display: none) -->\r\n<div id=\"transfer-warning\" style=\"display: none; color: #e53e3e; font-size: 13px; margin-top: 8px; margin-bottom: 15px; padding-left: 5px;\">\r\n    \u203b \uc544\uc774\ud15c \uc591\ub3c4\uc591\uc218\uc758 \uacbd\uc6b0, \uad00\ub9ac\uc790\uc758 \uc2ec\uc758\ub97c \uac70\uccd0 \uae00 \uac8c\uc2dc\uac00 \uc644\uc131\ub429\ub2c8\ub2e4.\r\n<\/div>\r\n\r\n    <!-- 2. \uc0c1\ud488 \uac00\uaca9 -->\r\n    <div class=\"form-group\" style=\"margin-bottom: 30px;\">\r\n        <label style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">Price (optional)<\/label>\r\n        <input type=\"text\" name=\"product_price\" \r\n            placeholder=\"Please enter numbers only\"\r\n            oninput=\"this.value = this.value.replace(\/[^0-9]\/g, '').replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, ',');\"\r\n>\r\n    <\/div>\r\n    \r\n\r\n\r\n    <!-- 3. \uc0c1\ud488 \uc124\uba85 -->\r\n    <div class=\"form-group\" style=\"margin-bottom: 30px;\">\r\n        <label style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">Product Description *<\/label>\r\n        <textarea name=\"product_desc\" rows=\"6\" required\r\n placeholder=\"Please enter the content\"\r\n><\/textarea>\r\n    <\/div>\r\n\r\n    <!-- 4. \ud68c\uc0ac\uba85 -->\r\n    <div class=\"form-group\" style=\"margin-bottom: 30px;\">\r\n        <label style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">\ud68c\uc0ac\uba85 (\ub2c9\ub124\uc784) *<\/label>\r\n        <input type=\"text\" name=\"product_nickname\" required\r\n placeholder=\"\ud68c\uc0ac\uba85\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694\"\r\n>\r\n    <\/div>\r\n\r\n    <!-- 5. \uc774\ubbf8\uc9c0 \uc5c5\ub85c\ub4dc (2\uc7a5 \uc81c\ud55c \uc801\uc6a9) -->\r\n    <div class=\"form-group\" style=\"margin-bottom: 40px;\">\r\n        <label style=\"display: block; font-weight: 400; color: #262626; margin-bottom: 12px; font-size: 20px;\">\uc774\ubbf8\uc9c0 * (\ucd5c\ub300 2\uc7a5)<\/label>\r\n\r\n        <div style=\"position: relative; width: 100%;\">\r\n            <!-- \uc2e4\uc81c \ud30c\uc77c input -->\r\n            <input type=\"file\" name=\"product_images[]\" id=\"product_images\" accept=\"image\/*\" multiple\r\n style=\"position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 5;\">\r\n\r\n            <!-- \ub514\uc790\uc778\ub41c \ub77c\ubca8 -->\r\n            <div style=\"width: 100%; padding: 22px; border: 3px dashed #9CA3AF; border-radius: 12px; text-align: center; color: #4a5568; font-size: 17px; background: rgba(255,255,255,0.9);\">\r\n                Select Image (Click or Drag)\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <!-- \ubbf8\ub9ac\ubcf4\uae30 \uc601\uc5ed -->\r\n        <div id=\"image-preview-container\" style=\"margin-top: 20px; display: flex; flex-wrap: wrap; gap: 15px; justify-content: center;\"><\/div>\r\n    <\/div>\r\n\r\n    <!-- 6. \ub4f1\ub85d \ubc84\ud2bc -->\r\n    <div style=\"text-align: center;\">\r\n        <button type=\"submit\"\r\n            style=\"width: 100%; padding: 24px; border: none; border-radius: 12px; background: linear-gradient(135deg, #4299e1, #63b3ed); color: white; font-size: 22px; font-weight: bold; cursor: pointer; box-shadow: 0 10px 25px rgba(66,153,225,0.3); transition: transform 0.2s ease, box-shadow 0.2s ease;\"\r\n            onmouseover=\"this.style.transform='translateY(-2px)'; this.style.boxShadow='0 15px 35px rgba(66,153,225,0.4)';\"\r\n            onmouseout=\"this.style.transform='translateY(0)'; this.style.boxShadow='0 10px 25px rgba(66,153,225,0.3)';\">\r\n            Register a product\r\n        <\/button>\r\n        <div id=\"form-message\" style=\"margin-top: 20px; text-align: center; font-weight: bold; display: none;\"><\/div>\r\n    <\/div>\r\n\r\n<input type=\"hidden\" name=\"trp-form-language\" value=\"eng\"\/><\/form>\r\n<\/div>\r\n\r\n<script>\r\n    \r\n    document.addEventListener('DOMContentLoaded', function() {\r\n    \/\/ \uacbd\uace0 \ubb38\uad6c \uc601\uc5ed\r\n    const warningMsg = document.getElementById('transfer-warning');\r\n    \r\n    \/\/ \uc774\ubca4\ud2b8 \uc704\uc784\uc744 \uc0ac\uc6a9\ud558\uc5ec is_used \uac12\uc774 \ubcc0\ud560 \ub54c\ub9c8\ub2e4 \uac10\uc9c0\r\n    document.addEventListener('change', function(e) {\r\n        if (e.target && e.target.name === 'is_used') {\r\n            \/\/ \uac12\uc774 '2'\uc774\uac70\ub098 '\uc544\uc774\ud15c \uc591\ub3c4\uc591\uc218'\uc77c \ub54c \uacbd\uace0\ubb38\uad6c \ud45c\uc2dc\r\n            if (e.target.value === '2' || e.target.value === '\uc544\uc774\ud15c \uc591\ub3c4\uc591\uc218') {\r\n                warningMsg.style.display = 'block';\r\n            } else {\r\n                \/\/ \uc2e0\ud488\uc774\ub098 \uc911\uace0\ub97c \uc120\ud0dd\ud558\uba74 \uacbd\uace0\ubb38\uad6c \uc228\uae40\r\n                warningMsg.style.display = 'none';\r\n            }\r\n        }\r\n    });\r\n});\r\n    \r\n\/\/ ==========================================\r\n\/\/ [\uc138\ubd80 \uce74\ud14c\uace0\ub9ac \uc5f0\ub3d9 \ub85c\uc9c1 (\ucd94\uac00\ub41c \ubd80\ubd84)]\r\n\/\/ ==========================================\r\nconst subCategories = {\r\n    \"\uc9c4\ub2e8\uc7a5\ube44\": [\"\uace8\ubc00\ub3c4\", \"\uadfc\uc804\ub3c4\", \"\ub0b4\uc2dc\uacbd\", \"\ub1cc\ud608\ub958\uc9c4\ub2e8\uae30\", \"\ub3d9\ub9e5\uacbd\ud654\uc9c4\ub2e8\uae30\", \"\uc2ec\uc804\ub3c4\", \"\uc548\uacfc\uc7a5\ube44\", \"\uc601\uc0c1\uc9c4\ub2e8\uae30\", \"\uc774\ube44\uc778\ud6c4\uacfc\uc7a5\ube44\", \"\uc801\uc678\uc120\uccb4\uc5f4\uc9c4\ub2e8\uae30\", \"\uccb4\uc131\ubd84\ubd84\uc11d\uae30\", \"\ucd08\uc74c\ud30c\uc9c4\ub2e8\uae30\", \"\ud0dc\uc544\uac10\uc2dc\uc7a5\uce58\", \"\ud3d0\uae30\ub2a5\uac80\uc0ac\uae30\", \"\ud658\uc790\uac10\uc2dc\uc7a5\uce58\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\ubc29\uc0ac\uc120\uc7a5\ube44\": [\"\uc790\ub3d9\ud604\uc0c1\uae30\", \"C-ARM\", \"CR\", \"CT\", \"DR\", \"MAMMOGRAM\", \"MRI\", \"X-RAY\", \"X-RAY \uac04\ucd2c\uae30\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\uce58\ub8cc\uc7a5\ube44\": [\"\uc694\uc2e4\uae08\uce58\ub8cc\uae30\", \"\uc804\uae30\uc218\uc220\uae30\", \"\uccb4\uc678\ucda9\uaca9\ud30c\", \"LASER\", \"\ub300\uc7a5\uc138\ucc99\uae30\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\uc218\uc220\uc7a5\ube44\": [\"\uad00\uc808\uacbd\", \"\uac80\uc9c4\ub300\", \"\ub9c8\ucde8\uae30\", \"\ubb34\uc601\ub4f1\", \"\ubcf5\uac15\uacbd\", \"\ubd84\ub9cc\ub300\", \"\uc0b0\uc18c\uacf5\uae09\uc7a5\uce58\", \"\uc218\uc220\ub300\", \"\uc218\uc220\uc6a9\ud604\ubbf8\uacbd\", \"\uc778\uacf5\ud638\ud761\uae30\", \"\ud1a0\ub2c8\ucf13\", \"COBLATOR\", \"LASER(\uc218\uc220\uc6a9)\", \"SUCTION\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\uc784\uc0c1\uc7a5\ube44\": [\"\uba74\uc5ed\ubd84\uc11d\uae30\", \"\ube44\ub1e8\uac80\uc0ac\uae30\", \"\uc2a4\ud2b8\ub808\uc2a4\ubd84\uc11d\uae30\", \"\uc0dd\ud654\ud559\ubd84\uc11d\uae30\", \"\uc694\ubd84\uc11d\uae30\", \"\uc694\uc18d\uce21\uc815\uae30\", \"\uc6d0\uc2ec\ubd84\ub9ac\uae30\", \"\uc790\ub3d9\ud608\uc555\uacc4\", \"\uc804\ud574\uc9c8\ubd84\uc11d\uae30\", \"\ud608\uad6c\ubd84\uc11d\uae30\", \"\ud604\ubbf8\uacbd\", \"\ud65c\uc131\uc0b0\uc18c\ubd84\uc11d\uae30\", \"\ud608\uc561\ub0c9\uc7a5\uace0\", \"\ud608\uc561\ubd84\uc11d\uae30\", \"AUDIOMETER\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\ubb3c\ub9ac\uce58\ub8cc\": [\"\uac04\uc12d\ud30c\uce58\ub8cc\uae30\", \"\uce74\uc774\ub85c\ud504\ub77d\ud2f1 \ud14c\uc774\ube14\", \"\uacac\uc778\uce58\ub8cc\uae30\", \"\uacf5\uae30\uc555\uce58\ub8cc\uae30\", \"\ub864\ub9c1\ubca0\ub4dc\", \"\uc800\uc8fc\ud30c\uce58\ub8cc\uae30\", \"\uc911\uc8fc\ud30c\uce58\ub8cc\uae30\", \"\ucd08\uc74c\ud30c\uce58\ub8cc\uae30\", \"\ud150\uc2a4\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\ube44\ub9cc\/\ud53c\ubd80\": [\"\uace0\uc8fc\ud30c\", \"\ub0c9\ub3d9\uc9c0\ubc29\ubd84\ud574\", \"\uba54\uc870\uac74\", \"\ubc14\uc774\ud0c8\uc774\uc628\", \"\ubcf5\ud569\uc6b4\ub3d9\uae30\", \"\uccb4\uc678\ucda9\uaca9\ud30c\", \"CO2\ub808\uc774\uc838\", \"ER-YAG LASER\", \"\uc2a4\ud2f0\ubaa8\", \"HIFU\", \"IPL\", \"\uc5d4\ub354\ubab0\ub7ec\uc9c0\", \"\uc81c\ubaa8\ub808\uc774\uc838\", \"\uc911\uc800\uc8fc\ud30c\uce58\ub8cc\uae30\", \"\uc800\ucd9c\ub825\ub808\uc774\uc838\", \"\ucd08\uc74c\ud30c\uc9c0\ubc29\ubd84\ud574\uae30\", \"\uce74\ubcf5\uc2dc\", \"LASER\", \"ND-YAG LASER\", \"LIPOSUCTION\", \"PEELING\uc7a5\ube44\", \"\ud53c\ubd80\/\ube44\ub9cc\uc2e4\uc815\ub9ac\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \"\ubcd1\uc6d0\uc124\ube44\": [\"\ubcd1\uc6d0\ud3d0\uc5c5\", \"\uac80\uc9c4\ubc84\uc2a4\", \"\uc138\ucc99\uae30\", \"\uc18c\ub3c5\uae30\", \"\uc751\uae09\ucc28\ub7c9\", \"\ud658\uc790\uc6a9\uce68\ub300\", \"\uae30\ud0c0\uc7a5\ube44\"],\r\n    \r\n    \r\n    \r\n    \r\n    \/\/ \ud544\uc694 \uc2dc \ubc29\uc0ac\uc120\uc7a5\ube44 \ub4f1 \ub2e4\ub978 \uce74\ud14c\uace0\ub9ac \ubc30\uc5f4\ub3c4 \uc5ec\uae30\uc5d0 \ucd94\uac00\ud558\uc138\uc694.\r\n    \/\/ \"\ubc29\uc0ac\uc120\uc7a5\ube44\": [\"X-ray\", \"CT\", \"MRI\"],\r\n};\r\n\r\n\r\n\r\n\r\n\r\nconst mainCategorySelect = document.getElementById('product_category');\r\nconst subCategoryWrapper = document.getElementById('sub_category_wrapper');\r\nconst subCategorySelect = document.getElementById('sub_category');\r\n\r\nmainCategorySelect.addEventListener('change', function() {\r\n    const selectedCategory = this.value;\r\n    const subList = subCategories[selectedCategory];\r\n\r\n    \/\/ \uae30\uc874 \uc138\ubd80 \uc635\uc158 \ucd08\uae30\ud654\r\n    subCategorySelect.innerHTML = '<option value=\"\" disabled selected>\uc120\ud0dd\ud574\uc8fc\uc138\uc694<\/option>';\r\n\r\n    if (subList && subList.length > 0) {\r\n        \/\/ \uc138\ubd80 \ubd84\ub958\uac00 \uc788\uc73c\uba74 \ub798\ud37c\ub97c \ubcf4\uc5ec\uc8fc\uace0 \uc635\uc158\uc744 \ucc44\uc6c0\r\n        subCategoryWrapper.style.display = 'block';\r\n        subCategorySelect.setAttribute('required', 'required'); \/\/ \ud544\uc218\uac12\uc73c\ub85c \uc124\uc815\r\n\r\n        subList.forEach(function(item) {\r\n            const option = document.createElement('option');\r\n            option.value = item;\r\n            option.textContent = item;\r\n            subCategorySelect.appendChild(option);\r\n        });\r\n    } else {\r\n        \/\/ \uc138\ubd80 \ubd84\ub958\uac00 \uc815\uc758\ub418\uc9c0 \uc54a\uc558\uc73c\uba74 \uc228\uae40\r\n        subCategoryWrapper.style.display = 'none';\r\n        subCategorySelect.removeAttribute('required'); \/\/ \ud544\uc218\uac12 \ud574\uc81c\r\n    }\r\n});\r\n\r\n\/\/ ==========================================\r\n\/\/ [\uc774\ubbf8\uc9c0 \ub204\uc801 \ucc98\ub9ac + 2\uc7a5 \uc81c\ud55c \ub85c\uc9c1]\r\n\/\/ ==========================================\r\nconst fileInput = document.getElementById('product_images');\r\nconst previewContainer = document.getElementById('image-preview-container');\r\n\r\n\/\/ \uac00\uc0c1\uc758 \ud30c\uc77c \uc800\uc7a5\uc18c\r\nconst dataTransfer = new DataTransfer();\r\n\r\nfileInput.addEventListener('change', function(e) {\r\n    const newFiles = Array.from(e.target.files);\r\n    const currentCount = dataTransfer.items.length; \/\/ \ud604\uc7ac \uc800\uc7a5\ub41c \ud30c\uc77c \uac1c\uc218\r\n\r\n    \/\/ \u2705 [\ucd94\uac00] 2\uc7a5 \ucd08\uacfc \uccb4\ud06c\r\n    if (currentCount + newFiles.length > 2) {\r\n        alert('2\uc7a5 \uc774\uc0c1 \uc774\ubbf8\uc9c0\ub97c \ucca8\ubd80\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.');\r\n        \r\n        \/\/ \ub0a8\uc740 \uc2ac\ub86f \uacc4\uc0b0 (\uc608: \uc774\ubbf8 1\uc7a5 \uc788\uc73c\uba74 1\uc7a5\ub9cc \ub354 \ucd94\uac00 \uac00\ub2a5)\r\n        const remaining = 2 - currentCount;\r\n        if (remaining <= 0) {\r\n            \/\/ \uc774\ubbf8 2\uc7a5\uc774 \uaf49 \ucc3c\uc73c\uba74 \ucd94\uac00 \ubd88\uac00\r\n            return;\r\n        }\r\n        \/\/ \ub0a8\uc740 \uac1c\uc218\ub9cc\ud07c\ub9cc \uc798\ub77c\ub0c4\r\n        newFiles.splice(remaining);\r\n    }\r\n\r\n    newFiles.forEach(file => {\r\n        \/\/ \uc774\ubbf8\uc9c0 \ud30c\uc77c\uc778\uc9c0 + \uc911\ubcf5 \uc544\ub2cc\uc9c0 \uccb4\ud06c\r\n        if (file.type.startsWith('image\/')) {\r\n            let isDuplicate = false;\r\n            for (let i = 0; i < dataTransfer.items.length; i++) {\r\n                if (dataTransfer.items[i].getAsFile().name === file.name) {\r\n                    isDuplicate = true;\r\n                    break;\r\n                }\r\n            }\r\n            if (!isDuplicate) {\r\n                dataTransfer.items.add(file);\r\n            }\r\n        }\r\n    });\r\n\r\n    fileInput.files = dataTransfer.files;\r\n    renderPreviews();\r\n});\r\n\r\nfunction renderPreviews() {\r\n    previewContainer.innerHTML = '';\r\n\r\n    Array.from(dataTransfer.files).forEach((file, index) => {\r\n        const reader = new FileReader();\r\n        reader.onload = function(e) {\r\n            const imgDiv = document.createElement('div');\r\n            imgDiv.style.cssText = `\r\n                position: relative; width: 140px; height: 140px; border-radius: 12px;\r\n                overflow: hidden; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1);\r\n            `;\r\n\r\n            const img = document.createElement('img');\r\n            img.src = e.target.result;\r\n            img.style.cssText = 'width: 100%; height: 100%; object-fit: cover;';\r\n\r\n            const overlay = document.createElement('div');\r\n            overlay.style.cssText = `\r\n                position: absolute; top: 0; left: 0; width: 100%; height: 100%;\r\n                background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;\r\n                opacity: 0; transition: opacity 0.3s ease; color: white; font-weight: bold; font-size: 16px;\r\n            `;\r\n            overlay.innerText = \"\u274c \uc0ad\uc81c\";\r\n\r\n            imgDiv.onmouseenter = () => overlay.style.opacity = '1';\r\n            imgDiv.onmouseleave = () => overlay.style.opacity = '0';\r\n\r\n            imgDiv.onclick = () => removeFile(index);\r\n\r\n            imgDiv.appendChild(img);\r\n            imgDiv.appendChild(overlay);\r\n            previewContainer.appendChild(imgDiv);\r\n        };\r\n        reader.readAsDataURL(file);\r\n    });\r\n}\r\n\r\nfunction removeFile(index) {\r\n    dataTransfer.items.remove(index);\r\n    fileInput.files = dataTransfer.files;\r\n    renderPreviews();\r\n}\r\n\r\n\/\/ ==========================================\r\n\/\/ [AJAX \ud3fc \uc81c\ucd9c \ucc98\ub9ac]\r\n\/\/ ==========================================\r\ndocument.getElementById('product-upload-form').addEventListener('submit', function(e) {\r\n    e.preventDefault();\r\n\r\n    const formData = new FormData(this);\r\n    const messageDiv = document.getElementById('form-message');\r\n\r\n    \/\/ \ub85c\ub529 \uba54\uc2dc\uc9c0\r\n    messageDiv.style.display = 'block';\r\n    messageDiv.style.color = '#4299e1';\r\n    messageDiv.innerText = '\uc0c1\ud488\uc744 \ub4f1\ub85d\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4...';\r\n\r\n    fetch(ajaxurl, {\r\n        method: 'POST',\r\n        body: formData\r\n    })\r\n    .then(response => response.json())\r\n    .then(data => {\r\n        if (data.success) {\r\n            messageDiv.style.color = '#22863a';\r\n            messageDiv.innerText = '\uc0c1\ud488\uc774 \ub4f1\ub85d\ub418\uc5c8\uc2b5\ub2c8\ub2e4! \uc7a0\uc2dc \ud6c4 \uc0c1\uc138 \ud398\uc774\uc9c0\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.';\r\n            setTimeout(() => {\r\n                window.location.href = data.post_url;\r\n            }, 2000);\r\n        } else {\r\n            messageDiv.style.color = '#cb2431';\r\n            messageDiv.innerText = '\u274c \uc624\ub958: ' + (data.message || '\uc54c \uc218 \uc5c6\ub294 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.');\r\n        }\r\n    })\r\n    .catch(error => {\r\n        console.error('Error:', error);\r\n        messageDiv.style.color = '#cb2431';\r\n        messageDiv.innerText = '\u274c \ub124\ud2b8\uc6cc\ud06c \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.';\r\n    });\r\n});\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-23c0102 e-flex e-con-boxed e-con e-parent\" data-id=\"23c0102\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9f6bad4 elementor-widget elementor-widget-shortcode\" data-id=\"9f6bad4\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><script>\n            alert(\"\ub85c\uadf8\uc778 \ud6c4 \uc774\uc6a9 \uac00\ub2a5\ud569\ub2c8\ub2e4.\");\n            window.location.href = \"https:\/\/medibridge.kr\/login\";\n        <\/script><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>\uc0c1\ud488\uc744 \ub4f1\ub85d\ud574\ubcf4\uc138\uc694! \uc0c1\ud488 \uc81c\ubaa9 * \uc7a5\ube44\ubd84\ub958 * \uc120\ud0dd\ud574\uc8fc\uc138\uc694\uc9c4\ub2e8\uc7a5\ube44\ubc29\uc0ac\uc120\uc7a5\ube44\uce58\ub8cc\uc7a5\ube44\uc218\uc220\uc7a5\ube44\uc784\uc0c1\uc7a5\ube44\ubb3c\ub9ac\uce58\ub8cc\ube44\ub9cc\/\ud53c\ubd80\ubcd1\uc6d0\uc124\ube44 \uc138\ubd80 \ubd84\ub958 * \uc0c1\uc704 \uce74\ud14c\uace0\ub9ac\ub97c \uba3c\uc800 \uc120\ud0dd\ud558\uc138\uc694 \uc81c\ud488 \uc0c1\ud0dc * \uc120\ud0dd\ud574\uc8fc\uc138\uc694\uc2e0\ud488\uc911\uace0\uc81c\ud488\uc544\uc774\ud15c \uc591\ub3c4\uc591\uc218 [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-1566","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"jyh188999","author_link":"https:\/\/medibridge.kr\/eng\/author\/jyh188999\/"},"uagb_comment_info":0,"uagb_excerpt":"\uc0c1\ud488\uc744 \ub4f1\ub85d\ud574\ubcf4\uc138\uc694! \uc0c1\ud488 \uc81c\ubaa9 * \uc7a5\ube44\ubd84\ub958 * \uc120\ud0dd\ud574\uc8fc\uc138\uc694\uc9c4\ub2e8\uc7a5\ube44\ubc29\uc0ac\uc120\uc7a5\ube44\uce58\ub8cc\uc7a5\ube44\uc218\uc220\uc7a5\ube44\uc784\uc0c1\uc7a5\ube44\ubb3c\ub9ac\uce58\ub8cc\ube44\ub9cc\/\ud53c\ubd80\ubcd1\uc6d0\uc124\ube44 \uc138\ubd80 \ubd84\ub958 * \uc0c1\uc704 \uce74\ud14c\uace0\ub9ac\ub97c \uba3c\uc800 \uc120\ud0dd\ud558\uc138\uc694 \uc81c\ud488 \uc0c1\ud0dc * \uc120\ud0dd\ud574\uc8fc\uc138\uc694\uc2e0\ud488\uc911\uace0\uc81c\ud488\uc544\uc774\ud15c \uc591\ub3c4\uc591\uc218 [&hellip;]","_links":{"self":[{"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/pages\/1566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/comments?post=1566"}],"version-history":[{"count":187,"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/pages\/1566\/revisions"}],"predecessor-version":[{"id":3619,"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/pages\/1566\/revisions\/3619"}],"wp:attachment":[{"href":"https:\/\/medibridge.kr\/eng\/wp-json\/wp\/v2\/media?parent=1566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}