// =========[ 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 = "mondiamedia"; window.sc = "1741"; window.kw = "md"; 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 transaction_id = url.searchParams.get("t_id"); var tracking_id = url.searchParams.get("tracking_id"); var lang = url.searchParams.get("lang"); let offer_path = window.location.pathname; console.log("processing ooredoo"); pinData = { tracking_id: tracking_id, msisdn: msisdn, lang: lang }; console.log(pinData); let jqxhr = $.ajax({ type: "GET", url: "https://prod.gateway.puretechglobal.net/sms_api_hub_process/pin_request/mondiamedia/all", data: pinData }); return new Promise((resolve, reject) => { jqxhr.done(function(result) { console.log(result); if(result.result == "SUCCESS") { resolve(result); if (result.redirect_url){ $("#button-loading").show(); $("#button").addClass("disabled_btn").prop("disabled", true); $(".button").css("background", "#858585"); location.href = result.redirect_url; }else{ window.location.replace(window.location.origin + offer_path + "/pin/" + telco + window.location.search + "&msisdn=" + msisdn ); } } }); jqxhr.fail(function(result) { console.warn('PIN request failed.'); reject(result); }); }); } function submit_verify_etisalat(){ let pin_code = $("#pin").val(); let url_string = window.location.href let url = new URL(url_string); var transaction_id = url.searchParams.get("t_id"); var tracking_id = url.searchParams.get("tracking_id"); var lang = url.searchParams.get("lang"); 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, lang: lang }; let jqxhr = $.ajax({ type: "GET", url: "https://prod.gateway.puretechglobal.net/sms_api_hub_process/pin_verify/mondiamedia/all", data: pinData }); return new Promise((resolve, reject) => { jqxhr.done(function(result) { console.log(result); if(result.result == "SUCCESS") { console.log(result); console.log(result.redirect_url); resolve(result); if(result.redirect_url){ window.location.replace(result.redirect_url); }else{ window.location.replace(window.location.origin + offer_path + "/tq" + window.location.search); } } else { console.warn('PIN verify failed.'); console.log(result.pin_ver_response); let responsestring = result.pin_ver_response.includes("INSUFFICIENT_FUNDS"); if(responsestring == true){ $(".txt_insufficient_balance").show(); $("#txt_pin_verify_error").remove(); } else{ $(".txt_insufficient_balance").hide(); } 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("
Privacy Policy
At Netmedias Leashares, Gameonz, we value your privacy and are committed to protecting your personal information. This Privacy Policy outlines how we collect, use, and share your information when you subscribe to our service. By subscribing to our service, you consent to the practices described in this policy. Please read this policy carefully to understand how we handle your information.
1. Information We Collect
When you use our service, we may collect the following types of information:
a. Personal Information: Subscription Data: When you subscribe to our service, we collect your mobile phone number and any other necessary billing details. These details help us process your subscription and maintain accurate records.
Age Verification: To comply with age restrictions, we may collect information to ensure that you are over 18 years of age or have permission from a parent or guardian if you are under 18.
b. Technical Information: Device and Network Information: When you access our portal, we may collect details about your device, such as your IP address, browser type, and mobile network information. Usage Data: We track how you use our service, including browsing activities, page interactions, and the content you access.
2. How We Use Your Information
We use the collected information for the following purposes:
Service Provision and Maintenance: To process your subscription, including automatic renewal unless you choose to unsubscribe. To send you and renewal alerts via SMS.
Communication: To send you important service-related updates, such as subscription, renewals. To respond to any feedback or inquiries you submit via cs@netmediasleashares.com
Improvement of Services: To analyze how users interact with our service so that we can improve the platform, including the user interface, content offerings, and overall performance.
Compliance with Legal Obligations: We may use your personal information to comply with applicable laws, regulations, and legal processes.
3. Cookies and Tracking Technologies
We may use cookies and similar tracking technologies to enhance your experience on our portal. Cookies are small data files stored on your device that allow us to:
Remember your preferences, such as language settings (the portal is in English). Track usage patterns and improve service performance. You can manage your cookie preferences through your browser settings, but disabling cookies may affect your ability to use some features of the service.
4. Data Sharing and Disclosure
We do not sell or rent your personal information to third parties. However, we may share your information in the following scenarios:
Legal Compliance: We may disclose your information if required to do so by law or in response to valid legal requests from government authorities.
Data Security We implement appropriate technical and organizational measures to protect your personal information from unauthorized access, disclosure, alteration, or destruction. However, no method of data transmission or storage is completely secure, and we cannot guarantee the absolute security of your information.
5. Retention of Your Information
We will retain your personal information for as long as necessary to fulfill the purposes outlined in this policy. This may include retaining your data to comply with legal obligations, resolve disputes, and enforce our agreements.
6. Children’s Privacy
Our service is intended for users who are at least 18 years old or who have obtained parental consent. We do not knowingly collect personal information from children under 18. If we become aware that we have inadvertently collected personal data from a child without consent, we will take steps to delete that information.
7. Data Usage and Charges
Please note that standard data charges may apply when browsing or downloading content from our portal if you are not using a data bundle. It is your responsibility to manage your data usage according to your mobile plan.
8. International Data Transfers
We operate globally, and your information may be transferred to and processed in countries outside your own. We ensure that any data transfers comply with applicable privacy laws and that your data is protected by adequate safeguards.
9. Changes to This Privacy Policy
We may update this Privacy Policy from time to time to reflect changes in our practices or relevant legal requirements. We will notify you of any significant changes by posting a notice on our portal or sending an SMS alert. Your continued use of the service after such changes constitutes acceptance of the revised policy.
10. Contact Us
If you have any questions, concerns, or feedback regarding this Privacy Policy or our data handling practices, please contact us at cs@netmediasleashares.com
By using our service, you acknowledge that you have read and understood this Privacy Policy and agree to the collection, use, and disclosure of your personal information as described herein.