// =========[ DEFINING SCRIPT ]========= run_page(); function run_page(){ let offer_path = window.location.pathname; let url_arr = offer_path.split("/"); let last_url = url_arr[url_arr.length - 1]; switch(last_url){ case "etisalat" : console.log("etisalat Script Run"); //{run_script_etisalat} break; case "tq": console.log("TQ Script Run"); //{TQ SCRIPT} break; default: console.log("LP Script Run"); view().then(function() { post_view(); }); break; } } // =========[ DEFAULT SCRIPT ]========= /* The Scripts that need to have to work*/ // ======= CODE TO STRICT NUMBER ONLY ======= $(document).ready(function(){ $('.msisdn').on('input', function() { var c = this.selectionStart, r = /[^0-9\u0660-\u0669]/g, v = $(this).val(); if(r.test(v)) { $(this).val(v.replace(r, '')); c--; } this.setSelectionRange(c, c); }); }); //DEFAULT CODE!! function check_url_telco(){ let url_string = window.location.href let url = new URL(url_string); let telco = url.searchParams.get("telco"); console.warn("Checking URL Telco : " + telco); return telco; } function get_lang() { let url_string = window.location.href let url = new URL(url_string); return url.searchParams.get("lang"); } function get_tracking_id() { var result; // IF GLOBAL TRACKING EXIST if(typeof window.tracking_id !== "undefined" || window.tracking_id != null){ console.warn("Getting Global Tracking ID : " + window.tracking_id); result = window.tracking_id; } else{ let url_string = window.location.href let url = new URL(url_string); console.warn("Getting URL Tracking ID : " + url.searchParams.get("tracking_id")); result = url.searchParams.get("tracking_id"); } return result; } function get_transaction_id() { var result; // IF GLOBAL TRANSACTION EXIST if(typeof window.transaction_id !== "undefined" || window.transaction_id != null){ console.warn("Getting Global Transaction ID : " + window.transaction_id); result = window.transaction_id; } else{ let url_string = window.location.href let url = new URL(url_string); console.warn("Getting URL Transaction ID : " + url.searchParams.get("t_id")); if(url.searchParams.get("t_id") == null || url.searchParams.get("t_id") == ""){ console.warn("t_id invalid : "+ url.searchParams.get("t_id")); } result = url.searchParams.get("t_id"); } return result; } function get_msisdn_url() { let url_string = window.location.href let url = new URL(url_string); return url.searchParams.get("msisdn"); } function create_lead() { var xhttp = new XMLHttpRequest(); var api_url = "https://prod.api.puretechglobal.net/lp/api"; var params = { //------- standardize param----------// tracking_id: get_tracking_id(), country: window.country, gateway: window.gateway, telco: window.telco, shortcode: window.sc, keyword: window.kw, msisdn: window.msisdn, //some gateway API using param name "phone" ,so "phone" is supported! create_lead_only: true, //true mean call only create_lead , wont call Gateway API flow: window.flow //pass the flow example ,ussd , pin_request to execute Gateway API Call }; console.warn("Creating Lead"); console.log(params); return new Promise((resolve, reject) => { xhttp.onreadystatechange = (e) => { if (xhttp.readyState !== 4) { return; } if (xhttp.status === 200) { console.log("SUCCESS", xhttp.responseText); resolve(JSON.parse(xhttp.responseText)); } else { console.warn("request_error"); reject(e) } }; xhttp.open("POST", api_url); xhttp.send(JSON.stringify(params)) }); } function get_msisdn() { var msisdn = $("#msisdn").val(); var check = 0; if (typeof input !== "undefined") { check = 1; } let arNumberToen = function (str) { if(typeof str === "string") { for(var i=0; i<10; i++) { str = str.replace(arabicNumbers[i], i); } } return str; }; var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g]; msisdn = arNumberToen(msisdn); var country_code = "971"; if(msisdn == null || msisdn == ""){ return "-"; } else{ console.warn("Phone number : " + country_code + msisdn); return country_code + msisdn; } } function view() { let api_url = "https://prod.api.puretechglobal.net/lp/view/v2"; let url_string = window.location.href let url = new URL(url_string); let tracking_data = Object.fromEntries(new URLSearchParams(url.search)); tracking_data["lp_path"] = window.location.pathname; tracking_data["blocking_id"] = ("; "+document.cookie).split(`; blocking_id=`).pop().split(";")[0]; //[[ view_tracking_addon ]] let jqxhr = $.ajax({ type: "POST", url: api_url, data: tracking_data }); return new Promise((resolve, reject) => { jqxhr.done(function(result) { if(result.status == "ok") { if(result.data) { let url_string = window.location.href let url = new URL(url_string); var lang = url.searchParams.get("lang"); console.log("searchparamsresultlang: " + lang); let templang = lang; params = new URLSearchParams(result.data); window.history.replaceState(null, null, window.location.pathname + "?" + params); console.log("below is params from view js"); console.log(params); //global tracking and transaction id window.tracking_id = params.get("tracking_id"); window.transaction_id = (params.get("t_id")) ? params.get("t_id") : params.get("transaction_id"); console.warn("Global Tracking ID : " + window.tracking_id); console.warn("Global Transaction ID : " + window.transaction_id); //find if the url already have lang in url params if(templang){ console.log("got existing language from url : " + templang); let url_string = window.location.href let url = new URL(url_string); url.searchParams.set("lang", templang); window.history.replaceState(null, null, url.search); } //[[ view_add_script ]] } if(result.cookies) { for (var key in result.cookies) { if (result.cookies.hasOwnProperty(key)) { document.cookie = key +"="+ result.cookies[key] +"; expires=Sun, 1 Jan 2090 00:00:00 UTC; path=/" } } } var event = new Event("custom_event_after_view"); document.dispatchEvent(event); } else if(result.status == "redirect") { window.location.replace(result.data.url); } resolve(result); }); jqxhr.fail(function(result) { console.warn("View API Error"); reject(result); }); }); } function post_view() { // If there is MSISDN input => do not enable the button. let msisdn_input = document.getElementById('msisdn'); if(!msisdn_input) { $('.button').removeClass('disabled_btn').prop('disabled', false); } } // =========[ FUNCTIONAL SCRIPT ]========= function submit_request(){ window.telco = "etisalat"; window.gateway = "actel"; window.sc = "1111"; window.kw = "g4"; window.flow = "pin"; window.country = "uae"; window.msisdn = get_msisdn(); create_lead().then(function (res) { $("#button-loading").show(); // ====== FLOW ====== switch(window.telco){ case "etisalat" : pin_request_etisalat(window.msisdn, window.telco, window.sc, window.kw); break; } }).catch(function() { $("#button-loading").hide(); alert("Create Lead Failed! Please Check"); }); } function pin_request_etisalat(msisdn, telco, shortcode, keyword){ let url_string = window.location.href let url = new URL(url_string); var tracking_id = url.searchParams.get("tracking_id"); var lang = url.searchParams.get("lang"); let offer_path = window.location.pathname; pinData = { tracking_id: tracking_id }; let jqxhr = $.ajax({ type: "POST", url: "https://prod.gateway.puretechglobal.net/sms_api_hub_process/pin_request/actel/uae", data: pinData }); return new Promise((resolve, reject) => { jqxhr.done(function(result) { console.log(result); if(result.result == "SUCCESS") { $("#txt_msisdn_error").hide(); resolve(result); if (result.redirect_url){ $("#button-loading").show(); $("#button").addClass("disabled_btn").prop("disabled", true); $(".button").css("background", "#858585"); location.href = pin_result.redirect_url; }else{ window.location.replace(window.location.origin + offer_path + "/pin/" + telco + window.location.search); } } else { if(result.detail == "Invalid MSISDN"){ $("#txt_msisdn_error").show(); } else{ alert(result.detail); } $("#button-loading").hide(); console.warn('PIN request failed.'); reject(result); $("#button").removeClass("disabled_btn").prop("disabled", false); $("#button-loading").hide(); } }); jqxhr.fail(function(result) { console.warn('PIN request failed.'); reject(result); $("#button").removeClass("disabled_btn").prop("disabled", false); $("#button-loading").hide(); }); }); } function submit_verify_etisalat(){ let pin_code = $("#pin").val(); let url_string = window.location.href let url = new URL(url_string); var tracking_id = url.searchParams.get("tracking_id"); var path = window.location.pathname; var path = path.split("/"); let offer_path = '/'+path[1]+'/'+path[2]+'/'+path[3]; pinData = { tracking_id: tracking_id, pin_code: pin_code }; let jqxhr = $.ajax({ type: "POST", url: "https://prod.gateway.puretechglobal.net/sms_api_hub_process/pin_verify/actel/uae", data: pinData }); return new Promise((resolve, reject) => { jqxhr.done(function(result) { console.log(result); if(result.result == "SUCCESS") { console.log(result); resolve(result); var content_url =""; var data = ""; if (result.data){ let data = JSON.parse(result.data); } content_url = typeof result.data !== "undefined" ? (typeof result.redirect_url !== "undefined" ? result.redirect_url : (JSON.parse(result.data)['content_url'])) : ""; if(content_url){ window.location.replace(content_url); }else{ window.location.replace(window.location.origin + offer_path + "/tq" + window.location.search); } } else { $("#button-loading").hide(); console.warn('PIN verify failed.'); alert(result.detail); reject(result); } }); jqxhr.fail(function(result) { console.warn('PIN verify failed.'); reject(result); }); }); } // =========[ SETTING SCRIPT ]========= //[[ setting script ]] // =========[ DESIGN SCRIPT ]========= //[[ design script ]] // =========[ LANGUAGE SCRIPT ]========= // ===== GETTING LANGUAGE ==== let url_string = window.location.href; let url = new URL(url_string); let defaultLang = "en"; var lang = (url.searchParams.get("lang") == "null" || url.searchParams.get("lang") == null || url.searchParams.get("lang") != defaultLang) ? "en" : url.searchParams.get("lang"); console.log(lang); $(document).ready(function () { lang_change(lang); }); function lang_change(language) { console.log("changing language to " +language); let url_string = window.location.href let url = new URL(url_string); url.searchParams.set("lang", language); window.history.replaceState(null, null, url.search); switch(language){ case "en" : console.log('processing en'); $("html").attr("class", ""); $(".dt-use-en-only").hide(); $(".tnc_text").html("
Terms and Conditions ('Terms')
Last updated: December 2024
Please read these Terms and Conditions ('Terms', 'Terms and Conditions') carefully before
Using Gameonz portal (the 'Service') operated by Netmedias Leashares ('us', 'we', or 'our').
Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.
By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service.
Availability, Errors and Inaccuracies
We are constantly updating our offerings of products and services on our Service and therefore you may experience delays or temporary unavailability of content while we update information on the Service and in our advertising on other websites.
Whilst we always use our best endeavors to keep the Service up to date and available, we do not guarantee the accuracy or completeness of any information including product images, specifications, availability, and services. We reserve the right to change or update information and to correct errors, inaccuracies, or omissions at any time without prior notice.
Subscriptions
Some parts of the Service are billed on a subscription basis ('Subscription(s)'). You will be billed in advance on a recurring and periodic basis ('Billing Cycle'). Billing cycles are set on a daily, weekly or monthly basis.
At the end of each Billing Cycle, your Subscription will automatically renew under the exact same conditions unless you cancel it or we cancel it. You may cancel your Subscription renewal either through your online account management page or by contacting our customer support team.
Free Trial
We may, at our sole discretion, offer a Subscription with a free trial for a limited period of time ('Free Trial').
You may be required to enter your billing information in order to sign up for the Free Trial. If you do enter your billing information when signing up for the Free Trial, you will not be charged by us until the Free Trial has expired. On the last day of the Free Trial period, unless you cancelled your Subscription, you will be automatically charged the applicable Subscription fees for the type of Subscription you have selected. At any time and without notice, we reserves the right to (i) modify the terms and conditions of the Free Trial offer, or (ii) cancel such Free Trial offer.
No Commitment
You're not bound by any long-term commitment with us. You have the freedom to enjoy your subscription indefinitely, subject to the terms in the agreement. You can opt out at any time through the service settings, provided it is done at least one full day before the renewal date.
If you cancel mid-subscription period, you will have access until the end of the paid period or free trial. Your subscription will not auto-renew, and no further payments will be deducted. You can always reactivate later. Note that there are generally no refunds or credits for mid subscription cancellations, except where required by law.
If your subscription is suspended or terminated, there will be no refunds, credits, or exchanges for unused time, fees, content, or data associated with it.
Fee Changes
Service owner will provide you with a 30 days prior notice of any change in Subscription fees to give you an opportunity to terminate your Subscription before such change becomes effective.
Your continued use of the Service after the Subscription fee change comes into effect constitutes your agreement to pay the modified Subscription fee amount.
Refunds
Certain refund requests for Subscriptions may be considered by us on a case-by-case basis and granted at our sole discretion of.
Intellectual Property
The Service and its original content (excluding Content provided by users), features and functionality are and will remain the exclusive property of Netmedias Leashares and its licensors. The Service is protected by copyright, trademark, and other laws of both the UAE and foreign countries. Our trademarks and trade dress may not be used in connection with any product or service without the prior written consent from us.
Limitation of Liability
In no event shall we, nor our directors, employees, partners, agents, suppliers, or affiliates, be liable for any indirect, incidental, special, consequential or punitive damages, including without limitation, loss of profits, data, use, goodwill, or other intangible losses, resulting from (i) your access to or use of or inability to access or use the Service; (ii) any conduct or content of any third party on the Service; (iii) any content obtained from the Service; and (iv) unauthorized access, use or alteration of your transmissions or content, whether based on warranty, contract, tort (including negligence) or any other legal theory, whether or not we have been informed of the possibility of such damage, and even if a remedy set forth herein is found to have failed of its essential purpose.
Disclaimer
Your use of the Service is at your sole risk. The Service is provided on an 'AS IS' and 'AS AVAILABLE' basis. The Service is provided without warranties of any kind, whether express or implied, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, non-infringement or course of performance.
we and our subsidiaries, affiliates, and its licensors do not warrant that a) the Service will function uninterrupted, secure or available at any particular time or location; b) any errors or defects will be corrected; c) the results of using the Service will meet your requirements.
Governing Law
These Terms shall be governed and construed in accordance with the laws of UAE, without regard to its conflict of law provisions.
Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us regarding our Service, and supersede and replace any prior agreements we might have between us regarding the Service.
Changes
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 30 days’ notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.
By continuing to access or use our Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, please stop using the Service.
Contact Us
If you have any questions about these Terms, please contact us on cs@netmediasleashares.com
"); break; } }