logo © Copyright 2023 Ampliz Pvt. Ltd.
", strArray); strstr = strArray[1].toLowerCase(); emailarray = ["hotmail.com", "yahoo.com", "mailinator.com", "gmail.co.in", "yahoo.co", "aol.com", "yandex.com", "msn.com", "gawab.com", "inbox.com", "gmx.com", "rediffmail.com", "in.com", "live.com", "hotmail.co.uk", "hotmail.fr", "yahoo.fr", "wanadoo.fr", "wanadoo.fr", "comcast.net", "yahoo.co.uk", "yahoo.com.br", "yahoo.co.in", "rediffmail.com", "free.fr", "gmx.de", "gmx.de", "yandex.ru", "ymail.com", "libero.it", "outlook.com", "uol.com.br", "bol.com.br", "mail.ru", "cox.net", "hotmail.it", "sbcglobal.net", "sfr.fr", "live.fr", "verizon.net", "live.co.uk", "googlemail.com", "yahoo.es", "ig.com.br", "live.nl", "bigpond.com", "terra.com.br", "yahoo.it", "neuf.fr", "yahoo.de", "live.com", "yahoo.de", "rocketmail.com", "att.net", "laposte.net", "facebook.com", "bellsouth.net", "yahoo.in", "hotmail.es", "charter.net", "yahoo.ca", "yahoo.com.html", "rambler.ru", "hotmail.de", "tiscali.it", "shaw.ca", "yahoo.co.jp", "sky.com", "earthlink.net", "optonline.net", "freenet.de", "t-online.de", "aliceadsl.fr", "virgilio.it", "home.nl", "qq.com", "telenet.be", "me.com", "yahoo.com.ar", "tiscali.co.uk", "yahoo.com.mx", "gmx.net", "mail.com", "planet.nl", "tin.it", "live.it", "ntlworld.com", "arcor.de", "yahoo.co.id", "frontiernet.net", "hetnet.nl", "live.com.html", "yahoo.com.sg", "zonnet.nl", "club-internet.fr", "juno.com", "optusnet.com.html", "blueyonder.co.uk", "bluewin.ch", "skynet.be", "sympatico.ca", "windstream.net", "mac.com", "centurytel.net", "chello.nl", "live.ca", "aim.com", "bigpond.net.html" ] if (emailarray.includes(strstr)) { $("#businessmailerror").show(); $("#inv-feed").hide(); $("#namerror").hide(); } else { $("#businessmailerror").hide(); } //console.log("-=-###=-", email) $('.msg').hide(); $('.success').show(); } else { if (email == "") { //console.log("am here email empty") $("#inv-feed").show(); $('.msg').hide(); $('.error').hide(); } else { //console.log("-=-=-", email) $('.msg').hide(); $('.error').show(); $("#inv-feed").hide(); $("#namerror").hide(); $("#businessmailerror").hide(); } } // }); } // $("#signup").submit(function(event){ // event.preventDefault(); //prevent default action // var post_url = $(this).attr("action"); //get form action url // var request_method = $(this).attr("method"); //get form GET/POST method // var form_data = $(this).serialize(); //Encode form elements for submission // console.log(form_data) // $.ajax({ // url : post_url, // type: request_method, // data : form_data // }).done(function(response){ // // $("#server-results").html(response); // }); // }); --> ", strArray); strstr = strArray[1].toLowerCase(); emailarray = ["hotmail.com", "yahoo.com", "mailinator.com", "gmail.co.in", "yahoo.co", "aol.com", "yandex.com", "msn.com", "gawab.com", "inbox.com", "gmx.com", "rediffmail.com", "in.com", "live.com", "hotmail.co.uk", "hotmail.fr", "yahoo.fr", "wanadoo.fr", "wanadoo.fr", "comcast.net", "yahoo.co.uk", "yahoo.com.br", "yahoo.co.in", "rediffmail.com", "free.fr", "gmx.de", "gmx.de", "yandex.ru", "ymail.com", "libero.it", "outlook.com", "uol.com.br", "bol.com.br", "mail.ru", "cox.net", "hotmail.it", "sbcglobal.net", "sfr.fr", "live.fr", "verizon.net", "live.co.uk", "googlemail.com", "yahoo.es", "ig.com.br", "live.nl", "bigpond.com", "terra.com.br", "yahoo.it", "neuf.fr", "yahoo.de", "live.com", "yahoo.de", "rocketmail.com", "att.net", "laposte.net", "facebook.com", "bellsouth.net", "yahoo.in", "hotmail.es", "charter.net", "yahoo.ca", "yahoo.com.html", "rambler.ru", "hotmail.de", "tiscali.it", "shaw.ca", "yahoo.co.jp", "sky.com", "earthlink.net", "optonline.net", "freenet.de", "t-online.de", "aliceadsl.fr", "virgilio.it", "home.nl", "qq.com", "telenet.be", "me.com", "yahoo.com.ar", "tiscali.co.uk", "yahoo.com.mx", "gmx.net", "mail.com", "planet.nl", "tin.it", "live.it", "ntlworld.com", "arcor.de", "yahoo.co.id", "frontiernet.net", "hetnet.nl", "live.com.html", "yahoo.com.sg", "zonnet.nl", "club-internet.fr", "juno.com", "optusnet.com.html", "blueyonder.co.uk", "bluewin.ch", "skynet.be", "sympatico.ca", "windstream.net", "mac.com", "centurytel.net", "chello.nl", "live.ca", "aim.com", "bigpond.net.html" ] if (emailarray.includes(strstr)) { // $("#businessmailerror").show(); } else { var name = $('#contact_name').val(); re = /^[0-9a-zA-Z ]+$/; if (name != "") { if (!re.test(name)) { $("#namerror").show(); } else { $("#namerror").hide(); } } if (email !== '' && contact_name !== '' && contact_company !== '' && contact_role !== '' && contact_sales !== '' && contact_dataset !== '' && contact_password !== '' && re.test(name)) { $("#ver_btn").html('Processing..'); localStorage.setItem("email", email); $("#namerror").hide(); var myDate = new Date(); myDate.setMonth(myDate.getMonth() + 12); var domainName = window.location.hostname; // console.log(myDate) domainName = domainName.substring(domainName.indexOf('.') + 1); //dev // document.cookie = 'email = ' + email + '; expires=' + myDate + '; path=/'; //prod document.cookie = 'email = ' + email + '; expires=' + myDate + '; path=/;SameSite=Strict;secure;domain=.' + domainName; // page_track("abc"); $.ajax({ url: "https://go.ampliz.com/ADB/api/signupuser", // url: "http://10.10.25.97:443/ADB/api/signupuser", headers: { "accept": "application/json", }, data: { "email": email, "fullname": contact_name, "company_name": contact_company, "country_name": countryName, "country_code": country_code, "phone": contact_phone, "role": contact_role, "no_of_sales_people_at_company": contact_sales, "dataset" : contact_dataset, "password": contact_password }, type: "POST", success: function(data) { //console.log(data) $("#errormsg1").hide(); $("#successverify").show(); $("#successmsg").text(data.msg); // $("#signup")[0].reset(); $('#loadingmessage').hide(); // show the loading message. // var user_id = localStorage.setItem("user_id", data.user_id); var myDate = new Date(); var domainName = window.location.hostname; // console.log(myDate) domainName = domainName.substring(domainName.indexOf('.') + 1); myDate.setMonth(myDate.getMonth() + 12); // alert(data.user_id); //dev // document.cookie = 'usid=' + data.user_id + ';expires=' + myDate + ';path=/;'; //prod document.cookie = 'usid=' + data.user_id + ';expires=' + myDate + ';path=/;domain=.' + domainName; //dev // document.cookie = 'email_id='+ email +'; expires='+ myDate +'; path=/'; //prod document.cookie = 'email_id='+ email +'; expires='+ myDate +'; path=/; domain=.' + domainName; var base_url = 'index.html' // document.cookie = 'user_id = ' + data.user_id + '; expires='+ myDate +'; path=/'; //dev // document.cookie = 'amp_u=3;expires='+ myDate +'; path=/;' ; //prod document.cookie = 'amp_u=1;expires='+ myDate +'; path=/; domain=.' +domainName; if(!(JSON.parse(localStorage.getItem("vi")))){ } else{ page_track(data.user_id); } window.location.href = base_url+"verify"; $("#error_alert").hide(); // window.location.replace("/verify.php"); // window.location.replace("/verify.php"); removsccs(); }, error: function(xhr, textStatus, error) { $("#ver_btn").html('Complete Sign Up'); $("#error_alert").show(); var json = JSON.parse(xhr.responseText); $('#loadingmessage').hide(); // hide the loading message. //console.log(xhr.responseJSON.msg); $("#successmsg").hide(); $("#errormsg1").show(); if (xhr.responseJSON.msg == "Email already registered, please login") { //console.log("already registered am here") $("#verifymsg").hide(); $('html, body').animate({ scrollTop: 0 }, 100); $("#loginmsg").show(); } if (!xhr.responseJSON.isEmailVerified) { // alert(xhr.responseJSON.msg) if (xhr.responseJSON.msg == "Email already registered,but email not yet verified, please verify the email") { //console.log("already registered anot verified") var user_id = localStorage.setItem("user_id", xhr.responseJSON.user_id); $("#verifymsg").show(); $('html, body').animate({ scrollTop: 0 }, 100); $("#loginmsg").hide(); } if (xhr.responseJSON.msg == "Please provide valid email") { } else { } } $("#errormsg1").text(json.msg); // $("#signup")[0].reset(); removeerr(); } }); } else { $("#successmsg").hide(); $("#errormsg").show(); $("#errormsg").html("Enter valid email id"); removeerr(); } } } } function page_track(userid){ console.log("abc"); var get_uuid = getCookie('ampliz_uid'); var view_t = getCookie("v_n"); var data = localStorage.getItem('vi'); var myJsonString = JSON.parse(data); var len = parseInt(JSON.parse(localStorage.getItem("vi")).length)-1; var ref_url = window.location.href; // console.log(document.referrer); // console.log(myJsonString[len]); var dt = new Date().getTime(); var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = (dt + Math.random() * 16) % 16 | 0; dt = Math.floor(dt / 16); return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16); }); var finaldata = { 'id': uuid, 'url': ref_url, 'utm_medium': "directory", 'utm_src': "directory", "timestamp": new Date().getTime() }; var header = { "accept": "application/json", "Content-Type": "application/json" }; myjson_data = JSON.stringify({ "uuid": get_uuid, "user_id": userid, "viewed_items": finaldata, "view_limit": parseInt(view_t), "user_type": "3" }); var myDate = new Date(); var domainName = window.location.hostname; // console.log(myDate) domainName = domainName.substring(domainName.indexOf('.') + 1); myDate.setMonth(myDate.getMonth() + 12); // document.cookie = 'amp_u=3;expires='+ myDate +'; path=/'; //prod document.cookie = 'amp_u=3;expires='+ myDate +'; path=/; domain=.' + domainName; $.ajax({ url: "https://go.ampliz.com/ADB/api/page-tracking", // url: "http://10.10.25.97:443/ADB/api/page-tracking", headers: header, data: myjson_data, type: "POST", success: function(data) { }, error: function(xhr, textStatus, error) { // var json = JSON.parse(xhr.responseText); } }); } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } -->