// JavaScript Document //alert(`C:/w3/popDev IT/userSite/obligatory.js`); try{ var obligatoryJsPhp=`/iC/pop/+/V0/cfgSite/obligatory.js.php`; var js$Var$S$SS$ConfigOfSite=js$Obj$KV$FS$FilesOfSite=jsMinElementHTML=js=fct=person=GridOfImages={};// infos: javascript, minimales des éléments, de pages HTML var index=islocalhost=gjs_totalDisplayDate=gjs_totalDisplayHeure=null; //===================================== fonctions translate var jsStartSite = { isLang: "fr_fr"}, footerCopyR=langAllDir=null; var js$0$str$1$DIR$2$DS$3$App$4$0$5$Site$6$Local$7$Dirname=jsv_dir2p=dir$iC=dir$resources$images=null; var line=iframe=tabber7pt=null; //var jsheadCodeHTML={};jsheadCodeHTML.headstartHTML=Date.now(); var tabberAutoIsOnLoad=false; var jsStartSite = { headTitle: document.title // jsStartSite.headTitle ,headstartHTML: Date.now() // jsStartSite.headstartHTML ,copyrTitle:`Pooletude` // jsStartSite.copyrTitle } var js$0$Obj$1$KV$2$LS$3$App$4$0$5$$6$Translate$7$Start =js$0$Obj$1$KV$2$LS$3$App$4$0$5$$6$Translate$7$Footer //jsAppTranslationFooter = { }; // LS langue system //============================== var jsheadCodeHTMLMetas = new Array( new Array( new Array("httpEquiv","Content-Type") ,new Array("content","text/html; charset=utf-8") ) ,new Array( new Array("name","robots") ,new Array("content","all") ) ); // isLOCALHOST //if(!jsStartSite){ //var jsStartSite = { // isLOCALHOST: jsheadCodeHTML.headTitle //}; //}; //============================== function alertError(e,index,xline,script){ if(!script)script=`none`; //function alertError(e,line,fct) { //js$Obj$KV$FS$FilesOfSite = FilesOfFunctions parent$js=(parent.js?parent.js:js); fct.file=(js$Obj$KV$FS$FilesOfSite?js$Obj$KV$FS$FilesOfSite.f1:`not js$Obj$KV$FS$FilesOfSite.f1`); 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; hereError="------- Error in : -------\n error= "+e;hereLine="line: "+xline+"/"+fct.file; //properties=" islocalhost="+"jsheadCodeHTML.islocalhost "; //alert(hereError+"\n"+hereLine+"\n"+fct.name+"\n"+js.fct+"\n"+js$Obj$KV$FS$FilesOfSite.index+"\n"+fct.file+"\n"+fct.previous); alert(hereError+"\n fct= "+hereLine+"/"+fct+"\n index= "+js$Obj$KV$FS$FilesOfSite.index+"\n file= "+fct.file+"\n previous= "+fct.previous +"\n script= "+script); //alert(hereError+"\n"+hereLine+"/"+fct+"\n"+js$Obj$KV$FS$FilesOfSite.index+"\n"+fct.file+"\n"+fct.previous); }; //====== function xxxxxjs0B_GetDate() { try{xline+=`/861`; // https://www.pierre-giraud.com/javascript-apprendre-coder-cours/objet-date/ let date1 = new Date(); seconds='seconds'; headH=parent.jsheadCodeHTML; if(!headH) headLangAll='fr-FR'; else headLangAll=headH.headLangAll; //lang=headH.headLangAll;//'fr-FR'; //if(!headH) lang=(headLangAll?headLangAll:'fr-FR');//!\warning: xline+=`/1016`; switch(lang){ //switch(jsStartSite.isLang){ // case 'fr_fr': lang='fr-FR';seconds='secondes';break; // case 'gb_gb': lang='en-EN';seconds='seconds';break; // secondes hommes femmes enfants publicité seconds men women children advertising // segundos hombres mujeres niños publicidad case 'fr-FR': seconds='secondes';break; case 'en-EN': seconds=seconds;break; case 'es-ES': seconds='segundos';break; //Spanish (Spain) } xline+=`/1027`; let dateLocale = date1.toLocaleString(lang,{ //let dateLocale = date1.toLocaleString('fr-FR',{ weekday: 'long' ,month: 'long' ,day: 'numeric' ,year: 'numeric' ,hour: 'numeric' ,minute: 'numeric' ,second: 'numeric' }); let dateLocaleYear = date1.toLocaleString(lang,{ year: 'numeric' }); let dateLocaleDay = date1.toLocaleString(lang,{ //let dateLocale = date1.toLocaleString('fr-FR',{ weekday: 'long' ,month: 'long' ,year: 'numeric' // day: 'numeric', // hour: 'numeric', // minute: 'numeric', // second: 'numeric' }); xline+=`/1051`; let dateLocaleHour = date1.toLocaleString(lang,{ //let dateLocale = date1.toLocaleString('fr-FR',{ // weekday: 'long', // year: 'numeric', // month: 'long', // day: 'numeric', hour: 'numeric' ,minute: 'numeric' ,second: 'numeric' }); xline+=`/1062`; arraydateLocale = { isdateLocaleFull: dateLocale ,isdateLocaleYear: dateLocaleYear ,isdateLocaleDay: dateLocaleDay ,isdateLocaleHour: dateLocaleHour ,isLang: lang ,issecondsText: seconds }; return(arraydateLocale);//dateLocale); //document.getElementById('p1').innerHTML = 'Date : ' + dateLocale; //Date : mercredi 1 janvier 2025 à 13:11:58 //alert(dateLocale); //gjs_totalDisplayDate=z.innerHTML=dateLocale; //gjs_totalDisplayHeure //gjs_totalDisplayHeure=dateLocale; //gjs_totalDisplayDate=dateLocale; }catch(e){alert("catch(e): "+e+" - "+xline+" - "+obligatoryJsPhp);}; }; //===================================== function xxxxxjsfctOSHCallRealTimeHour(millis, b) {// C:\iC\_scripts\js\js0B_start.js try{xline+=`/720`; // Your code here // Parameters are purely optional. // console.log(a); // console.log(b); x=`popjs_GetDate`;dateLocale=``; //if(window.parent[x])msg+=window.parent[x](params.dir,`system-out.gif`); if(window.parent[x])dateLocale=window.parent[x](); x=document.getElementById(`bottom-hbar-date`); if(x)x.innerHTML=" "+dateLocale.isdateLocaleFull+" ("+`${Math.floor(millis/1000)}`+" "+dateLocale.issecondsText+")";//new date();//gjs_totalDisplayHeure;//gjs_totalDisplayDate;//js0B_GetDate(); x=document.getElementById(`getPopModalOfBarTopNow`); if(x)x.innerHTML=dateLocale.isdateLocaleFull; }catch(e){alert("catch(e): "+e+" - "+xline+" - "+obligatoryJsPhp);}; }; //============================== function alertStartPage(){// Bonjour ! Patientez, merci, ${jsStartSite.headTitle} démarre. xline+=`/152`;if(!jsStartSite.headTitle)alert(`line ${xline} obligatory : jsStartSite.headTitle= `+jsStartSite.headTitle); document.open(); document.write(`
`); document.write(`
   Application ${jsStartSite.headTitle}
