{"id":85,"date":"2025-04-23T09:05:06","date_gmt":"2025-04-23T09:05:06","guid":{"rendered":"https:\/\/almulhim.qstock.pro\/?page_id=85"},"modified":"2025-04-23T09:05:31","modified_gmt":"2025-04-23T09:05:31","slug":"al-mulhim-internal-dashboard","status":"publish","type":"page","link":"https:\/\/almulhim.qstock.pro\/index.php\/al-mulhim-internal-dashboard\/","title":{"rendered":"Al Mulhim Internal Dashboard"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"85\" class=\"elementor elementor-85\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-9261a55 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"9261a55\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0a98263\" data-id=\"0a98263\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-def2748 elementor-widget elementor-widget-shortcode\" data-id=\"def2748\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><span id=\"user_id\"><\/span>\n<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e461ec6 elementor-widget elementor-widget-html\" data-id=\"e461ec6\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div id=\"user_id\" style=\"display: none;\">[user_id]<\/div> <!-- User ID shortcode -->\r\n\r\n<iframe id=\"userIframe\" src=\"\" width=\"100%\" height=\"750px\" style=\"display: none;\"><\/iframe>\r\n\r\n<script>\r\n    document.addEventListener(\"DOMContentLoaded\", function() {\r\n        var userElement = document.getElementById(\"user_id\");\r\n        var iframe = document.getElementById(\"userIframe\");\r\n        var logoutButton = document.getElementById(\"logoutButton\");\r\n\r\n        if (userElement) {\r\n            var userId = userElement.innerText.trim();\r\n            \r\n            if (userId && userId !== \"0\") { \/\/ If a valid user ID is detected\r\n                iframe.src = \"https:\/\/qparts.retool.com\/embedded\/public\/91fca345-3f12-42b6-9270-ce44b951e20b?user_id=\" + userId;\r\n                iframe.style.display = \"block\"; \/\/ Show the iframe\r\n                logoutButton.style.display = \"block\"; \/\/ Show the logout button\r\n            } else {\r\n                \/\/ Redirect to the login page if user ID is invalid\r\n                window.location.href = \"https:\/\/almulhim.qstock.pro\/index.php\/al-mulhim-login\/\";\r\n            }\r\n        } else {\r\n            \/\/ Redirect if no user ID is detected\r\n            window.location.href = \"https:\/\/almulhim.qstock.pro\/index.php\/al-mulhim-login\/\";\r\n        }\r\n    });\r\n<\/script>\r\n\r\n<div class=\"logout-button\" onclick=\"logoutUser()\">Log Out<\/div>\r\n\r\n<script>\r\n    function logoutUser() {\r\n        \/\/ Clear WordPress session cookies\r\n        document.cookie = \"wordpress_logged_in_=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=\/;\";\r\n        \r\n        \/\/ Clear any stored session data\r\n        localStorage.clear();\r\n        sessionStorage.clear();\r\n        \r\n        \/\/ Redirect to the login page\r\n        window.location.href = \"https:\/\/almulhim.qstock.pro\/index.php\/al-mulhim-login\/?logged_out=true\";\r\n    }\r\n<\/script>\r\n\r\n<style>\r\n@import url('https:\/\/fonts.googleapis.com\/css2?family=Lora:wght@400;700&display=swap');\r\n\r\n.logout-button {\r\n    position: fixed;\r\n    bottom: 30px;\r\n    left: 60px;\r\n    z-index: 9999;\r\n    background: #A51515; \/* Dark Red *\/\r\n    color: white;\r\n    padding: 5px 15px;\r\n    border-radius: 5px;\r\n    text-decoration: none;\r\n    font-weight: bold;\r\n    font-size: 15px;\r\n    font-family: 'Lora', serif;\r\n    cursor: pointer;\r\n    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);\r\n    transition: background 0.3s ease;\r\n}\r\n.logout-button:hover {\r\n    background: #600000; \/* Darker Red on Hover *\/\r\n}\r\n<\/style>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>[user_id] Log Out<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"class_list":["post-85","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/pages\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":3,"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/pages\/85\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/pages\/85\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/almulhim.qstock.pro\/index.php\/wp-json\/wp\/v2\/media?parent=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}