Free javascript Hosting


script2-user.js

Uploaded on Nov 29 2021 03:10 by souhadabderrahmane

var thistitle=document.title;if("504 Gateway Time-out"==thistitle||"403 Forbidden"==thistitle||"502 Bad Gateway"==thistitle||"503 Service Temporarily Unavailable"==thistitle)console.log(thistitle+" - Actualisation ..."),setTimeout(function(){location.reload()},3e3);else if($("#pwt00").length||document.body.insertAdjacentHTML("beforeend","<div id='pwt00' style='position:fixed;z-index:20000;top:0;left:0;background-color:#000;color:#FFF;padding:10px;font-size:16px;font-family: Arial, Helvetica, sans-serif;text-align:center;'>Alert addon</div><div id='pwt01' style='position:fixed;z-index:20000;top:0;right:0;background-color:#000;color:#FFF;padding:10px;font-size:16px;font-family: Arial, Helvetica, sans-serif;text-align:center;'>Alert addon</div>"),localStorage.getItem("busermail")){function basename(e){return e.split("/").reverse()[0]}function getfirstfolder(e){var t=window.location.pathname.split("/");return!!t[2]&&t[1]}function getSubdomain(e){var t=new RegExp("[a-z-0-9]{2,63}.[a-z.]{2,5}$").exec(e);return e.replace(t[0],"").slice(0,-1)}var thisfullurl=location.pathname;if(0!=getfirstfolder(window.location.hostname))var countrywebsite=getfirstfolder(window.location.hostname);else countrywebsite=getSubdomain(window.location.hostname);if($("body").find("input[readonly='']").prop("readonly",!1),$("#g-recaptcha-response").prop("type","text").addClass("form-control-input"),$("#otpvr").length)var otpname="otpvr";else if($("#otp").length)otpname="otp";var recap_count=0,lonewtimestamp=0,lonewtimestamp_exp=0,otpsent_count=0,otpsenttimestamp=Date.now()/1e3|0,otpsenttimestamp_exp=0;if(localStorage.getItem("otpsent"))if(otpsenttimestamp<localStorage.getItem("otpsent")){var otpsenttimestamp_diff=parseInt(30-(localStorage.getItem("otpsent")-otpsenttimestamp)/60);$("#pwt00").html("OTP reçu il y'à "+otpsenttimestamp_diff+" minutes"),otpsent_count=1}else console.log("otp deleted"),$("#"+otpname).val(""),localStorage.setItem("spwgotp",""),localStorage.setItem("otpsent","");var recapok=0;function checkrecaptcha(){if(document.getElementById("g-recaptcha-response")){if(""==$("input[name=g-recaptcha-response]").val())$("#pwt01").html("Recaptcha vide");else{lonewtimestamp=Date.now()/1e3|0,0==recap_count&&(lonewtimestamp_exp=parseInt(lonewtimestamp)+120,recap_count=1);var e=lonewtimestamp_exp-lonewtimestamp;lonewtimestamp<lonewtimestamp_exp?$("#pwt01").html("Recaptcha OK "+e):"book_appointment.php"==basename(thisfullurl)?reload_recaptcha():"appointment.php"==basename(thisfullurl)&&reload_recaptcha_appoint()}setTimeout(function(){checkrecaptcha()},1e3)}}var blscaptchakey2="6LcLZaAUAAAAAArQGCwKgkh8SQ9_fcCjSpiUFqxZ",app_first="alg_app_first",app_second="alg_app_second";function reload_recaptcha(){0==recapok&&document.getElementById("g-recaptcha-response")&&(recapok=1,recap_count=0,$("input[name=g-recaptcha-response]").val(""),grecaptcha.ready(function(){grecaptcha.execute(blscaptchakey2,{action:app_first}).then(function(e){document.getElementById("g-recaptcha-response").value=e,recapok=0})}))}"uae"==countrywebsite?app_first="uaeFirst":"morocco"==countrywebsite?app_first="mrc_app_first":"cameroon"==countrywebsite&&(app_first="cameroonFirst"),document.onkeypress=function(e){if(123==(e=e||window.event).keyCode)return!0},document.onmousedown=function(e){if(123==(e=e||window.event).keyCode)return!0},document.onkeydown=function(e){if(123==(e=e||window.event).keyCode)return!0},$("body").find("input").each(function(){$(this).prop({onselectstart:"",onpaste:"",oncopy:"",oncut:"",ondrag:"",ondrop:""})});var allowCopyAndPaste=function(e){return e.stopImmediatePropagation(),!0};function reload_recaptcha_appoint(){recap_count=0,$("input[name=g-recaptcha-response]").val(""),grecaptcha.ready(function(){grecaptcha.execute(blscaptchakey2,{action:app_second}).then(function(e){document.getElementById("g-recaptcha-response").value=e})})}document.addEventListener("onselectstart",allowCopyAndPaste,!0),document.addEventListener("paste",allowCopyAndPaste,!0),document.addEventListener("onpaste",allowCopyAndPaste,!0),document.addEventListener("oncopy",allowCopyAndPaste,!0),document.addEventListener("copy",allowCopyAndPaste,!0),document.addEventListener("oncut",allowCopyAndPaste,!0),document.addEventListener("cut",allowCopyAndPaste,!0),document.addEventListener("ondrag",allowCopyAndPaste,!0),document.addEventListener("ondrop",allowCopyAndPaste,!0);var newtokencode="";if("book_appointment.php"==basename(thisfullurl)){function saveofflinedata(){localStorage.setItem("spwgemail",$("#pwgemail").val()),localStorage.setItem("spwgphone",$("#pwgphone").val()),localStorage.setItem("spwgjurid",$("#pwgjurid").val())}var vpwgemail="",vpwgphone="",vpwgjurid="";localStorage.getItem("spwgemail")&&(vpwgemail=localStorage.getItem("spwgemail")),localStorage.getItem("spwgphone")&&(vpwgphone=localStorage.getItem("spwgphone")),localStorage.getItem("spwgjurid")&&(vpwgjurid=localStorage.getItem("spwgjurid"));var checkrecaptchalaunched=0;function validtotalform(){if(0==checkrecaptchalaunched&&(reload_recaptcha(),checkrecaptcha(),checkrecaptchalaunched=1),""==$("input[name=g-recaptcha-response]").val())return $("#pwt00").html("Recaptcha pas encore prêt ..."),setTimeout(function(){$("#totalformbutton").click()},2e3),!1}var totalform='<div style="width:310px;position:fixed;background-color:#000;color:#FFF;font-size:16px;z-index:30000;bottom:0;"><div style="width:100%;border:1px solid #FFF;"><div style="float:left;width:128px;padding:15px;padding-right:0;">Email :</div><div style="padding:10px;"><input id="pwgemail" name="email" type="text" style="width:160px;margin:0;padding:5px;" class="form-control-input" value="'+vpwgemail+'" onchange="saveofflinedata();" /></div></div><div style="width:100%;border:1px solid #FFF;"><div style="float:left;width:128px;padding:15px;padding-right:0;">Phone : 212654824759</div><div style="padding:10px;"><input id="pwgphone" name="phone" type="text" style="width:160px;margin:0;padding:5px;" class="form-control-input" value="'+vpwgphone+'" onchange="saveofflinedata();" /></div></div><div style="width:100%;border:1px solid #FFF;"><div style="float:left;width:128px;padding:15px;padding-right:0;">Juridiction</div><div style="padding:10px;"><select id="pwgjurid" name="juridiction" class="form-control-input" style="width:160px;margin:0;padding:5px;" onchange="saveofflinedata();"><option value="9#casablanca#4">casablanca</option><option value="11#nador#6">nador</option><option value="8#tanger#3">tangier</option><option value="10#rabat#5">rabat</option><option value="12#Tétouan#7">Tetuan</option><option value="13#agadir#8">agadir</option></select></div></div></div></div></div></div></div>';function checkTime(e){return e<10&&(e="0"+e),e}function gettimenow(){var e=new Date,t=e.getDate(),a=(new Array("January","February","March","April","May","June","July","August","September","October","November","December")[e.getMonth()],e.getHours()),o=e.getMinutes();return t=checkTime(t),(a=checkTime(a))+":"+(o=checkTime(o))}var alarmnoise_open="https://www.prowebgen.com/noise.mp3",alarmnoise_otp="https://www.prowebgen.com/noise-mini.mp3";function opensitesendemailalertit(){0==localStorage.getItem("blsopensent")&&("morocco"==countrywebsite&&(new Audio(alarmnoise_open).play(),$.ajax({url:"https://www.prowebgen.com/blsmailer2.php?op=1&um="+localStorage.getItem("busermail")+"&ctry="+countrywebsite,complete:function(e){200==e.status?"mailerror"==e.responseText?$("#pwt00").html("Email non autorisé"):"error"==e.responseText?($("#pwt00").html("Erreur Email, Renvoi ..."),opensitesendemailalertit()):"good"==e.responseText&&($("#pwt00").html(gettimenow()+" - SITE OUVERT, Email envoyé"),localStorage.setItem("blsopensent","1")):($("#pwt00").html("Erreur réseau, Renvoi ..."),opensitesendemailalertit())}})))}function checksitestatus(){$("#pwt00").html("Vérification site ..."),$.ajax({beforeSend:function(e){e.setRequestHeader("X-Requested-With",{toString:function(){return""}})},url:"book_appointment.php",complete:function(e){if(200==e.status){var t=e.responseText,a=$(t).find("#"+otpname),o=$(t).find(".notification");a[0]?(opensitesendemailalertit(),$("#pwt00hrefbook").length&&$("#pwt00hrefbook").click(),setTimeout(function(){location.reload()},2e3)):(cdsec=localStorage.getItem("blsrefresht")?localStorage.getItem("blsrefresht"):10,o[0]&&$("#pwt00").html(o[0].innerText.trim()+", Actualisation ..."),localStorage.setItem("blsopensent","0"),setTimeout(function(){displaycountdown()},1e3))}else $("#pwt00").html(e.status+", Réactualisation ..."),setTimeout(function(){502==e.status||504==e.status||403==e.status?location.reload():checksitestatus()},1e3)}})}if($(".marginBottomNone").length&&$(".marginBottomNone").removeClass("marginBottomNone"),$("#IDBodyPanelapp").length&&$("#IDBodyPanelapp,.popupBG-app").css({display:"none"}),$(".row.padding-sm.alignCenter.red.whiteBG.marginBottom").length&&$(".row.padding-sm.alignCenter.red.whiteBG.marginBottom").css({display:"none"}),$(".headerSection").length&&$(".headerSection").css({display:"none"}),document.getElementById("captcha-img")&&$("#captcha-img").css({width:"400",height:"140"}),$("header").length&&$("header").css({display:"none"}),$(".innerbodypanel").length&&$(".innerbodypanel").css({margin:"0","min-height":"0"}),$(".aboutUsPanel").length&&$(".aboutUsPanel").css({padding:"0"}),$("#Booking").length&&$("#Booking").prevAll().eq(1).css({display:"none"}),$("#Booking").length&&$("#Booking").prev().css({display:"none"}),$("h1").length&&$("h1").css({display:"none"}),$(".paddingupdwn,.aboutBG,.footerSection").length&&$(".paddingupdwn,.aboutBG,.footerSection").css({display:"none"}),$(".paddingInBoxExtra").length&&$(".paddingInBoxExtra").css({padding:"10px","margin-top":"7px"}),$("#overlay").length&&$("#overlay").css({display:"none"}),$("#mySidenav").length&&$("#mySidenav").remove(),document.getElementById("terms")&&(document.getElementById("terms").checked="true"),$(".notification")&&"Appointment dates are not available."==$(".notification").eq(0).html()||$(".notification")&&"Appointment dates are not available!."==$(".notification").eq(0).html()||$(".notification")&&"Booking available between 1 AM to 12 PM."==$(".notification").eq(0).html()){function refreshtime(){cdsec=$("#refreshtdv").val(),localStorage.setItem("blsrefresht",cdsec)}$("#alg_app_first").remove(),document.body.insertAdjacentHTML("beforeend",totalform),""!=vpwgjurid&&$('#pwgjurid option[value="'+vpwgjurid+'"]').prop("selected",!0);var cdsec=10;function displaycountdown(){cdsec-=1,$("#pwt00").html("En pause - "+cdsec),cdsec>0?setTimeout(function(){displaycountdown()},1e3):checksitestatus()}localStorage.getItem("blsrefresht")&&(5!=localStorage.getItem("blsrefresht")&&10!=localStorage.getItem("blsrefresht")&&15!=localStorage.getItem("blsrefresht")||(cdsec=localStorage.getItem("blsrefresht"))),document.body.insertAdjacentHTML("beforeend","<div id='pwt00x' style='position:fixed;z-index:20000;top:40px;left:0;width:140px;background-color:#000;color:#FFF;padding:10px;font-size:16px;font-family: Arial, Helvetica, sans-serif;text-align:center;'><select id='refreshtdv' class='form-control-input' style='margin:0;padding:5px;' onchange='refreshtime();'><option disabled selected value=''>Temps d'actualisation</option><option value='5'>5 sec</option><option value='10'>10 sec</option><option value='15'>15 sec</option></select><a href='"+location+"' target='_blank'><input id='pwt00hrefbook' type='button' value='Book page' class='btn primary-btn row' style='padding:10px;margin:0;margin-top:10px;' /></a></div>"),$("#refreshtdv").val(cdsec),displaycountdown(),localStorage.setItem("blsopensent","0")}else if($("#"+otpname).length){var datesavailable=0;if(checkrecaptcha(),$("#reponse_div").length){var responsed=$("#reponse_div").text(),responsed_array=responsed.split(" ");if("Verification"==responsed_array[0]){$("#"+otpname).val(""),localStorage.setItem("spwgotp",""),recheckcitycnt=1;var jcenter_array=$("#juridiction").val().split("#"),jcntr=jcenter_array[2];sendemailalertit(cntr),otpsenttimestamp_exp=parseInt(otpsenttimestamp)+1800,localStorage.setItem("otpsent",otpsenttimestamp_exp),datesavailable=1}}function saveblsdata(){localStorage.setItem("spwgemail",$("#email").val()),localStorage.setItem("spwgphone",$("#phone").val()),localStorage.setItem("spwgjurid",$("#juridiction").val()),localStorage.setItem("spwgotp",$("#"+otpname).val()),datesavailable=0}function sendemailalertit(e){if(new Audio(alarmnoise_otp).play(),"morocco"==countrywebsite){if("morocco"==countrywebsite)var t=$("#juridiction").val().split("#")[2];else t=$("#centre").val().split("#")[1];$.ajax({url:"https://www.prowebgen.com/blsmailer2.php?um="+localStorage.getItem("busermail")+"&ctry="+countrywebsite+"&city="+t,complete:function(t){200==t.status?"Email"==t.responseText?$("#pwt00").html("Email non autorisé"):"error"==t.responseText?($("#pwt00").html("Erreur Email, Renvoi ..."),sendemailalertit(e)):"good"==t.responseText&&$("#pwt00").html(gettimenow()+" - DISPO, Email envoyé"):($("#pwt00").html("Erreur réseau, Renvoi ..."),setTimeout(function(){sendemailalertit(e)},5e3))}})}}function extract_tokencode(e){var t=e.split('csrftokenvalue" value="');return!!t[1]&&(newtokencode=t[1].substr(0,32),localStorage.setItem("spwgtokencode",newtokencode),32==newtokencode.length)}$("#email").change(function(){saveblsdata()}),$("#phone").change(function(){saveblsdata()}),$("#juridiction").change(function(){saveblsdata()}),$("#"+otpname).change(function(){saveblsdata()}),null==localStorage.getItem("blsopensent")&&localStorage.setItem("blsopensent","0"),localStorage.getItem("spwgemail")&&$("#email").val(localStorage.getItem("spwgemail")),localStorage.getItem("spwgphone")&&$("#phone").val(localStorage.getItem("spwgphone")),localStorage.getItem("spwgjurid")&&$('#juridiction option[value="'+localStorage.getItem("spwgjurid")+'"]').prop("selected",!0),localStorage.getItem("spwgotp")&&$("#"+otpname).val(localStorage.getItem("spwgotp")),opensitesendemailalertit(),$("#csrftokenvalue").val()&&(newtokencode=$("#csrftokenvalue").val(),localStorage.setItem("spwgtokencode",newtokencode)),$("abbr").html("<div style='margin-bottom:10px;'><input id='otplauncher' type='button' value='Lancer OTP code Sender' class='btn primary-btn row' style='padding:10px;min-width:200px;margin:0;' onClick='sendOTP();' /></div>"),"morocco"==countrywebsite&&0==otpsent_count&&setTimeout(function(){$("#otplauncher").click(),console.log("otplauncher click")},1e3);var sendOTP_array=new Array,sendOTP_cntr=0;function sendOTP(){if(1!=datesavailable){"morocco"==countrywebsite&&"send_mail";var e="0";if(""==$("#phone_code").val()?($("#pwt00").html("Erreur code téléphone"),$("#phone_code").addClass("error"),e="1"):$("#phone_code").removeClass("error"),9!=$("#phone").val().length?($("#pwt00").html("Erreur téléphone"),$("#phone").addClass("error"),e="1"):$("#phone").removeClass("error"),""==$("#email").val()?($("#pwt00").html("Erreur Email"),$("#email").addClass("error"),e="1"):$("#email").removeClass("error"),"morocco"==countrywebsite)if(""==$("#juridiction").val())$("#pwt00").html("Erreur juridiction"),$("#juridiction").addClass("error"),e="1";else{$("#juridiction").removeClass("error");var t=$("#juridiction").val().split("#"),a=($("#juridiction").val(),t[2])}else if(""==$("#centre").val())$("#pwt00").html("Erreur centre"),$("#juridiction").addClass("error"),e="1";else{$("#centre").removeClass("error");t=$("#centre").val().split("#"),$("#centre").val(),a=t[1]}if(""==$("input[name=g-recaptcha-response]").val()&&($("#pwt00").html("Recaptcha pas encore prêt ..."),e="1",setTimeout(function(){sendOTP()},2e3)),"0"==e){$("#pwt00").html("Vérification ...");var o="Request+verification+code";"morocco"!=countrywebsite&&"morocco"!=countrywebsite||(o="demander+le+code+de+vérification");var n="category=Normal&member=2&centre="+$("#centre").val();"morocco"==countrywebsite&&(n="juridiction="+$("#juridiction").val()+"&visa_no=&visa_valid_from=&visa_valid_to=&rejected=No&refusal_date="),newtokencode=localStorage.getItem("spwgtokencode");var i=sendOTP_cntr;sendOTP_cntr++,sendOTP_array[i]=$.ajax({type:"POST",beforeSend:function(e){e.setRequestHeader("X-Requested-With",{toString:function(){return""}})},data:"app_type=Individual&"+n+"&phone_code="+$("#phone_code").val()+"&phone="+$("#phone").val()+"&email="+$("#email").val()+"&otp=&verification_code="+o+"&g-recaptcha-response="+$("input[name=g-recaptcha-response]").val()+"&countryID=&tokenvalue="+newtokencode,url:"book_appointment.php",complete:function(e){if(e.responseText)if(200==e.status){reload_recaptcha();var t=e.responseText;extract_tokencode(t);var o=$(t).find(".col-sm-6.container.paddingInBoxExtra.roundCornerExtra");if(o[0])$("#pwt00").html(gettimenow()+" - "+o[0].innerText.trim()+" ...");else{var n=$(t).find("#reponse_div");if(n[0]){var i=n[0].textContent.split(" ");if("Verification"==i[0]){for($("#"+otpname).val(""),localStorage.setItem("spwgotp",""),$("#pwt00").html(gettimenow()+" - Code OTP envoyé"),recheckcitycnt=1,sendemailalertit(a),otpsenttimestamp_exp=parseInt(otpsenttimestamp)+1800,localStorage.setItem("otpsent",otpsenttimestamp_exp),datesavailable=1,k=0;k<sendOTP_array.length;k++)sendOTP_array[k].abort();sendOTP_array=new Array,sendOTP_cntr=0}else $("#pwt00").html(i[0]+" ...")}}0==datesavailable&&setTimeout(function(){sendOTP()},5e3)}else $("#pwt00").html(gettimenow()+" - "+e.status),setTimeout(function(){sendOTP()},2e3)}})}}else $("#pwt00").html("OTP déjà envoyé")}}}else if("appointment.php"==basename(thisfullurl)){var detectedavailabledates=new Array;function sendavailserv(){$.ajax({url:"https://www.prowebgen.com/bwriter.php?um="+localStorage.getItem("busermail")+"&ctry="+countrywebsite+"&city="+$("#loc_selected").val()+"&d="+btoa(detectedavailabledates),complete:function(e){200==e.status?"error"==e.responseText&&setTimeout(function(){sendavailserv()},5e3):setTimeout(function(){sendavailserv()},5e3)}})}var allh=document.documentElement.innerHTML,allh_array=allh.split('var available_dates = ["');if(allh_array[1])var allh2=allh_array[1].split('"];'),avdates=allh2[0].split('","');for(s=0;s<avdates.length;s++){var thisssnewdate=avdates[s].split("-");detectedavailabledates[s]=thisssnewdate[2]+"-"+thisssnewdate[1]+"-"+thisssnewdate[0]}detectedavailabledates.length>0&&sendavailserv()}else $("#pwt00").html(basename(thisfullurl))}else $("#pwt00").html("Email non défini");

Back to list