// JavaScript Document C:\w3\systemboost.immobilier\pop.js.php //alert('line 2 C:/Users/michelb/AppData/Local/Temp/fz3temp-2/pop.js.php'); try{ //$jigpopLine=2;index=1; //if(!msgAll) var msgAll,msgAllDiv,jsscriptFile,jsscriptCmd,$jigpopLine,jsscriptTest,$jscatch ,__jojpopInitAllCondition,$jigpopNoDebug_CmdTextareaLSall; //if(!jsscriptFile) $jigpopLine=4;jsscriptFile='./pop.js.php'; //if(!jsscriptCmd) //var jsscriptCmd=''; //if(!jigpopLine) //if(!jsscriptTest) //var jsscriptTest=0; //var $jscatch; //var __jojpopInitAllCondition=1;//§\warning: à quoi ça sert ?? //if(!__popDevIT) var __popDevIT,__popbaseUrl,__poplocalhost,__popdirname,__popsitename,__popsitename2points ,__popfile,__popparams,__popBarTop,__popLang,__popjs,__jojpopInitAllCondition; //===== __jojpopInitAllCondition=1; __popBarTop=document.title;__popLang=`fr-FR`; if(0)alert('__popLang= '+__popLang); //===== //var __poplocalhost; __popbaseUrl=window.location.origin; // baseUrl= http://127.0.0.1 par exemple "http://localhost:3000"const imageUrl=`${baseUrl}/images/logo.png`; //x=__popbaseUrl.split(`\/\/127.0.0.1`);//x=x[1]; let x=(__popbaseUrl+1).split(`\/\/127.0.0.1`);//x=x[1]; __poplocalhost=parseInt(x[1]?1:0);// en javascript //===== //__popBarTop=document.title;//=`titleIHM`; /* popreplaceall=function(text,src,dest){ $jigpopLine=14; //try{$jigpopLine=2; //var tagfct={kjsfile:script_debug,kjsfct:'myDebug.replaceall=function(text,src,dest)',kjsstop:debug_stop}; if(!text||text==''||typeof text!=='string')return(text); let re=new RegExp();//re=/,/g;text.replace(re,dest); let nbsp=`\ \;`; switch(src){ case '\n':re=/\n/g;break; case '/!':re=/\/!/g;break; case 'wyz':re=/wyz/g;break; case `${nbsp}`:re=/ /g;break; default: //if(text=='myApp.konclick=0.paper.0.0.div'||text=='get_boot_cfg_jsph0')return(text); for(let i=0;i<100;i++){ text=text.replace(src,dest); if(text.search(src)<0)break; } return(text); } return(text.replace(re,dest)); //}catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c myDebug.replaceall=function(text,src,dest) */ //===================================== function popjsExistsFunction(string,display){ if(!__poplocalhost)return; if(!string||!display)return; let msg; //==== if(window.parent[string] && typeof window.parent[string] === 'function') { //window.parent.toto[string];//("2025"); msg={owner:window,page:`parent`,functname:string,target:window[string]}; } if (window.parent && window.parent !== window && typeof window.parent[string] === 'function') { //window.parent.toto[string];//("2025"); msg={owner:window.parent,page:`iframe`,functname:string,target:window.parent[string]}; } //==== if(0&&__poplocalhost&&msg&&display){ //if($x&&$x.owner) alert( `------- function ${string}() : -------\n` +`\n msg.functname= --> `+string +`\n msg.owner --> `+msg.owner +`\n msg.target= --> code of function ${string}()` //`+msg.target //+`\n msg.target= --> `+typeof msg.target +`\n\n content of Object.entries(msg) --> \n`+Object.entries(msg) ); } //==== /* let parent=window.parent; if (parent && parent !== window && typeof parent[string] === 'function') { //if (window.parent && window.parent !== window && typeof window.parent[string] === 'function') { //window.parent.toto[string];//("2025"); return({parent:parent,function:parent[string]}); } return({parent:null}); */ } //===================================== function popjsSiteAlert(msg){// __popDevIT=null if(!__poplocalhost) alert(msg); else alert(`popjsSiteAlert(msg): \n`+msg); } //===================================== function popjsdevAlert(msg,head,script){// __popDevIT=null if(!__poplocalhost||!msg)return; head=(!head?`devAlert`:head); script=(!script?`js`:script); if(!head)if(!__popDevIT||!jsscriptTest)return; let cmd=(!jsscriptCmd?``:`/cmd:${jsscriptCmd}`); //==== let br,brT=`\n`,brH=``; if(head==`alert`)br=brT;//`\n`; else if(head=='div'){br=brH;head='div.debug.INIT';};//br=``; //==== if(!br)br=brT; msg =`------- ${head} in : -------${br} Script ${jsscriptFile} \/ ${$jigpopLine} \/ ${cmd} \/ ${script} : ${br} ${msg}`; if(head=='div'){ // if(!__jojpopInitAllCondition.__jokvpopSetDevAlert)return; if(!__jojpopInitAllCondition)return; // head='div.debug.INIT'; msgAll=msg;//`------- ${head} in : -------\n Script ${jsscriptFile}/${$jigpopLine}${cmd} : \n ${msg}`; } else popjsSiteAlert(msg);//al ert(msg);//`------- ${head} in : -------\n Script ${jsscriptFile}/${$jigpopLine}${cmd} : \n ${msg}`); } //===================================== function popjsAlertError(e,index,line,cmd) { //function alertError(e,line,fct) { //js$Obj$KV$FS$FilesOfSite=FilesOfFunctions if(!__popjs)__popjs={file:null,previous:null,line:line}; cmd=(!cmd?``:cmd); __popjs.error=`0790 ${e}`; __popjs.file=jsscriptFile;//`fct_file`;//(js$Obj$KV$FS$FilesOfSite?js$Obj$KV$FS$FilesOfSite.f1:`not js$Obj$KV$FS$FilesOfSite.f1`); __popjs.cmd=cmd; __popjs.previous=`fct_previous`;//(js$Obj$KV$FS$FilesOfSite?js$Obj$KV$FS$FilesOfSite.previous:`not js$Obj$KV$FS$FilesOfSite.previous`); //js$Obj$KV$FS$FilesOfSite.index=index; //index=0; //hereError="------- Error in : -------\n error= "+e;hereLine="line: "+__popjs.line+"/"+__popjs.file; //properties=" islocalhost="+"jsheadCodeHTML.islocalhost "; // al ert(hereError+"\n"+hereLine+"\n"+fct.name+"\n"+js.fct+"\n"+js$Obj$KV$FS$FilesOfSite.index+"\n"+fct_file+"\n"+fct_previous); // al ert(hereError+"\n"+hereLine+"/"+__popjs.file+"\n"+index+"\n"+__popjs.file+"\n"+__popjs.previous); jsscriptTest=index;$jigpopLine=line; if($jscatch)$jscatch='catch:'; let msg=`${$jscatch} ${__popjs.error}\n`;$jscatch=null; /* $x=popjsExistsFunction(`popjsdevAlert`); if($x&&$x.parent)alert(`popjsdevAlert existe= `+$x); */ popjsdevAlert(msg,`Error`); } //===================================== function popjsGetURLparts(popactionpage){ /* alert('ici'); $x=popjsExistsFunction(`popjsdevAlert`); if($x&&$x.owner)alert(`popjsdevAlert existe $x.owner= `+$x.owner +`\n $x.target= `+typeof $x.target +`\n Object.entries($x)= `+Object.entries($x) ); */ popjsExistsFunction(`popjsdevAlert`,1); $jigpopLine=60; if(!popactionpage)popactionpage=`html`;// si popactionpage= /* __popbaseUrl=window.location.origin; // baseUrl= http://127.0.0.1 par exemple "http://localhost:3000"const imageUrl=`${baseUrl}/images/logo.png`; //x=__popbaseUrl.split(`\/\/127.0.0.1`);//x=x[1]; let x=(__popbaseUrl+1).split(`\/\/127.0.0.1`);//x=x[1]; __poplocalhost=parseInt(x[1]?1:0);// en javascript */ __popactionpage=popactionpage; // popactionpage=`html` ou popactionpage=`ajax` ou popactionpage=`alert` //al ert(`__popbaseUrl= ${__popbaseUrl}`); // // baseUrl= http://127.0.0.1 x=window.location.href; // baseUrl= http://127.0.0.1 par exemple "http://localhost:3000"const imageUrl=`${baseUrl}/images/logo.png`; x=x.split(`${__popbaseUrl}/`);x =x[1]; x=x.split(`/`); __popfile=x[x.length-1];x[x.length-1]=null; y=x.join(`/`);//al ert(`y= `+y.substring(0,y.length-1)); __popdirname=y.substring(0,y.length-1); y=__popdirname.split(`/`);//al ert(`y= `+y.substring(0,y.length-1)); let z=y.length; //__popsitename2points=y.length; __popsitename2points="..";for(i=0;i/g," "); //xmsg=xmsg.replace(/&space;/g," "); //xmsg=popreplaceall(xmsg,`\n`,``); //xmsg=popreplaceall(xmsg,`\ \;`,` `); //xmsg=popreplaceall(xmsg,`&;`,``); //popreplaceall=function(text,src,dest) msgAll+=xmsg; //xmsg=`__popbaseUrl= ${__popbaseUrl}${br} __poplocalhost= ${__poplocalhost}` popjsdevAlert(xmsg,popactionpage);//`div`); } //var __popdirname=``; //__popBarTop=`possible function`; } //================================ function getStyleCSS(styles){//styles){ //try{xline=788;index=1; styles.forEach(obj=>{ x=document.getElementById(obj.name); // document.getElementById(obj.name); document.querySelector(obj.name) if(x&&x.style){ xline=792; if(obj.type==`visibility`)x.style.visibility=obj.value;// hidden/visible xline=794; if(obj.type==`display`)x.style.display=obj.value;// inline/block/none } } ); //}catch(e){alertError(e,index,xline);}; }; //===== function getButtonsCmdLSallIHM(idname,fct,text,textarea){ if(!textarea)textarea="textarea"; let msg=`
`; msg+=``; msg+=``; msg+=``; msg+=`
`; document.open();document.write(msg);document.close(); } //===== function getInformationIHMFilename(infos,filename,id,filesize){//copyright){// for popmodal display=(infos?`block`:`none`); if(!id)id=null; //copyright=`@copyright`; let hr=`
`;//
`; let hrEnd=``;//`
`; let i=`
${filename} | ${filesize}
`; //document.open();//document.write(p_page);document.close(); let msg=hr;//`
`; msg+=i;//`
${copyright}
`; msg+=`${hrEnd}`;//
`; return({hr:hr,i:i,msg:msg}); //document.open();document.write(msg);document.close(); }; //===== function getInformationIHMCopyright(infos,copyright){// for popmodal display=(infos?`block`:`none`); copyright=`@copyright`; let hr=`
`;//
`; let hrEnd=``;//`
`; let i=`
${copyright}  
`; //document.open();//document.write(p_page);document.close(); let msg=hr;//`
`; msg+=i;//`
${copyright}
`; msg+=`${hrEnd}`;//
`; return({hr:hr,i:i,msg:msg}); //document.open();document.write(msg);document.close(); }; //===== function getInformationIHM(infos,copyright){// for popmodal display=(infos?`block`:`none`); copyright=`@copyright`; //document.open();//document.write(p_page);document.close(); let msg=`
`; ///let msg=`
`; //msg+=`
`; msg+=`
les informations now
`; msg+=`
les informations développement
`; msg+=`
les informations locales
`; msg+=`
les informations nationales
`; msg+=`
les informations internationales
`; msg+=`
les informations outils ?
`; let x=getInformationIHMCopyright(infos,copyright); msg+=x.msg; //msg+=`
${copyright}
`; msg+=`
`; document.open();document.write(msg);document.close(); }; //======================== //======= function popjsAjaxJsonGetDatasOfScreenTo(keys,values,control)//arr0,ARR0){// arr0,ARR0,arr1,ARR1,arr2,ARR2 //function getDatasOfScreenTo(fileAjax)//!\test:warning: exemple -> $ _SESSION[$sessionSite]['scrWidth'] {//!\success:0K: if(0)alert(123); if(!control)control=0; if(!keys.length||!keys[0]||!values.length||!values[0]) {alert(`function popjsAjaxJsonGetDatasOfScreenTo impossible`);return;}; let fileAjax=values[0]; //let keys=new Array('fileAjax','sessionSite','scrHeight','scrWidth'); //let values=new Array(fileAjax,'systemboost.immobilier',window.screen.width,window.screen.height); //v ar sessio nSite = 'systemboost.immobilier';//'< ? php echo $ sessionSite; ? >';//systemboost.immobilier'; // Récupérer les dimensions de l'écran //v ar scrWidth = window.screen.width; //v ar height = `${window.screen.height}`; //v ar scrHeight = window.screen.height; //v ar scrHWwithAjax = '/iC/_scripts/votre_script.php'; // Envoyer ces données à PHP via une requête GET ou POST // Par exemple, en utilisant fetch : //let params='sessionSite=' + encodeURIComponent(sessionSite)+'&'+'scrHeight=' + encodeURIComponent(scrHeight)+'&'+'scrWidth=' + encodeURIComponent(scrWidth); let params; for(let i=0;i