{"id":1773,"date":"2025-08-28T07:21:36","date_gmt":"2025-08-28T07:21:36","guid":{"rendered":"https:\/\/assyriaparliament.com\/?page_id=1773"},"modified":"2025-09-17T18:49:16","modified_gmt":"2025-09-17T18:49:16","slug":"checkin","status":"publish","type":"page","link":"https:\/\/assyriaparliament.com\/index.php\/checkin\/","title":{"rendered":"Assyrian Conference Check-in"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1773\" class=\"elementor elementor-1773\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5355ff0 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"5355ff0\" data-element_type=\"section\" data-e-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-db49e1f\" data-id=\"db49e1f\" data-element_type=\"column\" data-e-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-16f1d2c elementor-widget__width-initial elementor-widget elementor-widget-text-editor\" data-id=\"16f1d2c\" data-element_type=\"widget\" data-e-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<p style=\"text-align: center;\">        <div id=\"acc-checkin-wrap\">\r\n            <h3>Check-in \/ Check-out<\/h3>\r\n            <div id=\"qr-reader\" style=\"width:100%;max-width:420px;height:320px;border:1px solid #ccc;margin-bottom:10px;\"><\/div>\r\n            <div id=\"acc-checkin-result\" style=\"font-color:#000000; padding:8px;border:1px solid #eee;background:#A60000;\">Ready to scan<\/div>\r\n        <\/div>\r\n\r\n        <script src=\"https:\/\/unpkg.com\/html5-qrcode\"><\/script>\r\n        <script>\r\n        (function(){\r\n            function ajaxPost(data, cb) {\r\n                var xhr = new XMLHttpRequest();\r\n                xhr.open('POST', 'https:\/\/assyriaparliament.com\/wp-admin\/admin-ajax.php', true);\r\n                xhr.setRequestHeader('Content-Type','application\/x-www-form-urlencoded; charset=UTF-8');\r\n                xhr.onload = function() {\r\n                    try {\r\n                        var response = JSON.parse(xhr.responseText);\r\n                        if (response.success) {\r\n                            cb(response.data);\r\n                        } else {\r\n                            cb('<div style=\"padding:8px;background:#A60000;border:1px solid #00A600;\">' + response.data + '<\/div>');\r\n                        }\r\n                    } catch (e) {\r\n                        cb('<div style=\"padding:8px;background:#A60000;border:1px solid #A60000;\">Error processing response<\/div>');\r\n                    }\r\n                };\r\n                xhr.send(data);\r\n            }\r\n\r\n            function onScanSuccess(decodedText, decodedResult) {\r\n                document.getElementById('acc-checkin-result').innerHTML = 'Scanned: ' + decodedText + ' \u2014 sending to server...';\r\n                var params = 'action=acc_handle_scan&qr_token=' + encodeURIComponent(decodedText);\r\n                ajaxPost(params, function(resp){\r\n                    document.getElementById('acc-checkin-result').innerHTML = resp;\r\n                    \r\n                    \/\/ Auto-stop scanning after success to prevent multiple scans\r\n                    html5QrcodeScanner.stop().then(() => {\r\n                        console.log(\"Scanner stopped after successful scan\");\r\n                        \/\/ Restart scanner after 2 seconds\r\n                        setTimeout(() => {\r\n                            html5QrcodeScanner.start({ facingMode: \"environment\" }, { fps: 1, qrbox: 250 }, onScanSuccess)\r\n                            .catch(function(err){\r\n                                document.getElementById('acc-checkin-result').innerHTML = 'Error restarting scanner: ' + err;\r\n                            });\r\n                        }, 2000);\r\n                    }).catch((err) => {\r\n                        console.log(\"Error stopping scanner: \", err);\r\n                    });\r\n                });\r\n            }\r\n\r\n            const html5QrcodeScanner = new Html5Qrcode(\"qr-reader\");\r\n            html5QrcodeScanner.start({ facingMode: \"environment\" }, { fps: 1, qrbox: 250 }, onScanSuccess)\r\n            .catch(function(err){\r\n                document.getElementById('acc-checkin-result').innerHTML = 'Error starting scanner: ' + err;\r\n            });\r\n        })();\r\n        <\/script>\r\n        <\/p>\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<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7f321b7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7f321b7\" data-element_type=\"section\" data-e-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-439e053\" data-id=\"439e053\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\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<section class=\"elementor-section elementor-top-section elementor-element elementor-element-8ca36d9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8ca36d9\" data-element_type=\"section\" data-e-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-8d8e073\" data-id=\"8d8e073\" data-element_type=\"column\" data-e-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-a047158 elementor-widget elementor-widget-shortcode\" data-id=\"a047158\" data-element_type=\"widget\" data-e-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\"><p>Access denied.<\/p><\/div>\n\t\t\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<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b584760 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b584760\" data-element_type=\"section\" data-e-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-0a2bdb3\" data-id=\"0a2bdb3\" data-element_type=\"column\" data-e-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-188b512 elementor-widget elementor-widget-shortcode\" data-id=\"188b512\" data-element_type=\"widget\" data-e-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\"><p>Access denied.<\/p><\/div>\n\t\t\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<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e28b0ff elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e28b0ff\" data-element_type=\"section\" data-e-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-72f1c26\" data-id=\"72f1c26\" data-element_type=\"column\" data-e-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-a7c5929 elementor-widget elementor-widget-shortcode\" data-id=\"a7c5929\" data-element_type=\"widget\" data-e-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\"><p>You must be logged in to add participants.<\/p><\/div>\n\t\t\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":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-1773","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/pages\/1773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/comments?post=1773"}],"version-history":[{"count":58,"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/pages\/1773\/revisions"}],"predecessor-version":[{"id":1990,"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/pages\/1773\/revisions\/1990"}],"wp:attachment":[{"href":"https:\/\/assyriaparliament.com\/index.php\/wp-json\/wp\/v2\/media?parent=1773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}