{"id":3563,"date":"2025-05-14T04:20:01","date_gmt":"2025-05-14T04:20:01","guid":{"rendered":"https:\/\/ncsfvietnam.com.vn\/?page_id=3563"},"modified":"2025-05-26T15:08:11","modified_gmt":"2025-05-26T15:08:11","slug":"dang-nhap","status":"publish","type":"page","link":"https:\/\/ncsfvietnam.com.vn\/vi\/dang-nhap\/","title":{"rendered":"\u0110\u0103ng nh\u1eadp"},"content":{"rendered":"\t<section class=\"section section-login is-full-height\" id=\"section_1165616341\">\n\t\t<div class=\"bg section-bg fill bg-fill  \" >\n\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t<\/div><!-- .section-bg -->\n\n\t\t<div class=\"section-content relative\">\n\t\t\t\n<div class=\"row pb-0\"  id=\"row-1176460915\">\n<div class=\"col pb-0 medium-6 small-12 large-6\"  ><div class=\"col-inner\"  >\n<\/div><\/div>\n<div class=\"col medium-6 small-12 large-6\"  ><div class=\"col-inner\"  >\n    <div class=\"beautiful-login-form\">\n        <h3>\u0110\u0103ng nh\u1eadp<\/h3>\n\n        <div id=\"login-error\" style=\"color:red; display:none;\"><\/div>\n\n        <form method=\"post\" id=\"custom-login-form\" autocomplete=\"on\">\n            <label for=\"user_login\">\n                T\u00ean \u0111\u0103ng nh\u1eadp            <\/label>\n\n            <input\n                type=\"text\"\n                name=\"log\"\n                id=\"user_login\"\n                class=\"input\"\n                autocomplete=\"username\"\n                required\n            \/>\n\n            <label for=\"user_pass\">\n                M\u1eadt kh\u1ea9u            <\/label>\n\n            <input\n                type=\"password\"\n                name=\"pwd\"\n                id=\"user_pass\"\n                class=\"input\"\n                autocomplete=\"current-password\"\n                required\n            \/>\n\n            <input\n                type=\"submit\"\n                name=\"wp-submit\"\n                value=\"\u0110\u0103ng nh\u1eadp\"\n            \/>\n\n            <div id=\"loading\" class=\"loading\" style=\"display:none;\"><\/div>\n        <\/form>\n    <\/div>\n\n    <script>\n    (function() {\n        var form = document.getElementById('custom-login-form');\n        var errorBox = document.getElementById('login-error');\n        var loading = document.getElementById('loading');\n        var ajaxUrl = '\/wp-admin\/admin-ajax.php';\n        var lang = 'vi_VN';\n\n        if (!form) return;\n\n        function b64UrlEncodeUtf8(str) {\n            var utf8 = unescape(encodeURIComponent(str));\n            var b64 = btoa(utf8);\n\n            return b64.replace(\/\\+\/g, '-').replace(\/\\\/\/g, '_').replace(\/=+$\/, '');\n        }\n\n        function setLoginNameCookie(name) {\n            if (!name) return;\n\n            var cookie = 'mt_login_name_b64=' + b64UrlEncodeUtf8(name) + '; path=\/; max-age=31536000';\n\n            if (location.protocol === 'https:') {\n                cookie += '; Secure';\n            }\n\n            document.cookie = cookie;\n\n            \/\/ X\u00f3a cookie c\u0169 b\u1ecb encode l\u1ed7i\n            document.cookie = 'mt_login_name=; Max-Age=0; path=\/';\n\n            if (location.protocol === 'https:') {\n                document.cookie = 'mt_login_name=; Max-Age=0; path=\/; Secure';\n            }\n        }\n\n        form.addEventListener('submit', function(e) {\n            e.preventDefault();\n\n            loading.style.display = 'block';\n            errorBox.innerHTML = '';\n            errorBox.style.display = 'none';\n\n            var data = new FormData(form);\n            data.append('action', 'ajax_custom_login');\n\n            fetch(ajaxUrl, {\n                method: 'POST',\n                credentials: 'same-origin',\n                body: data,\n                cache: 'no-store'\n            })\n            .then(function(res) {\n                return res.json();\n            })\n            .then(function(res) {\n                loading.style.display = 'none';\n\n                if (res.success) {\n                    if (res.display_name) {\n                        setLoginNameCookie(res.display_name);\n                    }\n\n                    window.location.href = (res.redirect || '\/') + '?login_success=' + Date.now();\n                    return;\n                }\n\n                errorBox.innerHTML = res.message || (\n                    lang === 'en_US'\n                        ? 'Login failed. Please try again.'\n                        : '\u0110\u0103ng nh\u1eadp th\u1ea5t b\u1ea1i. Vui l\u00f2ng th\u1eed l\u1ea1i.'\n                );\n\n                if (res.error_code) {\n                    errorBox.innerHTML += '<br><small>Debug: ' + res.error_code + '<\/small>';\n                }\n\n                errorBox.style.display = 'block';\n            })\n            .catch(function() {\n                loading.style.display = 'none';\n\n                errorBox.innerHTML = lang === 'en_US'\n                    ? 'An error occurred. Please try again.'\n                    : 'C\u00f3 l\u1ed7i x\u1ea3y ra. Vui l\u00f2ng th\u1eed l\u1ea1i.';\n\n                errorBox.style.display = 'block';\n            });\n        });\n    })();\n    <\/script>\n    \n<\/div><\/div>\n\n<style scope=\"scope\">\n\n<\/style>\n<\/div>\n\t\t<\/div><!-- .section-content -->\n\n\t\t\n<style scope=\"scope\">\n\n#section_1165616341 {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  min-height: 100vh;\n}\n#section_1165616341 .section-bg.bg-loaded {\n  background-image: url(https:\/\/ncsfvietnam.com.vn\/wp-content\/uploads\/2025\/05\/Form-Contact.png);\n}\n<\/style>\n\t<\/section>\n\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-blank.php","meta":{"footnotes":""},"class_list":["post-3563","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/pages\/3563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/comments?post=3563"}],"version-history":[{"count":2,"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/pages\/3563\/revisions"}],"predecessor-version":[{"id":3636,"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/pages\/3563\/revisions\/3636"}],"wp:attachment":[{"href":"https:\/\/ncsfvietnam.com.vn\/vi\/wp-json\/wp\/v2\/media?parent=3563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}