{"id":65,"date":"2025-12-22T14:57:42","date_gmt":"2025-12-22T14:57:42","guid":{"rendered":"https:\/\/demo.malotop.ro\/primelink\/?page_id=65"},"modified":"2025-12-22T14:57:42","modified_gmt":"2025-12-22T14:57:42","slug":"try-demo","status":"publish","type":"page","link":"https:\/\/demo.malotop.ro\/primelink\/try-demo\/","title":{"rendered":"Try Demo"},"content":{"rendered":"\n        <div id=\"demo-creator-form\" style=\"max-width: 600px; margin: 20px auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: #fff;\">\r\n            <h2 style=\"margin-top: 0;\">Create Your PrimeLink Demo<\/h2>\r\n            <p>Get your own demo instance to test PrimeLink features. Your demo will be available for 24 hours and will reset automatically every hour.<\/p>\r\n            \r\n            <button id=\"create-demo-btn\" class=\"button button-primary button-large\" style=\"width: 100%; padding: 12px; font-size: 16px; margin: 20px 0;\">\r\n                Create Demo\r\n            <\/button>\r\n            \r\n            <div id=\"demo-result\" style=\"margin-top: 20px;\"><\/div>\r\n            \r\n            <div id=\"demo-info\" style=\"margin-top: 20px; padding: 15px; background: #f0f0f0; border-radius: 5px; display: none;\">\r\n                <h3 style=\"margin-top: 0;\">Demo Information<\/h3>\r\n                <p><strong>Demo URL:<\/strong> <a id=\"demo-url-link\" href=\"#\" target=\"_blank\"><\/a><\/p>\r\n                \r\n                <div style=\"margin: 20px 0; padding: 15px; background: #0073aa; border-radius: 5px; text-align: center;\">\r\n                    <a id=\"demo-autologin-link\" href=\"#\" style=\"display: none; color: white; text-decoration: none; font-weight: bold; font-size: 16px; padding: 10px 20px; background: #00a32a; border-radius: 5px;\">\r\n                        \ud83d\ude80 Auto Login to Demo (Recommended)\r\n                    <\/a>\r\n                <\/div>\r\n                \r\n                \r\n                <hr style=\"margin: 20px 0; border: none; border-top: 1px solid #ddd;\">\r\n                \r\n                <p><strong>Tip:<\/strong> After auto-login, you will be taken to your profile to set a password. Future resets will not change your password.<\/p>\r\n                <p><small>Your demo will reset automatically every hour. Demo expires after 24 hours.<\/small><\/p>\r\n            <\/div>\r\n        <\/div>\r\n        \r\n        <script type=\"text\/javascript\">\r\n        jQuery(document).ready(function($) {\r\n            $('#create-demo-btn').on('click', function() {\r\n                var $btn = $(this);\r\n                var $result = $('#demo-result');\r\n                var $info = $('#demo-info');\r\n                \r\n                $btn.prop('disabled', true).text('Creating Demo...');\r\n                $result.html('<div style=\"padding: 15px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 5px; color: #856404;\"><strong>Creating your demo, please wait...<\/strong><br><small>This may take a few seconds.<\/small><\/div>');\r\n                $info.hide();\r\n                \r\n                $.ajax({\r\n                    url: 'https:\/\/demo.malotop.ro\/primelink\/wp-admin\/admin-ajax.php',\r\n                    type: 'POST',\r\n                    data: {\r\n                        action: 'create_demo',\r\n                        nonce: '33185c2503'\r\n                    },\r\n                    timeout: 30000, \/\/ 30 seconds timeout\r\n                    success: function(response) {\r\n                        if (response.success) {\r\n                            $result.html(\r\n                                '<div style=\"padding: 15px; background: #d4edda; border: 1px solid #c3e6cb; border-radius: 5px; color: #155724;\">' +\r\n                                '<strong>\u2713 Demo created successfully!<\/strong>' +\r\n                                '<\/div>'\r\n                            );\r\n                            \r\n                            \/\/ Afi\u0219eaz\u0103 informa\u021biile demo\r\n                            $('#demo-url-link').attr('href', response.data.url).text(response.data.url);\r\n                            \r\n                            \/\/ Adaug\u0103 link de autologin\r\n                            if (response.data.autologin_url) {\r\n                                $('#demo-autologin-link').attr('href', response.data.autologin_url).show();\r\n                            }\r\n                            \r\n                            $info.show();\r\n                            \r\n                            \/\/ Scroll la informa\u021bii\r\n                            $('html, body').animate({\r\n                                scrollTop: $info.offset().top - 100\r\n                            }, 500);\r\n                            \r\n                            \/\/ Nu face redirect automat - las\u0103 utilizatorul s\u0103 aleag\u0103\r\n                        } else {\r\n                            $result.html(\r\n                                '<div style=\"padding: 15px; background: #f8d7da; border: 1px solid #f5c6cb; border-radius: 5px; color: #721c24;\">' +\r\n                                '<strong>Error:<\/strong> ' + (response.data.message || 'An error occurred. Please try again.') +\r\n                                '<\/div>'\r\n                            );\r\n                        }\r\n                        $btn.prop('disabled', false).text('Create Demo');\r\n                    },\r\n                    error: function(xhr, status, error) {\r\n                        var errorMsg = 'An error occurred. Please try again.';\r\n                        if (status === 'timeout') {\r\n                            errorMsg = 'Request timed out. Please try again.';\r\n                        }\r\n                        $result.html(\r\n                            '<div style=\"padding: 15px; background: #f8d7da; border: 1px solid #f5c6cb; border-radius: 5px; color: #721c24;\">' +\r\n                            '<strong>Error:<\/strong> ' + errorMsg +\r\n                            '<\/div>'\r\n                        );\r\n                        $btn.prop('disabled', false).text('Create Demo');\r\n                    }\r\n                });\r\n            });\r\n        });\r\n        <\/script>\r\n        \n\n\n\n<p><\/p>\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":{"footnotes":""},"class_list":["post-65","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/pages\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":1,"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/pages\/65\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/pages\/65\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/demo.malotop.ro\/primelink\/wp-json\/wp\/v2\/media?parent=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}