{"id":20838,"date":"2023-02-09T13:12:15","date_gmt":"2023-02-09T05:12:15","guid":{"rendered":"https:\/\/flowtaipei.com\/?page_id=20838"},"modified":"2023-02-09T13:16:18","modified_gmt":"2023-02-09T05:16:18","slug":"my-gifts","status":"publish","type":"page","link":"https:\/\/flowtaipei.com\/en\/my-gifts\/","title":{"rendered":"Gifts"},"content":{"rendered":"<p style=\"text-align: center;\">    <link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-EVSTQN3\/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC\" crossorigin=\"anonymous\">\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery-confirm\/3.3.2\/jquery-confirm.min.css\">\n\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn\/tWtIaxVXM\" crossorigin=\"anonymous\"><\/script>\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery-confirm\/3.3.2\/jquery-confirm.min.js\"><\/script>\n\n\n\n    <div id=\"CurrentUserHeaderHolder\" style=\"text-align:center;margin-right:auto;margin-left: auto;\"><\/div>\n    <script>\n\n\n        $(document).ready(function(){\n            LoadCurrentUserHeader();\n        });\n\n        function LoadCurrentUserHeader(){\n\n            var currentuserheader=-1;\n            $('#CurrentUserHeaderHolder').load('https:\/\/flowtaipei.com\/php\/functions.php', { currentuserheader : currentuserheader, language: ''  });\n\n        }\n\n    <\/script>\n\n\n\n<script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn\/tWtIaxVXM\" crossorigin=\"anonymous\"><\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery-confirm\/3.3.2\/jquery-confirm.min.js\"><\/script>\n\n\n\n\n\n\n    <div class='table w-auto text-nowrap' style=\"overflow-x:auto;width:100%\">\n        <h4>\u6211\u8cb7\u4e86\u7684\u79ae\u7269 Gifts I bought<\/h4>\n\n<table class=\"table table-striped table-responsive\"\">\n    <tr style=\"text-align: center;\">\n        <th style=\"text-align: center;\">Purchase Date<\/th>\n        <th style=\"text-align: center;\">OrderID<\/th>\n        <th style=\"text-align: center;\">Gift<\/th>\n        <th style=\"text-align: center;\">Receiver<\/th>\n        <th style=\"text-align: center;\">Redeemed<\/th>\n        <th style=\"text-align: center;\">Gift Code<\/th>\n        <th style=\"text-align: center;\"><\/th>\n        <th style=\"text-align: center;\"><\/th>\n    <\/tr>\n\n\n<\/table>\n    <\/div>\n\n    <input type=\"hidden\" id=\"sendgiftcode\" name=\"sendgiftcode\" value=\"0\">\n    <input type=\"hidden\" id=\"sendgiftproductid\" name=\"sendgiftproductid\" value=\"0\">\n    <input type=\"hidden\" id=\"sendgiftname\" name=\"sendgiftname\" value=\"0\">\n    <input type=\"hidden\" id=\"senderemail\" name=\"senderemail\" value=\"0\">\n\n\n\n    <script>\n        $(\"button[name='CopyGiftCode']\").click (function() {\n            var row = $(this).closest(\"tr\");\n            \/\/var giftcode = row.text();\n            var giftcode = row.find('td:eq(5)').text();\n            \/\/var giftcodecell=row.find('td:eq(4)')\n            const elem = document.createElement('textarea');\n            elem.value =giftcode;\n            document.body.appendChild(elem);\n            elem.select();\n            document.execCommand('copy');\n            document.body.removeChild(elem);\n            alert(\"Copied the gift code: \" +  giftcode);\n        })\n\n\n\n        $(\"button[name='GiftEmail']\").click (function() {\n            var row = $(this).closest(\"tr\");\n            var sendgiftcode = row.find('td:eq(5)').text();\n            var sendgiftproductid = row.find('td:eq(6)').text();\n            var sendgiftname = row.find('td:eq(2)').text();\n            var senderemail='';\n            $('#sendgiftcode').val(sendgiftcode);\n            $('#sendgiftproductid').val(sendgiftproductid);\n            $('#sendgiftname').val(sendgiftname);\n            $('#senderemail').val(senderemail);\n\n\n            $.confirm({\n                boxWidth: '70%',\n                useBootstrap: false,\n                title: \"\u767c\u9001\u79ae\u7269 Send this gift?\",\n                content:\n                    \"<form action='https:\/\/flowtaipei.com\/en\/my-gifts\/' method='post' id='formsendgift' class='giftemail'>\" +\n                    \"<div style='align:center'><strong>\" + $('#sendgiftname').val() + \"<\/strong><br> \" +\n                    \"\u767b\u5165\u4f60\u60f3\u8981\u6536\u5230\u79ae\u7269\u7684\u4eba\u7684\u96fb\u5b50\u4fe1\u7bb1.  \u4f60\u9084\u6709\u53ef\u4ee5\u5beb\u4e00\u6bb5\u8a0a\u606f.<br>  \" +\n                    \"Enter the receiver's email address.  You can also enter a short message if you like.<br>&nbsp;<br> \" +\n                    \"<input type='text' size='30'  autofocus placeholder='\u6536\u4ef6\u4eba\u96fb\u5b50\u4fe1\u7bb1 Receiver Email' class='postreceiveremail' id='postreceiveremail' name='postreceiveremail' required \/><br>&nbsp;<br>\" +\n                    \"<textarea rows='4' cols='1' maxlength='200' placeholder='\u4f60\u7684\u8a0a\u606f Your Message' class='postgiftmessage' name='postgiftmessage'\/><\/textarea>\" +\n                    \"<input type='hidden' id='postsendgiftcode' name='postsendgiftcode' value='\" + $('#sendgiftcode').val() +\"'>\" +\n                    \"<input type='hidden' id='postsendgiftproductid' name='postsendgiftproductid' value='\" + $('#sendgiftproductid').val() + \"'>\" +\n                    \"<input type='hidden' id='postsendgiftname' name='postsendgiftname' value='\" + $('#sendgiftname').val() + \"'>\" +\n                    \"<input type='hidden' id='postsenderemail' name='postsenderemail' value=>\" +\n                    \"<\/form>\",\n                buttons: {\n                    confirm: function () {\n                        text: '\u767c\u9001\u79ae\u7269 Send Gift'\n\n                        $( \"#formsendgift\" ).submit();\n                        $.alert({\n                            title: 'Sending...',\n                            content: '\u5728\u767c\u9001...\u8acb\u7b49\u4e00\u4e0b...\u4e0d\u8981\u518d\u9ede\u64ca... Sending... Please wait and do not click again... ',\n                            boxWidth: '70%',\n                            useBootstrap: false,\n                        })\n                    },\n\n                    cancel: function () {\n                        $.alert({\n                            title: 'Canceled \u53d6\u6d88\u4e86',\n                            content: 'Canceled \u53d6\u6d88\u4e86',\n                            boxWidth: '70%',\n                            useBootstrap: false,\n                        })\n                    }\n\n                }\n            })\n        })\n\n\n    <\/script>\n\n\n    <div class='table w-auto text-nowrap' style=\"overflow-x:auto;width:100%\"  align=\"center\">\n        <h4>\u6211\u8cb7\u4e86\u7684\u79ae\u7269 Gifts I received<\/h4>\n\n        <table class=\"table table-striped table-responsive\" style=\"align:center\">\n            <tr style=\"text-align: center;\">\n                <th style=\"text-align: center;\">Gift<\/th>\n                <th style=\"text-align: center;\">Giver<\/th>\n                <th style=\"text-align: center;\">Redeemed<\/th>\n                <th style=\"text-align: center;\">Gift Code<\/th>\n                <th style=\"text-align: center;\"><\/th>\n                <th style=\"text-align: center;\"><\/th>\n            <\/tr>\n\n\n                    <\/table>\n    <\/div>\n\n\n\n\n\n\n\n\n\n\n\n\n<div style=\"text-align:center;\">\n\n    <strong>\u514c\u63db\u4e00\u500b\u79ae\u7269 Redeem a Gift Code<\/strong><br>\n    <!--<form name=\"formgiftcoderedeem\" id=\"formgiftcoderedeem\" method=\"post\"><\/form> -->\n    <input id=\"giftcoderedeem\" name=\"giftcoderedeem\" width=\"200\" placeholder=\"\u8f38\u5165\u4f60\u7684 Gift Code Enter your Gift Code\" size=\"60\" style=\"border: 2px solid black;\n  border-radius: 4px;text-align:center;\" required\/><br>&nbsp;<br>\n    \u9019\u500b\u6703\u628a\u79ae\u7269\u52a0\u4f60\u7684\u5e33\u6236 This will add the gift to your own account<br>\n    <button type = 'button' class='btn btn-success' id = 'btngiftcoderedeem' value = 'btngiftcoderedeem' >\u514c\u63db Redeem Gift<\/button>\n    <\/form>\n\n<\/div>\n\n    <script>\n        $(\"#btngiftcoderedeem\").click (function() {\n            var giftcoderedeem = document.getElementById(\"giftcoderedeem\").value;\n\n            var giftcodeformat = \/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]*$\/;\n            $('#giftcoderedeem').val(giftcoderedeem);\n            if(document. getElementById(\"giftcoderedeem\").value.match(giftcodeformat))\n            {\n\n            }\n            else\n            {\n                $.alert({\n                    title: 'Invalid Gift Code',\n                    content: 'Gift Code\u4e0d\u5c0d You entered an invalid gift code',\n                    boxWidth: '70%',\n                    useBootstrap: false,\n                })\n                return false;\n            }\n\n\n            if(document. getElementById(\"giftcoderedeem\").value.length===0)\n            {\n                $.alert({\n                    title: 'Enter a Gift Code',\n                    content: '\u4f60\u6c92\u6709\u8f38\u5165Gift Code You have not entered a gift code.',\n                    boxWidth: '70%',\n                    useBootstrap: false,\n                })\n                return false;\n            }\n\n\n\n            $.confirm({\n                boxWidth: '70%',\n                useBootstrap: false,\n                title: \"\u514c\u63db? Redeem Gift?\",\n                content:\n                    \"<div align='center'><strong>Redeem Gift Code?<\/strong><br> \" +\n                    \"\u9019\u500b\u6703\u628a\u79ae\u7269\u52a0\u4f60\u7684\u5e33\u6236 This will add the gift to your own account\",\n                buttons: {\n\n                    confirm: function () {\n                        text: '\u514c\u63db Redeem Gift'\n\n\n                        $.alert({\n                            title: 'Transferring...',\n                            content: '\u5728\u8f49\u8b93...\u8acb\u7b49\u4e00\u4e0b...\u4e0d\u8981\u518d\u9ede\u64ca... Transferring... Please wait and do not click again... ',\n                            boxWidth: '70%',\n                            useBootstrap: false,\n                        })\n                        location.href = \"https:\/\/flowtaipei.com\/en\/my-gifts\/?giftcode=\" + giftcoderedeem;\n                    },\n\n                    cancel: function () {\n                        $.alert({\n                            title: 'Canceled \u53d6\u6d88\u4e86',\n                            content: 'Canceled \u53d6\u6d88\u4e86',\n                            boxWidth: '70%',\n                            useBootstrap: false,\n                        })\n                    }\n\n                }\n            })\n\n\n\n\n        })\n\n\n\n\n\n            <\/script>\n\n\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"wf_page_folders":[],"class_list":["post-20838","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/pages\/20838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/comments?post=20838"}],"version-history":[{"count":0,"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/pages\/20838\/revisions"}],"wp:attachment":[{"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/media?parent=20838"}],"wp:term":[{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/flowtaipei.com\/en\/wp-json\/wp\/v2\/wf_page_folders?post=20838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}