{"id":909,"date":"2024-01-25T07:53:50","date_gmt":"2024-01-25T07:53:50","guid":{"rendered":"https:\/\/nielsafetravels.com\/new\/?page_id=909"},"modified":"2024-01-25T07:57:43","modified_gmt":"2024-01-25T07:57:43","slug":"booking-engine","status":"publish","type":"page","link":"https:\/\/nielsafetravels.com\/index.php\/booking-engine\/","title":{"rendered":"booking engine"},"content":{"rendered":"\n<style> \n@keyframes spinner { \n  0% { \n    transform: translate3d(-50%, -50%, 0) rotate(0deg); \n  } \n  100% { \n    transform: translate3d(-50%, -50%, 0) rotate(360deg); \n  }\n}\n.spin::before { animation: 1.5s linear infinite spinner; animation-play-state: inherit; border: solid 5px #cfd0d1;\n border-bottom-color: #1c87c9; border-radius: 50%; content: ''; height: 40px; width: 40px; position: absolute;\n top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0); will-change: transform;}\niframe {height: 100vh !important; width: 100%;}\n<\/style>\n<div id='logs' ><\/div> \n<iframe id='travelstartIframe-9ab4ba44-6d88-4e8e-9916-344c18b497d5' \n    frameBorder='0' \n    scrolling='auto' \n    style='margin: 0px; padding: 0px; border: 0px; height: 0px; background-color: #fafafa;'>\n<\/iframe> \n<div class='spin'><\/div> \n<script src='https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.2.1\/jquery.min.js' type='text\/javascript'><\/script> \n<script type='text\/javascript'> \n\t\/\/ these variables can be configured \n\tvar travelstartIframeId = 'travelstartIframe-9ab4ba44-6d88-4e8e-9916-344c18b497d5'; \n\tvar iframeUrl = 'https:\/\/www.travelstart.com.ng'; \n\tvar logMessages = false; \n\tvar showBanners = false; \n\tvar affId = '216827'; \n\tvar affCampaign = ''; \n\tvar affCurrency = 'Default'; \/\/ ZAR \/ USD \/ NAD \/ ... \n\tvar height = '0px'; \n\tvar width = '100%'; \n\tvar language = ''; \/\/ ar \/ en \/ leave empty for user preference\n \n\t\/\/ do not change these \n\tvar iframe = $('#' + travelstartIframeId); \n\tvar iframeVersion = '11'; \n\tvar autoSearch = false; \n\tvar affiliateIdExist = false;\n\tvar urlParams = {}; \n\tvar alreadyExist = []; \n\tvar iframeParams = []; \n\tvar cpySource = ''; \n\tvar match,\n\t\tpl = \/\\+\/g,  \n\t\tsearch = \/([^&=]+)=?([^&]*)\/g,\n\t\tdecode = function (s) { return decodeURIComponent(s.replace(pl, \" \")); },\n\t\tquery  = window.location.search.substring(1);\n\twhile (match = search.exec(query)){ \n\t\turlParams[decode(match[1])] = decode(match[2]); \n\t}\t\t\t\t \n\tfor (var key in urlParams){ \n\t\tif (urlParams.hasOwnProperty(key)){ \n\t\t\tif (key == 'search' && urlParams[key] == 'true'){ \n\t\t\t\tautoSearch = true; \n\t\t\t} \n\t\t\tif(\tkey == 'affId' || key == 'affid' || key == 'aff_id'){ \n\t\t\t\taffiliateIdExist = true ; \n\t\t\t} \n\t\t\tiframeParams.push(key + '=' + urlParams[key]); \n\t\t\talreadyExist.push(key); \n\t\t}\t \n\t}\t\t \n  \tif(!('show_banners' in alreadyExist)){ \n\t\tiframeParams.push('show_banners=' + showBanners); \n\t}\t\t \n\tif(!('log' in alreadyExist)){ \n\t\tiframeParams.push('log='  + logMessages); \n\t}\t\t \n\tif(! affiliateIdExist){ \n\t\tiframeParams.push('affId='  + affId); \n\t}\t\t \n\tif(! affiliateIdExist){ \n\t\tiframeParams.push('language='  + language); \n\t}\t\t \n\tif(!('affCampaign' in alreadyExist)){ \n\t\tiframeParams.push('affCampaign='  + affCampaign); \n\t}\t\t \n\tif(cpySource !== '' && !('cpySource' in alreadyExist)){ \n\t\tiframeParams.push('cpy_source='  + cpySource); \n\t}\t\t \n\tif(!('utm_source' in alreadyExist)){ \n\t\tiframeParams.push('utm_source=affiliate'); \n\t}\t\t \n\tif(!('utm_medium' in alreadyExist)){ \n\t\tiframeParams.push('utm_medium='  + affId); \n\t}\t\t \n\tif(!('isiframe' in alreadyExist)){ \n\t\tiframeParams.push('isiframe=true'); \n\t}\t\t \n\tif(!('landing_page' in alreadyExist)){ \n\t\tiframeParams.push('landing_page=false'); \n\t}\t\t \n\tif (affCurrency.length == 3){ \n\t\tiframeParams.push('currency=' + affCurrency); \n\t} \n\tif(!('iframeVersion' in alreadyExist)){ \n   \tiframeParams.push('iframeVersion='  + iframeVersion);\n\t}\t\t \n\tif(!('host' in alreadyExist)){ \n\t\tiframeParams.push('host=' + window.location.href.split('?')[0]); \n\t}\t\t \n   var newIframeUrl = iframeUrl + ('\/?search=false') + '&' + iframeParams.join('&'); \n\tiframe.attr('src', newIframeUrl); \n   \nwindow.addEventListener('message', function(e) { \n    var $iframe = jQuery('#' + travelstartIframeId);\n    var eventName = e.data[0];\n    var data = e.data[1];\n    switch(eventName) {\n      case 'setHeight':\n        $iframe.height(data);\n        setIframeSize(width, $iframe.height(data));\n        break;\n    }\n}, false);\n\n\tfunction setIframeSize(newWidth, newHeight){ \n\t\tiframe.css('width', newWidth); \n\t\tiframe.width(newWidth); \n\t\tiframe.css('height', newHeight); \n\t\tiframe.height(newHeight); \n\t} \n\tsetIframeSize(width, height); \n<\/script><script> \njQuery('#' + travelstartIframeId).ready(function () {$('.spin').css('display', 'none');});\njQuery('#' + travelstartIframeId).load(function () {$('.spin').css('display', 'none');\t});\n<\/script>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/landing.php","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/pages\/909"}],"collection":[{"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/comments?post=909"}],"version-history":[{"count":1,"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/pages\/909\/revisions"}],"predecessor-version":[{"id":911,"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/pages\/909\/revisions\/911"}],"wp:attachment":[{"href":"https:\/\/nielsafetravels.com\/index.php\/wp-json\/wp\/v2\/media?parent=909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}