{"id":725,"date":"2026-10-14T21:00:21","date_gmt":"2026-10-14T18:00:21","guid":{"rendered":"https:\/\/alharam.qa\/account\/"},"modified":"2026-10-14T21:00:21","modified_gmt":"2026-10-14T18:00:21","slug":"account","status":"publish","type":"page","link":"https:\/\/alharam.qa\/en\/account\/","title":{"rendered":"My Account"},"content":{"rendered":"    <div class=\"ahp\" id=\"ahp\" data-en=\"1\">\r\n            <div class=\"ahp-login\">\r\n            <h2>Track your requests with Al-Haram<\/h2>\r\n            <p>Sign in with your mobile and any request number, or with a code sent to your email. No password needed.<\/p>\r\n            <div class=\"ahp-tabs\"><button type=\"button\" class=\"on\" data-t=\"ph\">Mobile + request no.<\/button><button type=\"button\" data-t=\"em\">Email code<\/button><\/div>\r\n            <form class=\"ahp-phone\"><input type=\"tel\" name=\"phone\" dir=\"ltr\" required autocomplete=\"tel\" placeholder=\"Mobile number\"><input type=\"text\" name=\"ref\" dir=\"ltr\" required placeholder=\"Request no., e.g. AH-26-0015\"><button class=\"ahp-btn\">Sign in<\/button><\/form>\r\n            <form class=\"ahp-step1\" hidden><input type=\"email\" name=\"email\" dir=\"ltr\" required autocomplete=\"email\" placeholder=\"Email address\"><button class=\"ahp-btn\">Send me the code<\/button><\/form>\r\n            <form class=\"ahp-step2\" hidden><p class=\"ahp-sent\"><\/p><input type=\"text\" name=\"code\" inputmode=\"numeric\" maxlength=\"6\" dir=\"ltr\" autocomplete=\"one-time-code\" placeholder=\"\u2022\u2022\u2022\u2022\u2022\u2022\"><button class=\"ahp-btn\">Sign in<\/button><button type=\"button\" class=\"ahp-link ahp-back\">Change email<\/button><\/form>\r\n            <p class=\"ahp-msg\" aria-live=\"polite\"><\/p>\r\n            <p class=\"ahp-hint\">Your request number appears after you submit a request and in the confirmation message.<\/p>\r\n        <\/div>\r\n        <\/div>\r\n    <script>\r\n    (function () {\r\n      var root = document.getElementById('ahp'); if (!root) return;\r\n      var en = root.getAttribute('data-en') === '1', ajax = 'https:\/\/alharam.qa\/wp-admin\/admin-ajax.php';\r\n      function post(action, data) { var fd = new FormData(); fd.append('action', action); fd.append('en', en ? '1' : ''); for (var k in data) fd.append(k, data[k]); return fetch(ajax, { method: 'POST', body: fd, credentials: 'same-origin' }).then(function (r) { return r.json(); }); }\r\n      function msg(el, t, err) { if (!el) return; el.textContent = t || ''; el.className = 'ahp-msg' + (err ? ' err' : ''); }\r\n      var s1 = root.querySelector('.ahp-step1'), s2 = root.querySelector('.ahp-step2'), m = root.querySelector('.ahp-login .ahp-msg'), email = '';\r\n      var ph = root.querySelector('.ahp-phone');\r\n      root.querySelectorAll('.ahp-tabs button').forEach(function (b) { b.addEventListener('click', function () { root.querySelectorAll('.ahp-tabs button').forEach(function (x) { x.classList.toggle('on', x === b); }); var em = b.getAttribute('data-t') === 'em'; ph.hidden = em; s1.hidden = !em; s2.hidden = true; msg(m, ''); }); });\r\n      if (ph) ph.addEventListener('submit', function (e) { e.preventDefault(); var b = ph.querySelector('button'); b.disabled = true; msg(m, ''); post('ah_portal_phone', { phone: ph.phone.value, ref: ph.ref.value }).then(function (j) { if (!j.success) { b.disabled = false; msg(m, j.data || 'Error', true); return; } location.reload(); }).catch(function () { b.disabled = false; }); });\r\n      if (s1) s1.addEventListener('submit', function (e) {\r\n        e.preventDefault(); email = s1.email.value.trim(); var b = s1.querySelector('button'); b.disabled = true; msg(m, en ? 'Sending\u2026' : '\u062c\u0627\u0631\u064d \u0627\u0644\u0625\u0631\u0633\u0627\u0644\u2026');\r\n        post('ah_portal_send', { email: email }).then(function (j) { b.disabled = false; if (!j.success) { msg(m, j.data || 'Error', true); return; } msg(m, ''); s1.hidden = true; s2.hidden = false; s2.querySelector('.ahp-sent').textContent = (en ? 'We sent a 6-digit code to ' : '\u0623\u0631\u0633\u0644\u0646\u0627 \u0643\u0648\u062f\u0627\u064b \u0645\u0646 6 \u0623\u0631\u0642\u0627\u0645 \u0625\u0644\u0649 ') + email + (en ? ' (check spam too).' : ' (\u062a\u062d\u0642\u0642 \u0645\u0646 \u0627\u0644\u0628\u0631\u064a\u062f \u063a\u064a\u0631 \u0627\u0644\u0647\u0627\u0645 \u0623\u064a\u0636\u0627\u064b).'); s2.code.focus(); }).catch(function () { b.disabled = false; msg(m, en ? 'Something went wrong.' : '\u062d\u062f\u062b \u062e\u0637\u0623.', true); });\r\n      });\r\n      if (s2) {\r\n        s2.addEventListener('submit', function (e) {\r\n          e.preventDefault(); var b = s2.querySelector('.ahp-btn'); b.disabled = true;\r\n          post('ah_portal_verify', { email: email, code: s2.code.value }).then(function (j) { if (!j.success) { b.disabled = false; msg(m, j.data || 'Error', true); return; } location.reload(); }).catch(function () { b.disabled = false; });\r\n        });\r\n        s2.querySelector('.ahp-back').addEventListener('click', function () { s2.hidden = true; s1.hidden = false; msg(m, ''); });\r\n      }\r\n      var pf = root.querySelector('.ahp-profile');\r\n      if (pf) pf.addEventListener('submit', function (e) { e.preventDefault(); var pm = pf.querySelector('.ahp-msg'); post('ah_portal_profile', { name: pf.name.value, phone: pf.phone.value, mkt: pf.mkt.checked ? '1' : '' }).then(function (j) { if (!j.success) { msg(pm, j.data || 'Error', true); return; } location.reload(); }); });\r\n      root.querySelectorAll('.ahp-reply').forEach(function (f) {\r\n        f.addEventListener('submit', function (e) { e.preventDefault(); var pm = f.querySelector('.ahp-msg'), b = f.querySelector('button'); b.disabled = true;\r\n          post('ah_portal_reply', { rid: f.getAttribute('data-rid'), message: f.message.value }).then(function (j) { b.disabled = false; if (!j.success) { msg(pm, j.data || 'Error', true); return; } location.reload(); }).catch(function () { b.disabled = false; }); });\r\n      });\r\n      var lo = root.querySelector('.ahp-logout'); if (lo) lo.addEventListener('click', function () { post('ah_portal_logout', {}).then(function () { location.reload(); }); });\r\n          })();\r\n    <\/script>\r\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-725","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/pages\/725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/comments?post=725"}],"version-history":[{"count":0,"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/pages\/725\/revisions"}],"wp:attachment":[{"href":"https:\/\/alharam.qa\/en\/wp-json\/wp\/v2\/media?parent=725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}