{"timeout":1755962892,"value":{"content":"<div class=\"elementor-element elementor-element-8218517 e-flex e-con-boxed e-con e-parent\" data-id=\"8218517\" 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-35c9fa6 elementor-widget elementor-widget-image\" data-id=\"35c9fa6\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img width=\"768\" height=\"768\" src=\"https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1-768x768.png\" class=\"attachment-medium_large size-medium_large wp-image-94\" alt=\"\" srcset=\"https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1-768x768.png 768w, https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1-300x300.png 300w, https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1-1024x1024.png 1024w, https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1-150x150.png 150w, https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1-1536x1536.png 1536w, https:\/\/emacademy.edu.lk\/wp-content\/uploads\/2024\/12\/Maritime-Academy-Logo-1.png 2000w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/>\t\t\t\t\t\t\t\t\t\t\t\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-7e82b3cb e-flex e-con-boxed e-con e-parent\" data-id=\"7e82b3cb\" 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-2317be0e elementor-widget elementor-widget-text-editor\" data-id=\"2317be0e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:shortcode -->\n    <div class=\"container\">\n        <h2>Certificate Verification<\/h2>\n        <form id=\"verification-form\">\n            <label for=\"certificate_number\">Certificate Number:<\/label>\n            <input type=\"text\" id=\"certificate_number\" name=\"certificate_number\" placeholder=\"Enter certificate number\" required>\n\n            <label for=\"dob\">Date of Birth:<\/label>\n            <input type=\"date\" id=\"dob\" name=\"dob\" required>\n\n            <button type=\"submit\">Verify Certificate<\/button>\n        <\/form>\n\n        <div id=\"popup\" class=\"popup\">\n            <div class=\"popup-content\">\n                <span class=\"close\" onclick=\"closePopup()\">&times;<\/span>\n                <div id=\"popup-message\"><\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n    <script>\n        document.getElementById(\"verification-form\").addEventListener(\"submit\", async function(event) {\n            event.preventDefault();\n            const formData = new FormData(event.target);\n\n            const response = await fetch(\"https:\/\/emacademy.edu.lk\/wp-admin\/admin-ajax.php\", {\n                method: \"POST\",\n                body: new URLSearchParams({\n                    action: \"verify_certificate\",\n                    certificate_number: formData.get(\"certificate_number\"),\n                    dob: formData.get(\"dob\"),\n                }),\n            });\n\n            const result = await response.json();\n            const popup = document.getElementById(\"popup\");\n            const message = document.getElementById(\"popup-message\");\n\n            if (result.success) {\n                message.innerHTML = `<strong>Certificate Verified!<\/strong><br>Name: ${result.name}<br>Course: ${result.course}<br>Issued Date: ${result.issued_date}`;\n            } else {\n                message.innerHTML = `<span style=\"color: red;\">${result.message}<\/span>`;\n            }\n            popup.style.display = \"flex\";\n        });\n\n        function closePopup() {\n            document.getElementById(\"popup\").style.display = \"none\";\n        }\n    <\/script>\n    <style>\n        .container { max-width: 400px; margin: auto; text-align: center; padding: 20px; border: 1px solid #ddd; border-radius: 10px; }\n        .popup { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); justify-content: center; align-items: center; }\n        .popup-content { background: white; padding: 20px; border-radius: 5px; }\n    <\/style>\n    \n<!-- \/wp:shortcode --><!-- wp:paragraph -->\n<p>\u00a0<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\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","scripts":[],"styles":[]}}