`); document.write(` Bonjour ! Patientez, merci, ${jsStartSite.headTitle} démarre.`); document.write(`
`); document.close(); } //============================== function js$Fct$S$CS$FileOfLink(filename,write){ try{xline+=`/66`; x=`>link href="`+filename+`" rel="stylesheet" type="text/css" media="all" charset="UTF-8"/<`; if(!write)return(x);else{document.open();document.write(x);document.close();}; }catch(e){alert("catch(e): "+e+" - "+xline+" - "+obligatoryJsPhp);};}; //============================== function jsfctOSHgetFilenameScript(filename,write){ try{xline+=`/56`; x=``; if(!write)return(x);else{document.open();document.write(x);document.close();}; }catch(e){alert("catch(e): "+e+" - "+xline+" - "+obligatoryJsPhp);};}; //============================== function getScriptJCI(files,section){// Js, Css, Ico try{xline+=`/60`; document.open(); files.forEach(obj=>{ filename=obj.value; sc=1; switch(obj.name){ case `linkCSS`:x=``;break; case `linkICO`:x=``;break; case `scriptJS`:sc=0;x=document.createElement('script');x.src=filename;x.type=`text/javascript`; if(!section)document.head.appendChild(x); else document.body.appendChild(x); break; //};if(sc){document.open();document.write(x);document.close();} };if(sc){document.write(x);} } ); document.close(); }catch(e){alert("catch(e): "+e+" - "+xline+" - "+obligatoryJsPhp);};}; //============================== function getParamsOfURL(type){ //type:type, islocalhost:islocalhost, host:host ,pathname:pathname,subPathname:subPathname,NBRsubPathname:NBRsubPathname,subPathname2p:subPathname2p // ,filename:filename,subfilename:filenameWithoutExt,extfilename:extension,params:paramsObj // }catch(e){alertError(e,index,xline);}// try{xline+=`/203`; // if(!window.document.jsfctOSHgetFilenameScript){ // function jsfctOSHgetFilenameScript(filename,write){try{xline+=`/56`; // x=`>script src="`+filename+`" type="text/javascript" charset="utf-8"<>/script<`; // if(!write)return(x);else{document.open();document.write(x);document.close();}; // }catch(e){alertError(e,index,xline);}}; // } //===== deFault=null; if(type) switch(type){ case "iC" : case "url" : x=document.location.href;break; default: deFault=true;x=type;break; } let x=x.replace(/\/#/g,`\/`); let url = new URL(x); // ou une URL spécifique si besoin //const url = new URL(window.location.href); // ou une URL spécifique si besoin // Exemple d'URL : https://exemple.com/dossier/sous-dossier/fichier.html?param1=valeur1¶m2=valeur2 // Distinguer le chemin complet (dirname + filename) let pathname = url.pathname; // "/dossier/sous-dossier/fichier.html" y=x.split(pathname); let host = y[0];//url.pathname; // "/dossier/sous-dossier/fichier.html" // Récupérer le nom du fichier (avec extension) let filename = pathname.substring(pathname.lastIndexOf('/') + 1); // "fichier.html" //if(filename==""){pathname+=`\/`;pathname=pathname.replace(/\/\//g,`\/`);}; //if(1||filename==""){y=pathname.lastIndexOf('/');if(y=='/')pathname=pathname.substring(pathname.length-1); }; y=pathname.substring(pathname.length-1,1);if(filename=='')pathname="/"+y; //x=y.split("/");//subPathname=x.join(`/`); //alert('NBRsubPathname: '+ x.length);// //NBRsubPathname=x.length; //alert("filename= "+filename+"\n pathname= "+pathname+"\n y= "+y+"\n NBRsubPathname= "+x.length); // Récupérer le nom sans l'extension let filenameWithoutExt = filename.substring(0, filename.lastIndexOf('.')); // "fichier" // Récupérer l'extension du fichier let extension = filename.substring(filename.lastIndexOf('.') + 1); // "html" // Récupérer les paramètres (query string) let params = url.search; // "?param1=valeur1¶m2=valeur2" // Convertir les paramètres en objet pour une manipulation plus facile let paramsObj = {};url.searchParams.forEach((value, key) => {paramsObj[key] = value;}); // { param1: "valeur1", param2: "valeur2" } // Afficher les résultats x=pathname.split("/"+filename); //);//subPathname=x.join(`/`); //alert('NBRsubPathname: '+ x.length);// x=x.join(`/`);x+=`\/`;x=x.replace(/\/\//g,`\/`); subPathname=x.substring(1,x.length-1); // .substring(0,z[0].length-1) x=subPathname.split("/");//subPathname=x.join(`/`); //alert('NBRsubPathname: '+ x.length);// NBRsubPathname=x.length; subPathname2p="..";for(i=0;i