// JavaScript Document //======== /* var jsET0= // jsET0.start_error_js { // français en javascript et en PHP placé avant debug.js "choose_a_line_to_modify_below": "Vous devez sélectionner une ligne à modifier dans le tableau ci-dessous!", "start_error_js": "Erreur Start JS" } ; */ //======== var myDebug={},myApp={},mA=myApp; myDebug.line=12;try{ myDebug.chrrc="\n";myDebug.chrrc2=myDebug.chrrc+myDebug.chrrc;myDebug.x=""; var kjsfile='file',kjsline='line',kjsfct='fct',kjsokFct='okFct',kjsobj='obj',kjsstop='stop', kjsparams='params',kjslocalurl='localurl',kjsAllFile="AllFile"; var kjsobject="object",kjsobjObj="[object Object]",kjsobjHTMLDivEl="[object HTMLDivElement]"; var scripts_isvalid=false,bguniforme=tagfct=null; ///tagfct.kjsAllFile="/iC/_scripts/js/debug.js.php"; //======== ///function isLocalhost(url) { /* myDebug.isLocalhost=function(url){ return(url.includes('localhost') || url.includes('127.0.0.1')); } */ url='http://localhost/'; ///al ert(url.includes('localhost')); url=url.includes('localhost') || url.includes('127.0.0.1'); // ️ true ///al ert(myDebug.isLocalhost('http://localhost/')); var script_debug='js:debug',debug_stop=0,jsscriptslist=script_debug,scripts_increment=-1; tagfct={kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'load: '+script_debug,kjsstop:debug_stop, kjsokFct:"",kjsparams:"",kjslocalurl:(url?1:0),kjsAllFile:"/iC/_scripts/js/debug.js.php"}; ///al ert(tagfct.kjslocalurl); tagfct.AllFile="/iC/_scripts/js/debug.js.php"; //===================== START OS / DEBUG/ALERT //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c myDebug.debug_view_e_catch=function(error,array) //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.debug_view_e_catch=function(error,array,force){//tagfct = array (typeof array===kjsobjObj) myDebug.line=42;try{ ///al ert('myDebug.debug_view_e_catch tagfct : '+myDebug.chrrc+error+myDebug.chrrc+array.kjsokFct +myDebug.chrrc+array.kjsfct); if(array.kjsokFct===array.kjsfct||force){// vérifier si l'on est dans la fonction ////al ert('myDebug.debug_view_e_catch tagfct : '+myDebug.chrrc+myDebug.chrrc+array +myDebug.chrrc+ (typeof array)); ///al ert('myDebug.debug_view_e_catch tagfct : '+myDebug.chrrc+Object.values(array)+myDebug.chrrc+kjsfile+myDebug.chrrc+JSON.parse(array)); ///let r=new Map(Object.entries(array)); ///r.get("file"); //6 ///r.has(8); //true // https://stackoverflow.com/questions/38824349/how-to-convert-an-object-to-an-array-of-key-value-pairs-in-javascript /* const arr = Array.from(Object.keys(array), k=>[`${k}`, array[k]]); const arr2 = Array.from(Object.values(array), k=>[`${k}`, array[k]]); ///arr3[arr[0]]=arr2[0]; ///al ert('myDebug.debug_view_e_catch MAP arr3 : '+arr+myDebug.chrrc+arr2+myDebug.chrrc+arr[0]+myDebug.chrrc+arr['kjsfile']); var fff=Object.entries(array); al ert('myDebug.debug_view_e_catch tagfct : '+myDebug.chrrc+fff+myDebug.chrrc+kjsfile+myDebug.chrrc+fff['kjsfile']); */ ///var tagfct = array; ///{kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.debug_view_e_catch=function(error,array)',kjsstop:debug_stop}; ///al ert("kjslocalurl: "+kjslocalurl+myDebug.chrrc+array.kjslocalurl); alert("array.kjsline: "+array.kjsline+" - force: "+force); var p2=': ',psl="!"; var msg='debug OK: '+p2+(error?error:psl+"error")+myDebug.chrrc; msg+=kjsfile+p2+(array.kjsfile?array.kjsfile:psl+kjsfile)+myDebug.chrrc; msg+=kjsline+p2+(array.kjsline?array.kjsline:psl+kjsline)+myDebug.chrrc; msg+=kjsfct+p2+(array.kjsfct?array.kjsfct:psl+kjsfct)+myDebug.chrrc; msg+=kjsobject+'Array'+p2+(typeof array===kjsobject?Object.values(array):psl+"Object.values(array)")+myDebug.chrrc; msg+=kjsparams+p2+(typeof array.kjsparams===kjsobject?Object.values(array.kjsparams):psl+kjsparams)+myDebug.chrrc; msg+=kjsstop+p2+(array.kjsstop?array.kjsstop:psl+kjsstop)+myDebug.chrrc; msg+=kjslocalurl+p2+(array.kjslocalurl?array.kjslocalurl:psl+kjslocalurl)+myDebug.chrrc; if(force)msg+=force;//tagfct.kjsAllFile; alert(msg); } }catch(e){if(myDebug)alert("Error in : "+msg);}///Object.values(array));} }//c myDebug.debug_view_e_catch=function(error,array) function catch_debug_view_e_catch(e,line,fct,script,stop){ tagfct.kjsline=line; tagfct.kjsfct=fct; tagfct.kjsfile=script;tagfct.kjsstop=stop; myDebug.debug_view_e_catch(e,tagfct,1); } function mjschr(ascii){ try{ tagfct.kjsline=473; tagfct.kjsfct='mjschr(ascii)'; tagfct.kjsfile=script__cCallAjax;tagfct.kjsstop=js_cCallAjax_stop; // Converts a codepoint number to a character // // version: 810.114 // discuss at: http://phpjs.org/functions/chr // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: chr(75); // * returns 1: 'K' return(String.fromCharCode(ascii)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //c //c \\\\\\\\\\ function gest_alert(arr){ myApp.line=38;try{ ///tagfct = 'str_common-d.js/gest_alert(arr)',o; var o; ////tagfct = {kjsfile:script_common_base,kjsline:myDebug.line,kjsfct:'function gest_alert(arr)',kjsstop:common_base_stop}; tagfct.kjsfct='gest_alert(arr)'; tagfct.kjsfile=script_common_base;tagfct.kjsline=myDebug.line;tagfct.kjsstop=common_base_stop; //c myApp.kislocalsite=1 myDebug.dev=0 myApp.debug=false //c in: arr=gest_alert({'fct':fct,'line':109,'str':'you must...','test':true}) if(!arr['test']){alert(arr['str']);return(true);}/////arr['test']=false;//c si test==true ne rien afficher if(myApp&&!myApp.debug)return(false);////alert(myApp.debug); /// if(!myApp.kislocalsite)myApp.kislocalsite=kisloc; /// if(!myApp.kislocalsite&&!arr['test']){alert(arr['str']);return(true);} /// if(!arr['test']){alert(arr['str']);return(true);} var msg=(arr['fct']?'fct:'+arr['fct']+',':''); msg+=(arr['line']?'line:'+arr['line']+'\n\n':'')+arr['str']; var len=250; if(msg.length>len){ var newmsg=''; for(var i=0;i>=msg.length+len;i++){ newmsg+=msg.substr(i,len)+'\n'; i=i+len; } if(newmsg)msg=newmsg; } alert('\n debug \n'+msg); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function myAlert(message){ try{ return(null); tagfct.kjsline=117; tagfct.kjsfct='myAlert(message)'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; if(!message)return(null); if(debugTrace.kjsline){ message="file= "+debugTrace.kjsfile+myDebug.chrrc+"function= "+debugTrace["function"]+myDebug.chrrc+"line= "+debugTrace.kjsline+myDebug.chrrc+myDebug.chrrc+message; debugTrace.kjsline=null; } if(isDev)alert(message); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //======== function alert_for_msg(msg){alert(msg);} //======== function alert_for_msg_for_debug(msg){ if(!myApp.debug)return(null); alert(msg);} //======== myDebug._alert=function(msg,stop){ try{var line=myDebug.line; tagfct.kjsfct='myDebug._alert=function(msg)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(!myApp.debug)return(null); var debugline=(stop?parseInt(stop):0); if(isNaN(debugline))debugline=-1; stop=(stop?stop:false);stop=(!msg||stop); var diff_line=parseInt(debugline-parseInt(msg[1])); if(isNaN(diff_line))diff_line=-1; var test_diff=(diff_line!=0); if(typeof stop!=='boolean')stop=test_diff; stop=(stop||test_diff); if(stop)return(false); else{ var xalert='DEBUG: al ert() '+':'+myDebug.chrrc2+' in fonction='+tagfct[kjsfct]+myDebug.chrrc+' in file='+tagfct[kjsfile]+':'+myDebug.chrrc2+' from fonction='+msg[0]+myDebug.chrrc+' from file='+msg[2]+myDebug.chrrc+' in line='+msg[1]+' - lines difference='+diff_line+' ('+test_diff+') - stop='+stop+myDebug.chrrc2+' myApp.kislocalsite='+myApp.kislocalsite+' - myApp.debug='+myApp.debug+' - myDebug.line='+myDebug.line+' - myApp.konclick='+myApp.konclick+' - !msg='+!msg+myDebug.chrrc2;}; var len=100;if(typeof msg==='string'){alert_for_msg('al ert(msg)'+myDebug.chrrc2+myDebug.get_cutted_message(msg,len)); return(true);} line=(msg[1]?msg[1]:line); if((typeof msg==='object'||typeof msg[0]==='[object Object]')){}; var file=(msg[0]?msg[0]:kjsfile),fonction=(msg[2]?msg[2]:kjsfct); var i,c,message=xalert+' typeof msg:'+typeof msg; switch(msg[0]){ case'c':if(myApp.test=='')return(false); message=myDebug.get_cutted_message(message,len); break; default:if(msg){c=msg.length;if(c>3) for(i=3;ia){var z=parseInt(response.length/a)+1; newresponse=''; for(var j=0;j-1){ mA.browsername=list[i].toLowerCase();break; } //======== navigator.sayswho=(function(){ var N=navigator.appName,ua=navigator.userAgent,tem; var M=ua.match(/(edge|opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if(M&&(tem=ua.match(/version\/([\.\d]+)/i))!=null)M[2]=tem[1]; M=M?[M[1].toLowerCase(),M[2].toLowerCase()]:[N.toLowerCase(),navigator.appVersion.toLowerCase(),'-?']; return(M); })(); */ //===================== START OS / FUNCTIONS FOR ELEMENTS //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c myDebug.GetId=function(id) //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.GetId=function(id,name){ try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.GetId=function(id)',kjsstop:debug_stop}; /* tagfct.kjsfct='myDebug.GetId=function(id)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; */ ///id=document.getElementById(id); if(id&&(id!='')){ ///if(id){ var value=document.getElementById(id); //// al ert('2 '+id); if(name&&(name!='')&&(name=="checked"||name=="select")){ switch(name){ case "checked":return(value.checked); case "select": //c https://www.javascripttutorial.net/javascript-dom/javascript-select-box/#:~:text=The%20element%20allows%20you,value%20of%20the%20selected%20option. /* const text = selectBox.options[1].text; const value = selectBox.options[1].value; let selectedOption = selectBox.options[selectBox.selectedIndex].value; al ert("selectBox text,value,selectedindex,selectedOption : "+text+myDebug.chrrc+value+myDebug.chrrc+selectedOption+myDebug.chrrc); */ var index=value.selectedIndex; ////al ert("selectBox value.options[index].value : "+value.options[index].value+myDebug.chrrc); return({"select":value,"index":index,"length":value.options.length, "text":value.options[index].text,"value":value.options[index].value}); default:return(value.name); } } return(value); } else{ tagfct.kjsline=333; tagfct.kjsfct='myDebug.GetId=function(id)'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; myDebug.debug_view_e_catch("error id: "+id,tagfct,1); } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c myDebug.GetId=function(id) //======== //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c myDebug.GetName=function(name) //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.GetName=function(name){ myDebug.line=268;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.GetName=function(name)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.GetName=function(name)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(name&&(name!=''))return(document.getElementsByName(name)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c myDebug.GetName=function(name) function GetId(id,line){ myDebug.line=276;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'GetId(id,line)',kjsstop:debug_stop}; tagfct.kjsfct='GetId(id,line)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(id&&(id!=''))return(myDebug.GetId(id)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c function GetId(id) //c \\\\\\\\\\\\\\\\\\\\\\\\\ function GetName(name){ myDebug.line=277;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'GetName(name)',kjsstop:debug_stop}; tagfct.kjsfct='GetName(name)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(name&&(name!=''))return(document.getElementsByName(name)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c function GetName(name) //c \\\\\\\\\\\\\\\\\\\\\\\\\ function FileConvertSize(aSize){ myDebug.line=307;try{ ///tagfct = {kjsfile:script_common,kjsline:myDebug.line,kjsfct:'FileConvertSize(aSize)',kjsstop:common_stop}; tagfct.kjsfct='FileConvertSize(aSize)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; //c https://blog.niap3d.com/fr/4,10,news-16-Convertir-des-octets-en-Javascript.html //c voir les commentaires //c return (aSize / def[def.length - 1][0]).toFixed(2) + ' ' + def[def.length - 1][1]; pour To //c voir newFileConvertSize(aSize) ci-dessous amélioration par convention kio = 1024 octets et ko = 1000 octets aSize = Math.abs(parseInt(aSize, 10)); var def = [[1, 'octets'], [1024, 'ko'], [1024*1024, 'Mo'], [1024*1024*1024, 'Go'], [1024*1024*1024*1024, 'To']]; for(var i=0; i/g," "); case 'html':re=/<.*?>/g;break; default: if(text==='myApp.konclick=0.paper.0.0.div'||text==='get_boot_cfg_jsph0')return(text); for(var i=0;i<100;i++){ text=text.replace(src,dest); if(text.search(src)<0)break; } return(text); } return(text.replace(re,dest)); // text.replace(re,dest) re=/\n/g; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } myDebug.get_cutted_message=function(msg,len){ ///function get_cutted_message(msg,len){ myDebug.line=355;try{var saveline=myDebug.line; ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.get_cutted_message(msg,len)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.get_cutted_message(msg,len)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(msg&&msg.length>len){ myDebug.line=359;var newmsg=''; for(var j=0;j>=msg.length+len;j++){ newmsg+=msg.substr(j,len)+chrrc; j=j+len; } myDebug.line=270;if(newmsg)msg=newmsg; } myDebug.line=saveline; return(msg); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function get_cutted_message(msg,len){ var mD=myDebug,saveline=mD.line; mD.line=374;try{ ///tagfct = {kjsfile:script_debug,kjsline:mD.line,kjsfct:'get_cutted_message(msg,len)',kjsstop:debug_stop}; tagfct.kjsfct='get_cutted_message(msg,len)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///myDebug.line=5;try{ ///tagfct = {kjsfile:script_debug2,kjsline:myDebug.line,kjsfct:'get_cutted_message(msg,len)'},stop=debug2_stop; if(msg&&msg.length>len){ mD.line=1052;var newmsg=''; for(var j=0;j>=msg.length+len;j++){ newmsg+=msg.substr(j,len)+mD.chrrc; j=j+len; } mD.line=1057;if(newmsg)msg=newmsg; } mD.line=1059;return(msg); mD.line=saveline; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function get_scroller_text(){ myDebug.line=407;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_scroller_text()',kjsstop:debug_stop}; tagfct.kjsfct='get_scroller_text()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////al ert('lj:4 E:\myproducts_sites\labo\tabber\ow\scripts\save\base0-d.js / get_scroller_text'); ByRei_jScroller2.set_eventListener(window,'load',ByRei_jScroller2.init.main); var o=myDebug.GetId('listenmescroller'); if(o){ /* var d=myDebug.GetId('listenmescroller2'); if(0&&d)d.innerHTML=o.innerHTML; */ ByRei_jScroller2.add(o,'up'); } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //===================== END OS / TEXT/SCROLL //===================== START OS / COOKIES //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c COOKIES //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.GetDateToCookie=function(value){//c value en jours myDebug.line=387;try{//c 'file'=kjsfile,kjsfct ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.GetDateToCookie=function(value)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.GetDateToCookie=function(value)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var today=new Date(),expires=new Date(); ///al ert(today.getTime()); expires.setTime(today.getTime()+(value*24*60*60*1000)); // expires: Wed Jun 01 2022 15:32:45 GMT+0200 (heure d’été d’Europe centrale) return(expires); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c myDebug.GetDateToCookie=function(value) //======== function get_arguments_details(arguments,forreplace){ myDebug.line=43;try{ //tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_arguments_details(arguments,forreplace)',kjsstop:debug_stop}; tagfct.kjsfct='get_arguments_details(arguments,forreplace)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var i,argv=arguments,argc=argv.length; for(i=0;ii?argv[i]:forreplace[i]); return(argv); /* var expires=(argc > 2) ? argv[2] : null; var path=(argc > 3) ? argv[3] : null; var domain=(argc > 4) ? argv[4] : null; var secure=(argc > 5) ? argv[5] : false; */ }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.SetCookie=function(name,value,expires){//time()+900); //? expire après 1/4 h //c usage : myDebug.SetCookie('prenom','Arthur',.5,myDomain);// .5jours=12/24 h //c usage : myDebug.SetCookie('prenom','Arthur',GetDateToCookie(365));// 365 jours //c usage : myDebug.SetCookie('identifiant','content',GetDateToCookie(365));// 365 jours //c http://www.netalya.com/fr/Script3.asp?cle=32 myDebug.line=453;try{//c 'file'=kjsfile,kjsfct ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.SetCookie=function(name,value,expires)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.SetCookie=function(name,value,expires)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(!name)return(null); var arr=new Array(name,value,expires,path,domain,false); var argv=get_arguments_details(myDebug.SetCookie.arguments,arr); var expires=argv[2],path=argv[3],domain=argv[4],secure=argv[5]; value=escape(value); ///al ert("expires 1: "+argv[2]+" - "+ myDebug.GetDateToCookie(argv[2])); ///al ert("expires 2: "+expires); ///expires=((expires==null)?1:expires);//c 1 jour ou expires ////expires=(!escape(expires)?1:myDebug.GetDateToCookie(expires));//c 1 jour ou expires var cookie=name+'='+value+ (',expires='+myDebug.GetDateToCookie(expires))+//c ((path==null)?(value?',path=/':''):(',path='+path))+ ((domain==null)?'':(value?(',domain='+domain):''))+ ((secure==true)?(value?',secure':''):''); document.cookie=cookie; return(cookie); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c myDebug.SetCookie=function(name,value,expires) //======== //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.GetCookie=function(cname){ //c usage : myDebug.getCookie=function(cname) myDebug.line=446;try{//c 'file'=kjsfile,kjsfct ////al ert(123,456); ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.getCookie=function(name)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.getCookie=function(name)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///function getCookie(cname) { if(!cname)return(null); var cookie=myDebug.GetAllInCookieToName(cname); //// al ert('ljs:22 '+name+' \n cookie='+cookie); if(!cookie)return(cookie);//c ex: mydebug ///al ert('ljs:23 cookie='+cookie+'\n\n name='+name); ,expires= //// var xlist=cookie[1].split(','); var xlist=cookie[1].split(',expires='); /// xlist=xlist[1].split(','); ////al ert('ljs:23 cookie='+cookie+'\n\n cookie[1]='+cookie[1]+'\n\n xlist[0]='+xlist[0]); return(unescape(xlist[0])); /* var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); al ert(name,decodedCookie); var ca = decodedCookie.split(';'); for(var i = 0; i ');//c to change display real text ////'tototutu'; } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function jd_display_text_with_langs(what,idname,lang){ myDebug.line=608;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'jd_display_text_with_langs(what,idname,lang)'},stop=debug_stop; tagfct.kjsfct='jd_display_text_with_langs(what,idname,lang)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(!what)return(false); var x,y,t,o,text;///,list,lang; switch(what){ case 'hidden': t='jdtwl_textareatr';x=myDebug.GetId(t+'1'+idname);///y=myDebug.GetId(t+'2'+idname); if(x&&lang){///&&y){ t=(lang.innerHTML==myApp.kcssinline?myApp.kcssinline:myApp.kcssnone); x.style.display=t;////y.style.display=t; ///lang.innerHTML=(t==myApp.kcssinline?myApp.kcssnone:myApp.kcssinline); /// al ert(lang.value+' - '+lang.innerHTML); lang.innerHTML=(t==myApp.kcssinline?myApp.kcssnone:myApp.kcssinline); /// al ert('lj:183 debug-d.js => '+lang.value+' - '+lang.innerHTML); if(lang.innerHTML==myApp.kcssnone)//!\test 04/09/2016 11:15:36 { ////text=myDebug.GetId('jdtwl_textarea'+idname).value; myDebug.GetId('jdtwl_buttonL'+idname+'0').click();////onclick=true; /// al ert('lj:187 debug-d.js => '+myDebug.GetId('jdtwl_buttonL'+idname+'0').click()); /// jd_display_text_with_langs('chglang',idname,'all'); } } break; case 'update': var file,lang=myDebug.GetId('jdtwl_lang'+idname).value; text=myDebug.GetId('jdtwl_textarea'+idname).value; /// al ert('lj:187 file '+idname); myApp.display_message_popup(true,''); /// al ert('lj:189 file '); os_display_popuploader(true); /// al ert('lj:191 file '); file=myApp.kDIR_xommon+'/security/cfgsite.php'; /// file='../../strangers/xommon/security/cfgsite.php'; /// file='../../../../strangers/xommon/security/cfgsite.php'; ///"E:\myproducts_sites\strangers\xommon\security\cfgsite.php" /// file='../../security/cfgsite.php'; /// file='../../../security/cfgsite.php'; /// al ert('lj:254 file='+file); /// ../../../../te st/xom mon/shopping/js/test/xommon/security/cfgsite.php /// myApp.kDIR_xommon="$i_dir/te st/xom mon"; ///myApp.kDIR_xommon='../../../../te st/xom mon'; ///myApp.kDIR_xommon='../../xom mon'; /// file=myApp.kDIR_xommon+'/security/cfgsite.php'; /// al ert('lj:193 file '+file); /// al ert('lj:194 file '+idname+' - '+idname+' - '+myDebug.GetId('jdtwl_file'+idname)); var o=myDebug.GetId('jdtwl_file'+idname); filetext=(o?o.innerHTML:''); /// al ert('lj:195 file '+file+' - '+filetext); if(confirm('Save this text to language : '+lang+','+filetext+' ?'+'\n\n'+file+'\n\n'+text)){ /////al ert('lj:270 file '+file+' - '+filetext+' - '+idname+' - '+text+' - '+lang); /// al ert('lj:270 file '+file+' - '+filetext+' - '+idname+' - '+text+' - '+lang+' - '+myApp.ktypeiservice); //// al ert('lj:270 file '+file+' - '+filetext+' - '+idname+' - '+text+' - '+lang+' - '+myApp.ktypeiservice+' - '+myApp.ktagdir); call_ajax_post(file,new Array('_filetext','_idname','_text','_lang',filetext,idname,text,lang),new Array(),new Array('updatefile'),true); } else os_display_popuploader(false); break; /* [plus] => Array ( [0] => _filetext [1] => '_idname' => _text [2] => ../../../../../../../test/demo/contents/et/gb/rules/1x-rules-cps-uploadwwwsite-stepsexplanation.php => id_explanation0 [3] =>
For 'Uploader' your website,you should prepare the following items to complete the questionnaire: a) your identity information b) your address information,mail,telephone c) your details on the operation of the website (php,database ...) d) the ZIP file containing your website After checking your file,you will receive your website address. Thank you for your trust.
) */ ////call_ ajax_post(file,new Array('_filetext','_idname','_text',filetext,idname,myDebug.GetId(idname).value),new Array(),new Array('updatefile'),true); //} case 'chglang': var list=myDebug.GetId('jdtwl_list'+idname).value.split(','); for(var i=0;i -1 ? cookie.substr(0, eqPos) : cookie; DelCookie(name);///document.cookie = name + "=,expires=Thu, 01 Jan 1970 00:00:00 GMT"; } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } ////Source: https://prograide.com/pregunta/12085/effacer-tous-les-cookies-avec-javascript /* http://www.toutjavascript.com/savoir/savoir02.php3 La valeur à stocker est associée à un nom de cookie. La date d'expiration permet de définir la longévité du cookie. Si elle est omise,le cookie est détruit à la fermeture du navigateur. Le path indique simplement d'où vient le cookie. Le nom de domaine permet d'identifier le cookie parmi tous ceux stockés sur la machine. La variable secure indique si l'accès au cookie est protégé. Donc pour stocker la valeur Arthur dans la variable prenom il suffit d'appeler la fonction comme ceci : var pathname=location.pathname; var myDomain=pathname.substring(0,pathname.lastIndexOf(myDebug.chr47))+myDebug.chr47; var date_exp=new Date(); date_exp.setTime(date_exp.getTime()+(365*24*3600*1000)); // Ici on définit une durée de vie de 365 jours myDebug.SetCookie('prenom','Arthur',date_exp,myDomain); */ //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /* function getCookieVal(offset){ var endstr=document.cookie.indexOf(';',offset); if(endstr==-1)endstr=document.cookie.length; return unescape(document.cookie.substring(offset,endstr)); } function getCookie(name){ var arg=name+'='; var alen=arg.length; var clen=document.cookie.length; var i=0; while(i < clen){ var j=i+alen; if(document.cookie.substring(i,j)==arg)return getCookieVal(j); i=document.cookie.indexOf(' ',i)+1; if(i==0)break; } return null; } function set Cookie(name,value){ var argv=myDebug.SetCookie.arguments; var argc=myDebug.SetCookie.arguments.length; var expires=(argc>2)?argv[2]:null; var path=(argc>3)?argv[3]:null; var domain=(argc>4)?argv[4]:null; var secure=(argc>5)?argv[5]:false; document.cookie=name+'='+escape(value)+ ((expires==null)?'':(';expires='+expires.toGMTString()))+ ((path==null)?'':(';path='+path))+ ((domain==null)?'':(';domain='+domain))+ ((secure==true)?';secure':''); } function delCookie(name){ var exp=new Date(); exp.setTime(exp.getTime()- 1); var cval=GetCookie(name); document.cookie=name+'='+cval+';expires='+exp.toGMTString(); } */ /* var argv=myDebug.SetCookie.arguments; //c var argc=myDebug.SetCookie.arguments.length; deprecated var argc=argv.length; var expires=(argc>2)?argv[2]:null; //c var today=new Date(); //c var expires=(argc>2)?new Date(today.getTime()+argv[2]):null; var path=(argc>3)?argv[3]:null; var domain=(argc>4)?argv[4]:null; var secure=(argc>5)?argv[5]:false; */ /* var today=new Date(),expires=new Date(); expires.setTime(today.getTime()+(365*24*60*60*1000)); document.cookie=sName+'='+encodeURIComponent(sValue)+';expires='+expires.toGMTString(); */ //c ((expires==null)?'':(';expires='+expires.toGMTString()))+ /* function set Cookie(name,value,expires,path,domain,secure){ document.cookie= name+'='+escape(value)+ ((expires)?';expires='+expires.toGMTString():'')+ ((path)?';path='+path:'')+ ((domain)?';domain='+domain:'')+ ((secure)?';secure':''); } */ /* var now=new Date().getTime(); now=Math.round(((new Date(now)).getTime()/1000)+3600)*value*24; return(now); var date_exp=new Date(); date_exp.setTime(date_exp.getTime()+(value*24*3600*1000)); // Ici on définit une durée de vie de 365 jours si value=365 return(date_exp); */ /* var today=new Date(),expires=new Date(); expires.setTime(today.getTime()+(365*24*60*60*1000)); document.cookie=sName+'='+encodeURIComponent(sValue)+';expires='+expires.toGMTString(); var now=new Date(); var time=now.getTime(); time += 3600 * 1000; now.setTime(time); document.cookie= 'username='+value+ ';expires='+now.toUTCString()+ ';path=/'; ou var now=new Date().getTime(); now=Math.round((new Date(now)).getTime()/1000)+3600; */ /*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ /* ( function (factory) { if (typeof define === 'function' && define.amd) { // AMD define(['jquery'], factory); } else if (typeof exports === 'object') { // CommonJS factory(require('jquery')); } else { // Browser globals factory(jQuery); } }(function ($) { var pluses = /\+/g; function encode(s) { return config.raw ? s : encodeURIComponent(s); } function decode(s) { return config.raw ? s : decodeURIComponent(s); } function stringifyCookieValue(value) { return encode(config.json ? JSON.stringify(value) : String(value)); // JSON.parse(array) JSON.stringify(value) } function parseCookieValue(s) { if (s.indexOf('"') === 0) { // This is a quoted cookie as according to RFC2068, unescape... s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { // Replace server-side written pluses with spaces. // If we can't decode the cookie, ignore it, it's unusable. // If we can't parse the cookie, ignore it, it's unusable. s = decodeURIComponent(s.replace(pluses, ' ')); return config.json ? JSON.parse(s) : s; } catch(e) {} } function read(s, converter) { var value = config.raw ? s : parseCookieValue(s); return $.isFunction(converter) ? converter(value) : value; } var config = $.cookie = function (key, value, options) { // Write if (value !== undefined && !$.isFunction(value)) { options = $.extend({}, config.defaults, options); if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setTime(+t + days * 864e+5); } return (document.cookie = [ encode(key), '=', stringifyCookieValue(value), options.expires ? ', expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? ', path=' + options.path : '', options.domain ? ', domain=' + options.domain : '', options.secure ? ', secure' : '' ].join('')); } // Read var result = key ? undefined : {}; // To prevent the for loop in the first place assign an empty array // in case there are no cookies at all. Also prevents odd result when // calling $.cookie(). var cookies = document.cookie ? document.cookie.split('; ') : []; for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies[i].split('='); var name = decode(parts.shift()); var cookie = parts.join('='); if (key && key === name) { // If second argument (value) is a function it's a converter... result = read(cookie, value); break; } // Prevent storing a cookie that we couldn't decode. if (!key && (cookie = read(cookie)) !== undefined) { result[name] = cookie; } } return result; }; config.defaults = {}; $.removeCookie = function (key, options) { if ($.cookie(key) === undefined) { return false; } // Must not alter options, thus extending a fresh object... $.cookie(key, '', $.extend({}, options, { expires: -1 })); return !$.cookie(key); }; })); */ //===================== END OS / COOKIES //===================== START OS / fing_collaborative_involvement //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c functions for survey text //c fing_collaborative_involvement ## file0 ## 20181305 22:40:36 ## 20181305 22:40:36 ## 0:0:0;! //c name[involvement.proactive.1]=0;!name[involvement.reactive.2]=1;! //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //=== function extract_head_survey_text(text,tagid,newheader){ myDebug.line=1197;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'extract_head_survey_text(text,tagid,newheader)',kjsstop:debug_stop}; tagfct.kjsfct='extract_head_survey_text(text,tagid,newheader)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var sep=';!',s=text.split(tagid); s=s[s.length-1]; if (!s)return({'header':'','value':''}); var n=s.indexOf(sep); var header=(newheader?newheader:tagid+s.substr(0,n)); var value=header+s.substr(n); return({'header':header,'value':value}); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //=== function detect_the_survey_choiced(that1,that2){ myDebug.line=1212;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'detect_the_survey_choiced(that1,that2)',kjsstop:debug_stop}; tagfct.kjsfct='detect_the_survey_choiced(that1,that2)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var x=that1.split(']='),y=that2.split(']='); if(x[0]!=y[0])return(''); return(that2); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //=== function change_the_survey_choiced(text,header,value,taginputother,thatname){ myDebug.line=1224;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'change_the_survey_choiced(text,header,value,taginputother,thatname)',kjsstop:debug_stop}; tagfct.kjsfct='change_the_survey_choiced(text,header,value,taginputother,thatname)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; //=== var sep=';!',thelist=text.split(sep),mem='',z,i,y,x; ////y=x.split(header); //=== ///name[implication.proactive.1]=1; for(i=0;i 1000000000 && timeStamp < 2000000000 var now = new Date().getTime() / 1000; var s = parseInt(now); return (get_as_float) ? now : (Math.round((now - s) * 1000) / 1000) + ' ' + s; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //===================== END OS / TIMES //===================== START OS / DATES //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c DATES Returns the number of the week in year, as defined in ISO 8601myApp (Fonction tirée de JsCalendar) //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.WeekNumber=function(oneDate){// onedate=2022-2-27 myDebug.line=1288;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.WeekNumber=function(oneDate)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.WeekNumber=function(oneDate)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; // Mon Feb 21 2022 09:33:56 GMT+0100 (heure normale d’Europe centrale) const currentDate=(typeof oneDate==='string'?new Date(oneDate):new Date()); const currentYear=currentDate.getFullYear(); const currentDayOfMonth=currentDate.getDate(); const currentMonth=currentDate.getMonth(); // Be careful! January is 0, not 1 var month=(currentMonth+1); var dateString=currentDayOfMonth+"-"+month+"-"+currentYear; var d=new Date(currentYear,currentMonth,currentDayOfMonth,0,0,0);// new Date(2016, 6, 27, 13, 30, 0); var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3); // Nearest Thu var ms=d.valueOf(); // GMT d.setMonth(0);d.setDate(4); // Thu in Week 1 Object.values(array) var numero=(Math.round((ms-d.valueOf())/(7*864e5))+1); return({"date":dateString,"year":currentYear,"month":month,"day":currentDayOfMonth,"num":numero}); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c myDebug.WeekNumber=function(oneDate) function getWeekNumber(tdate) {//c format 01/01/2008 retourne NaN myDebug.line=1310;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'getWeekNumber(tdate)',kjsstop:debug_stop}; tagfct.kjsfct='getWeekNumber(tdate)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; //c https://www.developpez.net/forums/d485577/javascript/general-javascript/calcul-numero-semaine/ var d = new Date(tdate); var DoW = d.getDay(); d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu "2007-01-28 07:29:51" ok avec heure ou non var ms = d.valueOf(); // GMT d.setMonth(0); d.setDate(4); // Thu in Week 1 return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function getWeekNumberNow() {//c format 01/01/2008 retourne NaN myDebug.line=1326;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'getWeekNumberNow()',kjsstop:debug_stop}; tagfct.kjsfct='getWeekNumberNow()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; //c return([tdate,num semaine]);////new Date(2008, 11, 29))); // ok Retourne 42 var tdate=new Date(new Date().toString().split('GMT')[0]+' UTC').toISOString().split('.')[0].replace('T',' '); //// al ert(tdate);////new Date(2008, 11, 29))); // ok Retourne 2020-10-15 07:29:51 var week=getWeekNumber(tdate); return([tdate,week,tdate+" "+week]);////new Date(2008, 11, 29))); // ok Retourne 42 }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function get_date_with_format(format){ myDebug.line=1340;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_date_with_format(format)',kjsstop:debug_stop}; tagfct.kjsfct='get_date_with_format(format)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////var tagfct = {'file':script_debug,'fct':'get_date_with_format(format)'},stop=debug_stop; var Digital=new Date(); var field=new Array(Digital.getFullYear(),Digital.getMonth()+1,Digital.getDate(), Digital.getHours(),Digital.getMinutes(),Digital.getSeconds(),Digital.getMilliseconds()); var formatYmdHis='',step=9; for(i=0;i0) msg=msg+myDebug.chrrc+' * Invalid day'; test=(monthvalue-12); if(test>0) msg=msg+myDebug.chrrc+' * Invalid month'; if(actu.getMonth()+1>=monthvalue){ if(actu.getMonth()+1==monthvalue){ if(actu.getDate()>=dayvalue){ months=actu.getMonth()+1-monthvalue; years=actu.getFullYear()-yearvalue; }else { months=(12-monthvalue)+actu.getMonth()+1; years=actu.getFullYear()-yearvalue-1; } }else {months=actu.getMonth()+1-monthvalue; years=actu.getFullYear()-yearvalue; } }else { months=(12-monthvalue)+actu.getMonth()+1; years=actu.getFullYear()-yearvalue-1; } if(actu.getDate()>dayvalue) days=actu.getDate()-dayvalue; else days=(30-dayvalue)+actu.getDate(); while(days>30){ days-=30; months+=1; } while(months>12){ months-=12; years+=1; } return(years+';'+msg); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function bissextile(annee){ myDebug.line=1413;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'bissextile(annee)',kjsstop:debug_stop}; tagfct.kjsfct='bissextile(annee)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///try{myDebug.line=90; ///var tagfct = {'file':script_debug,'fct':'bissextile(annee)'},stop=debug_stop; if(annee%4==0&&annee%100!=0||annee%400==0) return(true); else return(false); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function nb_01_01(date){ myDebug.line=1427;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'nb_01_01(date)',kjsstop:debug_stop}; tagfct.kjsfct='nb_01_01(date)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///myDebug.line=97;try{ ///var tagfct = {'file':script_debug,'fct':'nb_01_01(date)'},stop=debug_stop; var nb_months=[,0,31,59,90,120,151,181,212,243,273,304,334]; var j=eval(date[0]); var m=eval(date[1]); var a=eval(date[2]); var nb=nb_months[m]+j-1;if(bissextile(a)&&m>2)nb++; return(nb); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function fCompareDate(pDateDebut,pDateFin){ myDebug.line=1443;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'fCompareDate(pDateDebut,pDateFin)',kjsstop:debug_stop}; tagfct.kjsfct='fCompareDate(pDateDebut,pDateFin)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///myDebug.line=110;try{ ///var tagfct = {'file':script_debug,'fct':'fCompareDate(pDateDebut,pDateFin)'},stop=debug_stop; var DureeDebut=Date.parse(pDateDebut); var DureeFin=Date.parse(pDateFin); var iComparaison=DureeFin-DureeDebut; if(iComparaison>0) return(">"); if(iComparaison==0)return("="); if(iComparaison<0)return("<"); return(iComparaison); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function diffdate($f_date,$f_limit=0){//c $f_limit en minutes $f_date=la date de mesure myDebug.line=1462;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'diffdate($f_date,$f_limit=0)',kjsstop:debug_stop}; tagfct.kjsfct='diffdate($f_date,$f_limit=0)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///$idate=date("YmdHis"); ///global $p_date; ///if(empty($p_date)) ///$p_date=date("YmdHis"); _mF_microFunction_define('kpdate',date("YmdHis")); $i_pos=12;$i_diffsecondes=substr(kpdate,$i_pos,2)-substr($f_date,$i_pos,2);//11; $i_pos=10;$i_diffminuts=substr(kpdate,$i_pos,2)-substr($f_date,$i_pos,2);//45; $i_pos=8;$i_diffhours=substr(kpdate,$i_pos,2)-substr($f_date,$i_pos,2);//16; $i_pos=6;$i_diffdays=substr(kpdate,$i_pos,2)-substr($f_date,$i_pos,2);//29; $i_pos=4;$i_diffmonths=substr(kpdate,$i_pos,2)-substr($f_date,$i_pos,2);//12; $i_pos=0;$i_diffyears=substr(kpdate,$i_pos,4)-substr($f_date,$i_pos,4);//12; //=== $isecondes=$i_diffsecondes+$i_diffminuts*60+$i_diffhours*60*60; $iminuts=round($isecondes/60,1); if($f_limit)return($f_limit-$iminuts); return(array($isecondes,$iminuts,$i_diffhours,$i_diffdays,$i_diffmonths,$i_diffyears)); ///die($idate.' - '.'20161229164511'.' - '.$isecondes.' - '.$isecondes/60); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function nb_jour_annee(a1,a2){ myDebug.line=1490;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'nb_jour_annee(a1,a2)',kjsstop:debug_stop}; tagfct.kjsfct='nb_jour_annee(a1,a2)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////myDebug.line=125;try{ ////var tagfct = {'file':script_debug,'fct':'nb_jour_annee(a1,a2)'},stop=debug_stop;* var n=0; if(a1==a2) n=0; else for(i=a1;i=monthvalue){ if((actu.getMonth()+1)==monthvalue){ if(actu.getDate()>=dayvalue){ months=actu.getMonth()+1-monthvalue;years=actu.getFullYear()-yearvalue; }else { months=(12-monthvalue)+actu.getMonth()+1; years=actu.getFullYear()-yearvalue-1; } }else { months=(actu.getMonth()+1)-monthvalue; years=actu.getFullYear()-yearvalue; } }else { months=(12-monthvalue)+actu.getMonth()+1; years=actu.getFullYear()-yearvalue-1; } if(actu.getDate()>dayvalue) days=actu.getDate()-dayvalue;else days=(30-dayvalue)+actu.getDate(); while(days>30){days-=30;months+=1;} while(months>12){months-=12;years+=1;} return(new Array(years,months,days)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } myApp.checkDate=function(_date){ myDebug.line=1602;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myApp.checkDate=function(_date)',kjsstop:debug_stop}; tagfct.kjsfct='myApp.checkDate=function(_date)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; /////myDebug.line=221;try{ /////var tagfct = {'file':script_debug,'fct':'myApp.checkDate=function(_date)'},stop=debug_stop; var reg=new RegExp(/^[0-3]{1}[0-9]{1}[\/][0-1]{1}[0-9]{1}[\/][0-9]{4}$/); if(!reg.test(_date)){return(false);} var tabDate=_date.split(myDebug.chr47); var dateTest=new Date(tabDate[2],tabDate[1]-1,tabDate[0]); if(parseInt(tabDate[0],10)!=parseInt(dateTest.getDate(),10)||parseInt(tabDate[1],10)!=parseInt(dateTest.getMonth(),10)+parseInt(1,10)||parseInt(tabDate[2],10)!=parseInt(dateTest.getFullYear(),10)) {return(false);} return(true); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } myApp.get_age_from_date=function(_date){ myDebug.line=1618;try{ ///var tagfct = {'file':script_debug,'fct':'myApp.get_age_from_date=function(_date)'},stop=debug_stop; tagfct.kjsfct='myApp.get_age_from_date=function(_date)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(!myApp.checkDate(_date)) return(''); var days=''; var msg=new Array(); msg['msg']=''; var actu=new Date(); var months=actu.getMonth(); var yearvalue=actu.getFullYear(); var tab=new Array(31,28,31,30,31,30,31,31,30,31,30,31); if((yearvalue%4==0&&yearvalue%100!=0)||(yearvalue%400==0)) tab[1]+=1; msg['nbrD']='31'; tab=_date.split(myDebug.chr47); var dayvalue=(tab[0]?tab[0]:false); var monthvalue=(tab[1]?tab[1]:false); yearvalue=(tab[2]?tab[2]:false); if(!dayvalue||!monthvalue||!yearvalue) return(msg['msg']); if((dayvalue-31)>0) msg['msg']+=myDebug.chrrc+' * Invalid day'; if((monthvalue-12)>0) msg['msg']+=myDebug.chrrc+' * Invalid month'; if(actu.getMonth()+1>=monthvalue){ if(actu.getMonth()+1==monthvalue){ if(actu.getDate()>=dayvalue){ months=actu.getMonth()+1-monthvalue;msg['age']=actu.getFullYear()-yearvalue; }else { months=(12-monthvalue)+actu.getMonth()+1; msg['age']=actu.getFullYear()-yearvalue-1; }}else { months=actu.getMonth()+1-monthvalue; msg['age']=actu.getFullYear()-yearvalue; } }else { months=(12-monthvalue)+actu.getMonth()+1; msg['age']=actu.getFullYear()-yearvalue-1; }; if(actu.getDate()>dayvalue) days=actu.getDate()-dayvalue; else days=(30-dayvalue)+actu.getDate(); while(days>30){days-=30;months+=1;} while(months>12){months-=12;msg['age']+=1;} return(msg); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function get_formatted_date(format){ myDebug.line=1671;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_formatted_date(format)',kjsstop:debug_stop}; tagfct.kjsfct='get_formatted_date(format)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////myDebug.line=299;try{ ////var tagfct = {'file':script_debug,'fct':'get_formatted_date(format)'},stop=debug_stop; var d=new Date(); var year=d.getFullYear(); var month=d.getMonth()+1; if(month.toString().length==1) month='0'+month; var day=d.getDate(); if(day.toString().length==1) day='0'+day; var date=year.toString()+'-'+month.toString()+'-'+day.toString(); var hours=d.getHours(); if(hours.toString().length==1) hours='0'+hours; var minutes=d.getMinutes(); if(minutes.toString().length==1) minutes='0'+minutes; var seconds=d.getSeconds(); if(seconds.toString().length==1) seconds='0'+seconds; var hour=hours.toString()+':'+minutes.toString()+':'+seconds.toString(); if(format){ switch(format){ case'date+hour':return(date+' '+hour); case'hour':return(hour); } } return(new Array(date+hour,date,hour,year,month,day,hours,minutes,seconds)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function actualize_hour_slave0(actuallabel,pass,div,count,howmany,stop){ myDebug.line=1707;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'actualize_hour_slave0(actuallabel,pass,div,count,howmany,stop)',kjsstop:debug_stop}; tagfct.kjsfct='actualize_hour_slave0(actuallabel,pass,div,count,howmany,stop)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////myDebug.line=322;try{ ///var tagfct = {'file':script_debug,'fct':'actualize_hour_slave0(actuallabel,pass,div,count,howmany,stop)'},stop=debug_stop; var x=myDebug.GetId(actuallabel),o,c,y,i; if(!pass&&x){ o=myDebug.GetId(div); c=myDebug.GetId(count); stop=(stop?true:false); if((parseInt(x.value)>howmany&&o&&c)||stop){ y=c.value.split('-'); if(y.length==3&&parseInt(y[2])==0) return(pass); y[2]=(y[2]?(stop?0:y[2]):1); z=parseInt(y[0]); i=(z<=y[1]?z+1:0); c.value=i+'-'+y[1]+'-'+y[2]; if(y[2]){ myApp.istabshow=true; o.tabber.tabShow(i); } x.value=-1; pass=true; } x.value=parseInt(x.value)+1; } return(pass); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function actualize_hour(){ myDebug.line=1740;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'actualize_hour()',kjsstop:debug_stop}; tagfct.kjsfct='actualize_hour()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////myDebug.line=362;try{ ////var tagfct = {'file':script_debug,'fct':'actualize_hour()'},stop=debug_stop; var x=myDebug.GetId('actualhour_label'); if(x){ var xdate=get_formatted_date(),pass=false; myDebug.line=369; x.innerHTML=xdate[2]; myDebug.line=371; var d=get_formatted_date(); if(!myApp.callajaxrunning){ if(d[8]%2) pass=actualize_hour_slave0('hactualhour_label',pass,'0.oneposts.0','count_oneposts',10); if(d[8]%3) pass=actualize_hour_slave0('hactualvideo_label',pass,'1.rpanel.0','count_rpanelvideos',15);}}; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //===================== END OS / DATES //===================== START OS / SECURITY //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //c SHA1 Secure Hash Algorithm //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ myDebug.SHA1=function(msg){ myDebug.line=1771;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.SHA1=function(msg)',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.SHA1=function(msg)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var nbr=19; function rotate_left(n,s){var t4=(n<>>(32-s));return t4;};function lsb_hex(val){var str='';var i;var vh;var vl;for(i=0;i<=6;i+=2){vh=(val>>>(i*4+4))&0x0f;vl=(val>>>(i*4))&0x0f;str+=vh.toString(16)+vl.toString(16);} return str;};function cvt_hex(val){var str='';var i;var v;for(i=7;i>=0;i--){v=(val>>>(i*4))&0x0f;str+=v.toString(16);} return str;};function Utf8Encode(string){string=string.replace(/\r\n/g,'\n');var utftext='';for(var n=0;n127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);} else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}} return utftext;};var blockstart;var i,j;var W=new Array(80);var H0=0x67452301;var H1=0xEFCDAB89;var H2=0x98BADCFE;var H3=0x10325476;var H4=0xC3D2E1F0;var A,B,C,D,E;var temp;msg=Utf8Encode(msg);var msg_len=msg.length;var word_array=new Array();for(i=0;i>>29);word_array.push((msg_len<<3)&0x0ffffffff);for(blockstart=0;blockstart 536786b24e11a0f5bcc88002e196492844a1f0f1 } else{ var reste=phrase.substring(20); var phrase=phrase.substring(0,20); var pwd=myDebug.SHA1(phrase);//"U1papi0z");//phrase);//SHA1(phrase);// phrase=U1papi0z -> 536786b24e11a0f5bcc88002e196492844a1f0f1 } //c pwd : c3987d4871da7dd10dcf270a80e430c7f8b2355f //c pwd : 40e682cc32f4807fe0d832828477a0814f1223ed ///return(new Array(phrase,"mot")); var phrase_reserve=phrase.split("").reverse().join("");// U1papi0z -> z0ipap1U var mot="",sep="£."+phrase.length+"!¤",j=0; //======= for(var z=0; z 536786b24e11a0f5bcc88002e196492844a1f0f1 //c pwd : c3987d4871da7dd10dcf270a80e430c7f8b2355f //c pwd : 40e682cc32f4807fe0d832828477a0814f1223ed ///return(new Array(phrase,"mot")); var phrase_reserve=phrase.split("").reverse().join("");// U1papi0z -> z0ipap1U var mot="",sep="£"+phrase.length+"¤",j=0; for (var z=0; z-1){ mA.browsername=list[i].toLowerCase();break; } //======== navigator.sayswho=(function(){ var N=navigator.appName,ua=navigator.userAgent,tem; var M=ua.match(/(edge|opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); var V=M[0].split(myDebug.chr47); ///ua.match(/M[0]\/([\.\d]+)/i); al ert("M: "+M+" V: "+V);// M: Chrome/101.0.4951.67,Chrome,101.0.4951.67,.67 if(M&&(tem=ua.match(/version\/([\.\d]+)/i))!=null)M[2]=tem[1]; M=M?[M[1].toLowerCase(),M[2].toLowerCase()]:[N.toLowerCase(),navigator.appVersion.toLowerCase(),'-?']; return(M); })(); */ /* function Is(){ myDebug.line=1752;try{ tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'Is()',kjsstop:debug_stop}; ////try{myDebug.line=127; ////var tagfct = {'file':script_debug,'fct':'Is()'},stop=debug_stop; this.appname=navigator.appName; ////al ert("navigator.appName: "+navigator.appName+" - "+"this.appName: "+this.appName); this.appversion=navigator.appVersion; this.platform=navigator.platform; this.useragent=navigator.userAgent.toLowerCase(); this.ie=(this.appname=='Microsoft Internet Explorer' ); if((this.useragent.indexOf('mac')!=-1)||(this.platform.indexOf('mac')!=-1)){ this.sisop='mac'; } else if((this.useragent.indexOf('windows')!=-1)||(this.platform.indexOf('win32')!=-1)){ this.sisop='windows'; } else if((this.useragent.indexOf('linux')!=-1)||(this.platform.indexOf('linux')!=-1)){ this.sisop='linux'; } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ////}catch(e){if(myDebug)debug_view_e_catch(e,tagfct);} } */ function yourAddressIP() { return true; /* var ip = false; if(window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); else xmlhttp = new ActiveXObject(Microsoft.XMLHTTP); xmlhttp.open(GET,https://pooletude.com,false); xmlhttp.send(); var reponse = JSON.Parse(xmlhttp.responseText); //On suppose que l'adresse IP est stockée avec la clé ip. Regardez les exemples fournis par les services pour savoir quelle clé correspond à l'adresse IP if(reponse[ip]) ip = reponse[ip] return ip; */ } myDebug.navigatorDynamic=function(){ myDebug.line=1950;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'myDebug.navigatorDynamic=function()',kjsstop:debug_stop}; tagfct.kjsfct='myDebug.navigatorDynamic=function()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ////try{myDebug.line=127; ////var tagfct = {'file':script_debug,'fct':'myDebug.navigatorDynamic=function()'},stop=debug_stop; this.appname=navigator.appName; ///al ert("navigator.appName: "+navigator.appName+" - "+"this.appName: "+this.appName); this.appversion=navigator.appVersion; this.platform=navigator.platform; this.useragent=navigator.userAgent.toLowerCase(); /// this.ie=(this.appname=='Microsoft Internet Explorer' ); var M=this.useragent.match(/(edge|opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); this.useragent=navigator.userAgent.toLowerCase(); /// var V=M[0].split(";/"); ///ua.match(/M[0]\/([\.\d]+)/i); var V=M[0].split(";"); ///ua.match(/M[0]\/([\.\d]+)/i); this.browserName=V[0]; this.browserVersion=(V[1]?V[1]:"??"); ///al ert("M: "+M+" V: "+V);// M: Chrome/101.0.4951.67,Chrome,101.0.4951.67,.67 this.ie=this.ma=this.li=0; if((this.useragent.indexOf('mac')!=-1)||(this.platform.indexOf('mac')!=-1)){ this.sisop='mac';this.ma=1; } else if((this.useragent.indexOf('windows')!=-1)||(this.platform.indexOf('win32')!=-1) ||(this.platform.indexOf('win64')!=-1)){ this.sisop='windows';this.ie=1; } else if((this.useragent.indexOf('linux')!=-1)||(this.platform.indexOf('linux')!=-1)){ this.sisop='linux';this.li=1; } //==== this.screenW=window.screen.width;// window.screen.availWidth , window.screen.availHeight this.screenH=window.screen.height; this.isSmartphone=(window.screen.width', /// "img":''}; this.bgPage="/res/imgs/design/bgtext_.jpg"; this.waitLoad="/res/imgs/system/wait-load.gif"; /* mA.kFscreen=i; .style.width var w=window, d=document, e=d.documentElement, g=d.getElementsByTagName('body')[0], x=w.innerWidth||e.clientWidth||g.clientWidth, y=w.innerHeight||e.clientHeight||g.clientHeight; mA.kWscreendoc=x; mA.kHscreendoc=y; */ /// this.who=navigator.sayswho(); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ////}catch(e){if(myDebug)debug_view_e_catch(e,tagfct);} } function js_get_image_of_loader(){ myDebug.line=2030;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_image_of_loader()',kjsstop:debug_stop}; tagfct.kjsfct='js_get_image_of_loader()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///bgtext_.jpg C:\res\imgs\systemwait-load.gif ///id_navigator.bgPage="/res/imgs/design/bgtext_.jpg"; ///id_navigator.waitLoad="/res/imgs/system/wait-load.gif"; var divstyledefault={"bg":'', "img":''}; return(divstyledefault); ///return(''); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ////}catch(e){if(myDebug)debug_view_e_catch(e,tagfct);} } function js_set_screen_dimension(){ myDebug.line=2049;try{var saveline=myDebug.line;//c 'file'=kjsfile,kjsfct ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'os/js_set_screen_dimension()',kjsstop:debug_stop}; tagfct.kjsfct='os/js_set_screen_dimension()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///try{myDebug.line=54;//c 'file'=kjsfile,kjsfct ////var tagfct = {'file':script_debug,'fct':'js_set_screen_dimension()'},stop=debug_stop; var my2dscreen,x,y,mA=myApp,i=0;///,W=screen.width,H=screen.height,FONTSIZE=0; /// E:\myproducts_sites\test\xommon\general\get_boot_cfg_jsph.php mA.kWscreen=screen.width;// window.screen.availWidth , window.screen.availHeight mA.kHscreen=screen.height; mA.kFscreen=i; var w=window, d=document, e=d.documentElement, g=d.getElementsByTagName('body')[0], x=w.innerWidth||e.clientWidth||g.clientWidth, y=w.innerHeight||e.clientHeight||g.clientHeight; mA.kWscreendoc=x; mA.kHscreendoc=y; // afficher les taille de font avec vw switch(mA.kWscreen){ case 640:i=8;break;// 80 case 800:i=10;break;// 80 case 1024:i=12;break;// 85 case 1440:i=14;break;// 110 case 1600:i=16;break;// 100 default:i=12;break; } mA.kFscreen=i; ////FONTSIZE=i; ///mA.mybrowser=navigator.sayswho.toLowerCase();///(navigator.appName.toLowerCase().search(/microsoft.+/)!=-1);//c myApp.myiebrowserie=$.browser.msie; ////////mA.mybrowser=navigator.sayswho;///(navigator.appName.toLowerCase().search(/microsoft.+/)!=-1);//c myApp.myiebrowserie=$.browser.msie; ///mA.mybrowser=mA.browsername;///(navigator.appName.toLowerCase().search(/microsoft.+/)!=-1);//c myApp.myiebrowserie=$.browser.msie; my2dscreen=mA.kWscreen+'x'+mA.kHscreen+'x'+mA.kWscreendoc+'x'+mA.kHscreendoc+sep+mA.kFscreen+sep+mA.mybrowser+sep;//c 1600*900+8 ex:mA.mybrowser firefox,4.01 ou chrome ///lj:70 1366x768x1366x659|14|firefox,56.0| y=my2dscreen.split(sep); var tag='my2dscreen';//c $_COOKIE['my2dscreen'] 1600x900x1600x786|16|firefox|68.0|path ////myDebug.SetCookie(tag,'',0); var allcookies=readAllCookies(); ////al ert('ljs:114'+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' readAllCookies() allcookies[0][tag]='+allcookies[0][tag]+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' readAllCookies() allcookies[1][tag]='+allcookies[1][tag]); if(allcookies[1][tag]){ ////al ert('ljs:116 problem '+''+myDebug.chrrc+''+myDebug.chrrc+' tagfct[kjsfile]='+tagfct[kjsfile]+''+myDebug.chrrc+''+myDebug.chrrc+' tagfct[kjsfct]='+tagfct[kjsfct]+''+myDebug.chrrc+''+myDebug.chrrc+' tag='+tag+''+myDebug.chrrc+''+myDebug.chrrc+' allcookies[1][tag]='+allcookies[1][tag]+''+myDebug.chrrc+''+myDebug.chrrc+' document.cookie='+document.cookie); myDebug.SetCookie(tag,'',0); ////document.location.reload(true); return(false); } x=myDebug.GetCookie(tag);if(x)x=x.split(sep); else x='|||'; var z=x[0].split('x'); var newscreen=(z[0]+'x'+z[1]!=mA.kWscreen+'x'+mA.kHscreen),newfont=(x[1]!=y[1]),newbrowser=(x[2]!=y[2]); /* s:112 x=1600x900x1600x786,16,firefox,68.0,path=/ y=1440x900x1440x786,14,firefox,69.0, tag=my2dscreen GetCookie(tag)=1600x900x1600x786|16|firefox,68.0|path=/ document.cookie=mydebug=false; exec=path=/; my2dscreen=1600x900x1600x786%7C16%7Cfirefox%2C68.0%7Cpath=/; post.ws=0.tools.0.1.div%7C%7C%7C%7C1; my2dscreen=1440x900x1440x786%7C14%7Cfirefox%2C69.0%7C; 1440x900x1440x786|14|firefox,69.0|, expires=Thu, 31 Dec 2099 23:59:59 GMT; exec=path=/; PHPSESSID=a13aq3amsabs10kplkf0ct79c7 */ ///al ert('ljs:13'+''+myDebug.chrrc+''+myDebug.chrrc+' newscreen = '+newscreen+''+myDebug.chrrc+''+myDebug.chrrc+' newbrowser = '+newbrowser); ////al ert('ljs:119'+''+myDebug.chrrc+''+myDebug.chrrc+' GetCookie(tag)='+GetCookie(tag)+''+myDebug.chrrc+''+myDebug.chrrc+' y='+y+''+myDebug.chrrc+''+myDebug.chrrc+' newscreen='+newscreen+''+myDebug.chrrc+''+myDebug.chrrc+' (x[2]!=y[2])='+(x[2]!=y[2])+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' document.cookie='+document.cookie); if(newscreen){///||newbrowser){ //// my2dscreen=mA.kWscreen+'x'+mA.kHscreen+'x'+mA.kWscreendoc+'x'+mA.kHscreendoc+sep+mA.kFscreen+sep+mA.mybrowser+sep;//c 1600*900+8 ex:mA.mybrowser firefox,4.01 ou chrome var result=myDebug.SetCookie(tag,my2dscreen,100); ///if(!result)al ert(); /* var a,j,k,t='',arr=document.cookie.split(';'); var textcookie=''; for(i=0;i=0?a.length==3:a.length==2)&&k<0){ textcookie+=arr[i]+';'; } ////al ert('ljs:134'+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' textcookie='+textcookie); } */ ///deleteAllCookies(); /* ///al ert('ljs:125'+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' textcookie='+textcookie); document.cookie=textcookie; document.cookie="1440x900x1440x786|14|firefox,69.0|, expires="; document.cookie=tag+"="; document.cookie="1440x900x1440x786|14|firefox,69.0|, expires="; document.cookie=tag+"="; */ /////al ert('ljs:143'+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' textcookie='+document.cookie); ///// cookie = name + "="; ///// document.cookie = cookie; /////al ert('ljs:126'+''+myDebug.chrrc+''+myDebug.chrrc+''+myDebug.chrrc+' document.cookie='+document.cookie); // cookie = name + "=" + my2dscreen; // if(typeof daysToLive === "number") { /* Sets the max-age attribute so that the cookie expires after the specified number of days */ // cookie += ", expires=Thu, 31 Dec 2019 23:59:59 GMT"; // al ert('ljs:166'+document.cookie); ////al ert('ljs:128 '+myDebug.chrrc+' x='+x+''+myDebug.chrrc+' y='+y+''+myDebug.chrrc+' tag='+tag+''+myDebug.chrrc+''+myDebug.chrrc+' GetCookie(tag)='+GetCookie(tag)+''+myDebug.chrrc+''+myDebug.chrrc+' newscreen'+mA.kWscreen+''+myDebug.chrrc+''+myDebug.chrrc+' cookie= '+cookie); ///sal ert('ljs:133'); // document.cookie = cookie; /// } ///al ert('ljs:176 '+document.cookie); document.location.reload(true); } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //================== myDebug.getObjectCookies = function(msg){ var pairs = msg.split(";"); var cookies = {}, simples = {}; for (var i=0; i1&&index<4){label.style.background='orange';label.style.color='blue';} if(index>3&&index<6){label.style.background='green';label.style.color='white';} if(index>5){label.style.background='#ddd';label.style.color='black';label.value='?';} } ////al ert(xPosition+' -kkk '+parseInt(xPosition/width));///.style.width return { x: xPosition, y: yPosition, index:index }; /// theThing.style.left = xPosition + "px"; /// theThing.style.top = yPosition + "px"; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ function get_segment_position(number,width,position){ myDebug.line=2322;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_segment_position(number,width,position)',kjsstop:debug_stop}; tagfct.kjsfct='get_segment_position(number,width,position)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var taille=parseInt(width/number); for(var i=1;i<=number;i++)if(position '+formDatas+'-. -> '+isApplication["lang"]); formDatas.append('application',isApplication.appname);///cst.APPLICATION);.toUpperCase() formDatas.append('tagAppli',isApplication.apptag);///cst.tagAppli); ///al ert("ljs:32 returned jslang " + jslang); formDatas.append('lang',isApplication.lang);///jslang); ///(jslang!=="undefined"?jslang:"fr")); formDatas.append('send_at',(new Date()).getTime()); ///if(form) formDatas.append("HTTP_REFERER",cst.HTTP_REFERER); //cst.REQUEST_URI="$i_REQUEST_URI";// http://127.0.0.1/labo/wiw/ //cst.HTTP_REFERER="$i_HTTP_REFERER";// /labo/wiw/ //cst.DocumentRoot="$i_DocumentRoot";// http://127.0.0.1 formDatas.append("REQUEST_URI",cst.REQUEST_URI); /// alert('Ouais ! formDatas. -> '+formDatas+'-. -> '+isApplication.apptag); return(formDatas); }catch(e){if(myDebug) { tagfct.kjsline=2704; tagfct.kjsfct='js_initialize_FormDataXX(action,element)'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; myDebug.debug_view_e_catch(e,tagfct,1); }} } function js_initialize_FormData(form,formdatas,action){ try{ if(typeof form == "string"&&myDebug.GetId(form))form=myDebug.GetId(form); var formDatas =(formdatas?formdatas : (form?new FormData(form):new FormData())); /* if(!formDatas){ tagfct.kjsline=2655; myDebug.debug_view_e_catch("Error: ",tagfct,1); return(null); } */ //==== formDatas.append('action',(action?action:null)); formDatas.append('application',isApplication.appname.toUpperCase());///cst.APPLICATION); formDatas.append('tagAppli',isApplication.apptag);///cst.tagAppli); ///al ert("ljs:32 returned jslang " + jslang); formDatas.append('lang',isApplication.lang);///jslang); ///(jslang!=="undefined"?jslang:"fr")); formDatas.append('send_at',(new Date()).getTime()); ///if(form) formDatas.append("HTTP_REFERER",cst.HTTP_REFERER); //cst.REQUEST_URI="$i_REQUEST_URI";// http://127.0.0.1/labo/wiw/ //cst.HTTP_REFERER="$i_HTTP_REFERER";// /labo/wiw/ //cst.DocumentRoot="$i_DocumentRoot";// http://127.0.0.1 formDatas.append("REQUEST_URI",cst.REQUEST_URI); return(formDatas); }catch(e){if(myDebug) { tagfct.kjsline=2742; tagfct.kjsfct='js_initialize_FormData(form,formdatas,action)'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; myDebug.debug_view_e_catch(e,tagfct,1); }} } // js_body_onload(< ? php echo $p_isWelcome.','."$p_imgBG,".$p_okBgImage; ? >)$p_khwrappercolor function js_body_onload(jsisWelcome,bgimage,okbgimage,colorBody,hwrappercolor){ try{ tagfct.kjsfct='js_body_onload(jsisWelcome,bgimage,okbgimage,colorBody,hwrappercolor)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; ///myAl ert(jstimeLoadPage);//c temps de chargement de la page var iddiv=myDebug.GetId('content-wrapper'); /////myAl ert(okbgimage+' - '+iddiv); if(0&&iddiv){ iddiv.style.background=colorBody; if(okbgimage){ ////if(colorBody) iddiv.style.backgroundImage="url("+bgimage+")"; iddiv.style.backgroundRepeat="no-repeat"; iddiv.style.backgroundSize="100% 100%"; ///myDebug.GetId('content').style.backgroundColor=hwrappercolor; ///document.body.style.backgroundColor=hwrappercolor; } else { ///iddiv.style.background=colorBody; } } iddiv=myDebug.GetId('header-wrapper'); if(hwrappercolor&&iddiv){ ///iddiv.style.backgroundColor=hwrappercolor; } //=== var tableau=myDebug.GetId('ContenuCentral'); if(1||tableau){ var Greetings="Greetings"; function logger(type,$delegate,...args){$delegate("Called", type, args);} for(let prop in console){if(console.hasOwnProperty(prop)){let $original=console[prop];if(!($original instanceof Function)){continue;} console[prop]=function(...args){logger(prop, $original, ...args);if(args!=Greetings)alert('C:\iC\_scripts\js\debug.js.php Console has errors! '+args);return($original.call(console,...args));} }}console.log("Greetings");} }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c function js_body_onload(jsisWelcome) function display_remarks(me,tag){ myDebug.line=2568;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'display_remarks(me,tag)',kjsstop:debug_stop}; tagfct.kjsfct='display_remarks(me,tag)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var start='idx_'; var x=fg_osjs_get_infos_of_select(me); ///al ert('l:7 ici ajax-base-d.js - '+x+' - '+tag); var y=myDebug.GetId(start+'td'+x[0]+tag); // al ert(start+'td'+x[0]+tag+' - '+y); if(y){ var w=fg_osjs_get_infos_of_select(me,'all'); alert('C:\iC\_scripts\js\debug.js.php display_remarks(me,tag)'+w); var z; for(var i=0;i=0){ o.innerHTML+=(text==''?'':',')+tag; } } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ////}catch(e){debug_view_e_catch(e,'ajax-base-d : set_td_list(ind,tag)',myDebug.line);} } //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ function fg_ajs_get_infos_of_radio(name,index) { myDebug.line=2614;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'fg_ajs_get_infos_of_radio(name,index)',kjsstop:debug_stop}; tagfct.kjsfct='fg_ajs_get_infos_of_radio(name,index)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var retour=-1; var radio=GetName(name);if(!radio)return(-1); /// var radio=document.getElementsByName(name);if(!radio)return(-1); var length=radio.length;var k=false; //============ if(index=='all'){ var all=''; for(var i=0;i1?'ok':'')+up.innerHTML; plus.innerHTML=plusreal;up.innerHTML=upreal.replace('ok',''); } myDebug.GetId(txtbuttonadd).style.display=myApp.kcssinline; } }else //=========== {var lnew; myDebug.line=86; plus=document.getElementsByName(txtbuttonuploadtd)[i]; if(plus){ myDebug.line=89; upreal=plus.innerHTML;//c up up=document.getElementsByName(txtbuttonuploadtd)[i-1]; if(up)plusreal=up.innerHTML;//c plus lnew=document.getElementsByName(txtbuttonuploadtd)[i+1]; if(lnew){ lnew.innerHTML=plusreal.replace('ok',''); up.innerHTML=(i>1?'ok':''); } plus.innerHTML='ok'+upreal; myDebug.GetId(txtbuttonadd).style.display=myApp.kcssnone; }//=========== } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ////}catch(e){debug_view_e_catch(e,'ajax-base-d : fg_ajs_switch_buttons_add_upload(txtformupload,i,lnew)',myDebug.line);} } function get_traitment_image_after_upload(tagfind,imgname,imgfile,msg,stop){ try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_traitment_image_after_upload(tagfind,imgname,imgfile,msg,stop)',kjsstop:debug_stop}; //tagfct.kjsfct='get_traitment_image_after_upload(tagfind,imgname,imgfile,msg,stop)'; //tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var imgpreviewimage=myDebug.GetId(imgname); ///al ert('l:108 imgpreviewimage&&imgfile : '+imgpreviewimage+' - '+imgfile); if(imgpreviewimage&&imgfile){ //c ok //c imgfile='../../uploads/registration/unknowedref/03car.jpg';//!\test 14/06/2016 09:22:53 forçage ///"E:\myproducts_sites\uploads\registration\unknowedref\03car.jpg" imgpreviewimage.style.background='url('+imgfile+')'; imgpreviewimage.style.backgroundSize='100% 100%'; imgpreviewimage.style.backgroundRepeat='no-repeat'; var x=imgfile.split(myDebug.chr47);x=x[x.length-1]; if(msg){msg=msg.replace(',',sep);msg=msg.replace(',',sep);} var img=myDebug.GetId('filename'+tagfind); if(img)img.value=x+(msg?sep+msg:''); var imgpreviewimagename=myDebug.GetId(imgname+'name'); imgpreviewimagename.innerHTML=x+(msg?','+msg:''); } else{ tagfct.kjsline=2858; tagfct.kjsfct='get_traitment_image_after_upload(tagfind,imgname,imgfile,msg,stop)'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ///}catch(e){debug_view_e_catch(e,'ajax-base-d : get_traitment_image_after_upload(imgname,imgfile,msg)',myDebug.line);} } function get_traitment_after_upload(what,data,imgloader,imgdel){ myDebug.line=2713;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'get_traitment_after_upload(what,data,imgloader,imgdel)',kjsstop:debug_stop}; tagfct.kjsfct='get_traitment_after_upload(what,data,imgloader,imgdel)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; //============= var imgpreviewimage=myDebug.GetId('previewimage'),err=data.split('Error n°'),o=(err.length<2); ///if(o){ myApp.display_message_popup(o,'ok',data);//c affichage de l'erreur trouvée en rouge en haut /// o.style. //// o.innerHTML=data; if(!o)return(''); ///} /// if(imgpreviewimage)imgpreviewimage.innerHTML=''; //============= // var p reviewthumbs=myDebug.GetId('previewthumbs'); myDebug.line=138; var dataix=data.split('||||'); /* al ert('142data : '+data); 142data : ../uploads/s--/10613450507370522221.jpg |||| |||| 0 |||| 1,300,250 |||| upload */ var txttagfind=dataix[4]; var num=parseInt(dataix[2]); var previewthumbstd=document.getElementsByName('imgphoto'+txttagfind)[num]; var nbrpreviewthumbs=myDebug.GetId('idx_nbr_'+txttagfind); //============= myDebug.line=158; if(imgloader)imgloader.style.display=myApp.kcssnone; //============= var ix=data.split(':'); if(imgpreviewimage&&ix[0]){ get_traitment_image_after_upload(txttagfind,'previewimage',dataix[0],dataix[3]); //// js_set_elements_of_lineoftable(txttagfind,num,true); //// } myDebug.line=166; if(previewthumbstd&&ix[1]){ previewthumbstd.innerHTML=dataix[1]; /// js_set_elements_of_lineoftable(txttagfind,num,true); js_common_addlinetr_with_question_afterupload(txttagfind,num,'upload');//!\?????????? action o=myDebug.GetId('statusline_'+txttagfind);if(o)o.value++; /// js_set_elements_of_lineoftable(txttagfind,num,true); } } //=========== ///o=document.getElementsByName('num'+txttagfind)[num];if(o)o.disabled=false; //============= myDebug.line=179; if($.isFunction(window.update_price_for_photos)) update_price_for_photos(num);//!\test 14/06/2016 08:47:25 ///priceimages.innerHTML=(nbr<4?0:(nbr-3)*1); ///if(nbr==10) nbr=0;//c disabled upload /// } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} ///}catch(e){debug_view_e_catch(e,'ajax-base-d:get_traitment_after_upload(what,data,imgloader,imgdel)',myDebug.line);} }//c function get_traitment_after_upload(what,data,imgloader,imgdel) //c \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ function set_donate_prevision_from_radios(f_me,f_amountsent,f_resultdonate,f_inline){ myDebug.line=2780;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'set_donate_prevision_from_radios(f_me,f_amountsent,f_resultdonate,f_inline)',kjsstop:debug_stop}; tagfct.kjsfct='set_donate_prevision_from_radios(f_me,f_amountsent,f_resultdonate,f_inline)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var o=myDebug.GetId(f_amountsent);if(o){o.style.display=(f_inline?myApp.kcssinline:myApp.kcssnone);o=myDebug.GetId(f_resultdonate);if(o){o.value=f_me.value;}}//c al ert(o.value); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function set_donate_amount_from_radios(f_me,f_amountvalue,f_confirmvalue,f_tblamountwrite,f_resultdonate,f_inline){ myDebug.line=2789;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'set_donate_amount_from_radios(f_me,f_amountvalue,f_confirmvalue,f_tblamountwrite,f_resultdonate,f_inline)',kjsstop:debug_stop}; tagfct.kjsfct='set_donate_amount_from_radios(f_me,f_amountvalue,f_confirmvalue,f_tblamountwrite,f_resultdonate,f_inline)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var o=myDebug.GetId(f_confirmvalue);if(o){o.disabled=false;o.checked=false; o.value=(!f_me.value?'other':f_me.value); var r=myDebug.GetId(f_resultdonate);if(r)r.value=(!f_me.value?f_me.value:''); } o=myDebug.GetId(f_amountvalue);if(o)o.value=f_me.value; ///if(f_inline){ o=myDebug.GetId(f_tblamountwrite);if(o){o.style.display=(!f_me.value?myApp.kcssinline:myApp.kcssnone); ///} } ///var o=myDebug.GetId('amountwrite.uploadwwwsite');if(o){o.style.display=(o.style.display==myApp.kcssinline?myApp.kcssinline:myApp.kcssinline);set_donate_amount_from_radios(this,'*idx_.amountvalue.uploadwwwsite','','');o=myDebug.GetId('*idx_.confirmvalue.uploadwwwsite');if(o)o.value='other';} }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function update_areaajxcookie_result(){ myDebug.line=2809;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'update_areaajxcookie_result()',kjsstop:debug_stop}; tagfct.kjsfct='update_areaajxcookie_result()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var sep=';!;',egal='=!=',o=myDebug.GetId('areaajxcookie'); //// if(o){ var x=myApp.ajxcookie.split(sep),y,z=new Array(),f=z,j=0; /// al ert(myApp.ajxcookie); for(var i=0;i '+xhr.responseText); ///alert('Ouais ! Données envoyées et réponse chargée. -> '+xhr.responseText); var messages=xhr.responseText.split(sep);//c "|" if(messages[0]&&messages[0]=="done"){ ///if(messages[2]&&messages[2]!==page[2])messages[1]=""; switch(messages[1]){ case "cmdline": ///alert('OK Ouais ! Données envoyées et messages. -> '+messages); document.location.reload(true); /// alert('Ouais ! Données envoyées et réponse chargée. -> '+jsonResponse); // document.location=document.location; break; default: /* var cmdLine=','+(page[1]==="w"?"what":page[1]+','); for(var i=1;i '+messages); // Ouais ! Données envoyées et réponse chargée. -> done|cmdline|,w,wiw.DEV|||oucmlkj341hve8bikcni0c7sl6|1|-350px /// var jsonResponse=JSON.parse(xhr.responseText); /// alert('Ouais ! Données envoyées et réponse chargée. -> '+jsonResponse+" - "+jsonResponse.name[1]); ///alert('Ouais ! Données envoyées et réponse chargée. -> '+jsonResponse); /// alert('Ouais ! Données envoyées et réponse chargée. -> '+jsonResponse.file[0]+" - "+Object.entries(jsonResponse)); // jsonResponse.file=true jsonResponse.dirUploads=/atelier/upload-file/uploads/ /// alert("jsonResponse.image_uploads.name[1] : "+jsonResponse.image_uploads.name[1]); }); // Définissez ce qui arrive en cas d'erreur xhr.addEventListener('error', function(event) { alert('Oups! Quelque chose s\'est mal passé.'); }); // Configurez la requête /// XHR.open('POST', 'https://example.com/cors.php'); /// C:\atelier\upload-file\upload.php xhr.open('POST',url);// "/res/scripts/php/ajax/ajax_field_different_input.php"); // Ajoutez l'en-tête HTTP requise pour requêtes POST de données de formulaire /// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); // Finalement, envoyez les données. /// xhr.send(urlEncodedData); xhr.send(formDatas); /* ///var datas=['xml',false,'group','mapsselect','what',what,'plus',plus,'num',num,'value',sel,'country',alpha3,'department',department]; var datas=['page',page]; var mode ={'method':'POST','synchrone':true,'action':'sendCmdLine'};//,kjsfile:'localization/select.php'}; var xyz=new totoAjax("action","post",null,"ajax_field_different_input.php"); alert("ljs:3041 page: "+page+" - that: "+that); // ljs:3041 page: ,w,wiw.DEV - that: undefined xyz.url="/res/scripts/php/ajax/ajax_field_different_input.php"; xyz.appli=isApplication.appname.toUpperCase();///cst['APPLICATION']; xyz.lang=isApplication.lang;///jslang; /////localisationAjax.appli='calc';localisationAjax.lang='fr'; xyz.HTTP_REFERER=String(document.location); xyz.msg=["Votre demande a été envoyée.Merci!","Envoi impossible"]; alert("ljs:3041 page: "+page+" - that: "+that); // ljs:3041 page: ,w,wiw.DEV - that: undefined xyz.gorequete(mode,datas); */ return(true); var o,action='sendCmdLine';////,time_start; var xhr=getXMLHttpRequest(); xhr.onreadystatechange=function(){ try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'xhr.onreadystatechange=function()',kjsstop:debug_stop}; ///if(xhr.responseText==="")return(false); var arr=checkXMLHttpRequest(xhr); myDebug.debug_view_e_catch("xhr.responseText: "+xhr.responseText+"arr: "+arr,tagfct,1); ////al ert("ljs:1520 js_go_hidden_link(page,that) xhr arr: "+arr); ////al ert("ljs:1518 xhr.responseText: "+xhr.responseText+myDebug.chrrc+"arr: "+arr+myDebug.chrrc+"arr[0]: "+arr[0]+myDebug.chrrc+"page: "+page+myDebug.chrrc+"page 5: "+page[5]); if(arr[0]){ ///l-2-0.php Au bord du précipice 0 message ///al ert("ljs:1518 xhr.responseText: "+xhr.responseText+myDebug.chrrc+"arr: "+arr+myDebug.chrrc+"arr[0]: "+arr[0]+myDebug.chrrc+"page: "+page+myDebug.chrrc+"page 4: "+page[4]); ////al ert("ljs:1525 xhr.responseText: "+xhr.responseText+myDebug.chrrc+"page 3: "+page[3]+myDebug.chrrc+"pages: "+page); ////al ert("page[2]"+page[2]);///+myDebug.chrrc+"messages[2]: "+messages[2]); var messages=xhr.responseText.split(sep);//c "|" ////var test=xhr.responseText.split("|"); if(messages[1]==="pointer"){ ///al ert("ljs:1529 xhr.responseText return(false); : "+xhr.responseText); /* tagfct.kjsline=3061; tagfct.kjsfct='xhr.onreadystatechange=function()'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; return(false); */ } if(page[2]==="ebook0"){ ///var messages=xhr.responseText.split(sep); if(messages[8]===1){ ////if(parseInt(messages[8])){ ///al ert("messages[8]: "+messages[8]+myDebug.chrrc); ///.sep.$p_sameLink /* tagfct.kjsline=3077; tagfct.kjsfct='xhr.onreadystatechange=function()'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; return(false); */ } //js_go_hidden_link(['','w','ebook0','to','ebook0-c.php']) ou l-0.php "data-head" ////document.location.reload(true); ///al ert("messages[5]: "+messages[5]+myDebug.chrrc+"class: "+that.getAttribute("class"));///+myDebug.chrrc+"messages[2]: "+messages[2]); ////var x=messages[5].split("-"); ////var _oldliofmenu=null; ////if(messages[5]&&(messages[5]==="a"||messages[5]==="c")){ if(messages[3]!==""){///parseInt(messages[4])<10){ messages[5] ///if(x.length>1&&messages[5]&&messages[3]!==""){///parseInt(messages[4])<10){ messages[5] if(_oldliofmenu) _oldliofmenu.setAttribute("class",_oldliofmenu.getAttribute("class").replace("_yes","_no")); else _oldliofmenu=that; that.setAttribute("class",that.getAttribute("class").replace("_no","_yes")); o=myDebug.GetId("contenttitle"); o.innerHTML=messages[2]; o=myDebug.GetId("idcontentofdocumentofebook"); o.innerHTML=messages[3]; /* tagfct.kjsline=3103; tagfct.kjsfct='xhr.onreadystatechange=function()'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; return(false); */ } } if(arr[1]==="divAtable"){ ///var top="-180px"; o=myDebug.GetId(arr[1]); if(o){o.innerHTML=arr[2];o.style.display="inline";$('#id_DataListeTableauListe').DataTable(); $('#id_DataListeTableauListe_wrapper').css("top","-85px");//c -85px $('#idSpanTitleMessage').css("top","-85px"); $('#headdivAtable').html($('#idSpanTitleMessage').html()); //// o=myDebug.GetId('headdivAtable'); /// if(o)o.innerHTML=myDebug.GetId('idSpanTitleMessage').innerHTML; myDebug.GetId('idSpanTitleMessage').innerHTML=""; o=myDebug.GetId('titledivAtable');if(o)o.innerHTML="Table "+page[2]; //// o=$('#id_colmd12TblDB');///myDebug.GetId("id_colmd12TblDB"); /// if(o){o.css("top","-85px");} } } ///al ert("ljs 1609 xhr.responseText: "+xhr.responseText); ///document.location=document.location; else { /////al ert("ljs:1542 xhr.responseText: "+xhr.responseText+myDebug.chrrc+"arr: "+arr+myDebug.chrrc+"page: "+page); document.location.reload(true); } } else{ /* tagfct.kjsline=3134; tagfct.kjsfct='js_go_hidden_link(page,that)'; tagfct.kjsfile=script_debug;tagfct.kjsstop=debug_stop; myDebug.debug_view_e_catch("Error ",tagfct,1); return(""); */ } }catch(e){if(myDebug)catch_debug_view_e_catch(e,3328,'js_go_hidden_link(page,that)',script_debug,debug_stop);} } ///try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'xhr.onreadystatechange=function()',kjsstop:debug_stop}; var formDatas=new FormData();///js_initialize_FormData(null,null,'sendCmdLine');/// var cmdLine=''; for(var i=1;i=0)///y==="ws"||y==="ow"||y==="s"||y==="ebooks") {this.apptag=y;this.appname=x[x.length-3];} else {this.apptag="";this.appname=x[x.length-2];} this.APPNAME=this.appname.toUpperCase(); this.appdir1=(!this.apptag?"":this.apptag+myDebug.chr47)+this.appname;//c =[ws/]upload-file x=z.split(this.appdir1); this.appdir0=(x[0]?x[0].substring(0,x[0].length-1):z);//c =http://127.0.0.1/atelier ///al ert(this.appdir0+" \n "+this.appdir1+" \n "+this.index+" \n "+this.getparams); //==== this.applocal=tagfct.kjslocalurl; var url='http:'+myDebug.chr47+myDebug.chr47+'localhost'+myDebug.chr47; ///al ert(url.includes('localhost')); this.appW3=url; url=(url.includes('localhost') || url.includes('127.0.0.1')); if(!url)this.appW3=myDebug.chr47; //==== //c isApplication.lang this.langdefault='fr'; var lang=myDebug.GetCookie('country'); if(!lang||lang==="null"){ lang=this.langdefault; myDebug.setLang(lang,'country'); } /// this.lang=lang; this.country=(lang?lang:this.langdefault);//c edition du pays lang=myDebug.GetCookie('lang'); this.lang=(lang?lang:this.langdefault); lang=myDebug.GetCookie('langdoc'); this.langdoc=(lang?lang:this.langdefault); /// return(tthis); //==== // http://127.0.0.1/atelier/upload-file/essai.php?nom=34 // isApplication.applocal=1/0, isApplication.appdir0=http://127.0.0.1/atelier, isApplication.appdir1=ws/]upload-file // isApplication.apptag="ws","ow","s","ebooks", isApplication.index=essai.php/index.php, isApplication.getparams=nom=34, // isApplication.appW3='http://localhost/'/"/" , //==== }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } if(1){// isNavigator isApplication myDebug.chr47=String.fromCharCode(47); var allAll; var isNavigator=new myDebug.navigatorDynamic(); var isApplication=new myDebug.applicationDynamic(); if(!isApplication.appname||!isNavigator.appname){ alert(" isApplication: "+isApplication+" - isApplication.appname: "+isApplication.appname); } /////var jsisSmartphone=0; myDebug.fileTypesImages = [ 'image/jpeg', 'image/pjpeg', 'image/png' ]; var jsonLocalisation={},et={},cst={}; ////var debugTrace={kjsfile:"",kjsline:"",kjsfct:""}; var iconWarning="\u26a0"+" "; var sep="|"; var blueLight="#dcebef"; var greenLight="#b5f4c5"; var redLight="#f7593d"; var keyPressed = null; ////var jsonLocalisation={},et={},cst={}; mA.line=mA.debug=2702; mA.delpost=mA.payment=false; mA.kzIndex=10000; mA.chr10=String.fromCharCode(10); mA.chr13=String.fromCharCode(13); mA.asc13=mA.chr13.charCodeAt(0); mA.kcssinline='inline'; mA.kcssnone='none'; mA.kcssvisibility='visibility'; mA.kcssvisible='visible'; mA.kcsshidden='hidden'; mA.kcsstransparent='transparent'; mA.kjsundefined='undefined'; mA.kextph='.php'; mA.cursorX=mA.cursorY=0; mA.sources=mA.notreloadtabber=new Array(); mA.konclick=mA.oldtabber=mA.showpost=mA.newpost=mA.taballposts=mA.resume=mA.infobulleparams=mA.datetemp=''; mA.word_account='Account'; mA.txtmessage='table_popup_message'; ////mA.klang=mA.klangdoc=mA.kcountry= mA.iframe=mA.ebook=''; mA.test=mA.letterklang=mA.moneyklang=''; myDebug.Dev=false; myDebug.dev=0; //======== var kisloc=false;mA.kislocalsite=kisloc; var arr=new Array('kislocalsite','127.0.0.1','klang','fr','end'),jsphp=str_get_array_from_array(arr); // JavaScript Document ///var is=new Is(); ///var x=myApp,atcookie=''; var atcookie=''; mA.sepofcontrol='!:'; //c séparateur des listes de champs à controler dans une form mA.ksepfields='wyz'; //c séparateur des listes de champs à controler dans une steps-forms mA.kemailuser=mA.infos=mA.global=mA.x=mA.ajxcookie=mA.params=mA.values=mA.captcha=mA.norobo=mA.iserviceparams=mA.submotif=mA.datetemp=''; mA.sql=mA.blockdiv=false; mA.args=mA.connexion=mA.steps=mA.dbl_list=new Array(); mA.callajaxrunning=false; mA.showpost=''; mA.tempostart=3000; ///mA.konclick=mA.tabstart='1.daily.0.0.div'; mA.konclick=mA.tabstart='1.applifuel.0.0.div'; mA.konclick=mA.tabstart='1.appli.0.0.div'; mA.cookietime=30;//c durée de vie d'un cookie 5jours=1 semaine var x=myDebug.GetCookie('mydebug'); mA.debug=(x=='false'?false:true); mA.test=''; x=myDebug.GetCookie('memorizebirthdaybiorythm'); mA.AGE=(x?x:isNavigator.dateYL); x=myDebug.GetCookie('cfmi');//c confirm identity mA.cfmi=x; // (x?x:''); /* x=myDebug.GetCookie('kcountry');//c edition du pays mA.kcountry=(x?x:'fr'); mA.klangdefault='fr'; x=myDebug.GetCookie('klang');//c langue souhaitée mA.klang=(x?x:mA.klangdefault); x=myDebug.GetCookie('klangdoc');//c langue des documents souhaitée mA.klangdoc=(x&&mA.length==2?x:mA.klangdefault); */ x=myDebug.GetCookie('numpage');//c page du dernier document lu mA.numpage=(x?x:1); //======== ///var x=myApp; mA.CONNECTED=new Array(); mA.CONNECTED['conn']=mA.CONNECTED['certif']=mA.CONNECTED['mcertif']=mA.CONNECTED['pcertif']=mA.CONNECTED['trade']=0; mA.CONNECTED['iframe']=false; mA.PopupWindow='';//c alert important pour Paypal ou réafficher la fenêtre déjà ouverte //c https://roneiv.wordpress.com/tag/windowopen/ mA.PSEUDO=mA.alien=''; mA.ID=4; mA.STATUS=0; mA.sources=new Array(); mA.sources[1005]='
'; mA.PURCHASE=new Array(); mA.PURCHASE['sep']='_§§_'; var first_tabcontrol=final_tabcontrol=''; var infotmp='',conn='',cint='conn?',ps=''; var _form_popup_js_php="_form_popup.js.php"; var _oldliofmenu=null; var idchoiced={};idchoiced.selected=false;idchoiced.thumb=[0,1,2,3,4,5]; //===================== END OS / VARIABLES/CONSTANTES //===================== START FORM / ELEMENTS ///var _logo_appli="/iC/_scripts/img/_logo_appli-min.jpg"; ///cst.srcImageXY="/atelier/upload-file/uploads/capture1.jpg"; cst.srcImageXY="/res/imgs/design/babypraying.jpg"; // attention! C:\res\scripts\php\_functions_htmlPage.php peut modifier et[] ou cst[] ////var strImageXY=cst.srcImageXY; cst._logo_appli="/iC/_scripts/img/_logo_appli-min.jpg"; cst.imgSystem="/res/imgs/system";//+"/out.gif\"; ////al ert(" cst.srcImageX: "+cst.srcImageXY); //cst.srcImageX); } function js_get_form_vline_full(content){ myDebug.line=476;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_form_vline_full(content)',kjsstop:debug_stop}; tagfct.kjsfct='js_get_form_vline_full(content)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; return(""+content+""); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function js_get_form_vline(content,flink){ myDebug.line=481;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_form_vline(content,flink)',kjsstop:debug_stop}; tagfct.kjsfct='js_get_form_vline(content,flink)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(flink){ content=''+(content?content:"link")+''; } if(content&&(content.trim().substring(0,4)==="")){ var line=content; } else{ var line=""; line+=(content?content:""); line+=""; } ////line+=""; ///form+=""; http://127. 0.0.1/labo/i-work/documents/files/vignettes/miniatures/565099cbf15ea001760136.jpg return(js_get_form_vline_full(line)); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function js_get_form_popUpDiv_if_necessary(arrayparams){ myDebug.line=444;try{ ////tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_form_popUpDiv_if_necessary()',kjsstop:debug_stop}; tagfct.kjsfct='js_get_form_popUpDiv_if_necessary()'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var popUpDiv=myDebug.GetId('div_cache_js_formulaire'); if(popUpDiv)return(false); /* */ var classStyle=""; /* ///var width0=parseInt(document.body.clientWidth);///getAttribute('width'); var width0=document.body.clientWidth;///getAttribute('width'); ////al ert("width1: "+width0+"\n width: parseInt "+(width0/2)+"\n isNavigator.isSmartphone: "+isNavigator.isSmartphone);///String(width/2))); width=parseInt(isNavigator.isSmartphone?width0:(width0/2));// :99.3vw 50vw */ width=arrayparams.width+"px";///800;//document.body.clientWidth;///parseInt(isNavigator.isSmartphone?width0:(width0/2));// :99.3vw 50vw ///var marginLeft=(0.5*parseInt((width0-width)/2))+"px"; ///isNavigator.screenW ///var marginLeft=(parseInt((isNavigator.screenW-width)/2))+"px"; var marginLeft=(isNavigator.screenW-width)/2;///+"px"; ////al ert("width2: "+width+"\n width: parseInt "+(width/2)+"\n isNavigator.isSmartphone: "+isNavigator.isSmartphone);///String(width/2))); ///width+="px";// :99.3vw 50vw var height=arrayparams.height; ///document.body.clientHeight;///isNavigator.screenW; ///arrayparams.height;///document.body.scrollHeight+"px";///clientHeight;// auto ///var height=document.body.scrollHeight;///clientHeight;// auto ////document.write(classStyle); wait var form='" + form; ////al ert("x.innerHTML: "+x.innerHTML); ///document.open(); //document.write(form); ///document.close(); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c function js_get_form_popUpDiv_if_necessary() function js_get_form_inputHidden(id,value){ myDebug.line=403;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_form_inputHidden(id,value)',kjsstop:debug_stop}; tagfct.kjsfct='js_get_form_inputHidden(id,value)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var input=''; return(input); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function js_get_form_no_display(ttime){ myDebug.line=1793;try{ ////tagfct = {kjsfile:jsform_popup,kjsline:myDebug.line,kjsfct:'js_get_form_no_display(ttime)',kjsstop:form_popup_stop}; tagfct.kjsfct='js_get_form_no_display(ttime)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; if(ttime){setTimeout(js_get_form_no_display,ttime);return(true);} var o=myDebug.GetId('div_cache_js_formulaire');o.style.display='none'; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function js_get_form_header(formname,title,subtitle){ myDebug.line=541;try{ ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_form_header(formname,title,subtitle)',kjsstop:debug_stop}; tagfct.kjsfct='js_get_form_header(formname,title,subtitle)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; title=(title?title:'');//!\translate 08/08/2020 15:11:35 subtitle=(subtitle?subtitle:'Action en cours');//!\translate 08/08/2020 15:11:35 ////what=(what?what:''); //c http://127. 0.0.1/labo/i-work/demo/images/design/out.gif width=\"30\" height=\"30\" min-width:30px;min-height:30px; ///var APPNAME=isApplication.appname.toUpperCase(); var tableWidth="100%"; var outGif0=""; var outGif=""+outGif0+""; var waitLoading=""; var lineHead=" "; var form=""; form+="";// height=\"25\" width=\"50\" ///_logo_appli cst.APPLICATION form+=""+waitLoading+outGif+""; ///form+=""; form+=""; /////var tdate=new Date(new Date().toString().split('GMT')[0]+' UTC').toISOString().split('.')[0].replace('T',' '); form+=lineHead; var arrJson=jsonLocalisation['step0']; if(arrJson&&arrJson['date_display']) tdate=arrJson['date_display']; else{ var arr=getWeekNumberNow(),tdate=arr[2]; } if(arrJson&&arrJson["thema"]){ var what=arrJson["thema"]; what=""; } what=(what?what:""); form+=""+what+""; form+=lineHead; form+=lineHead; form+=""; ////form+=""; form+=lineHead; form+="
"+outGif0+"   "+isApplication.APPNAME+""+title+"
"+title+"
"+subtitle+"
"+what+"
"+tdate+"
"+subtitle+"
"; form+=""; form+=""; ////tdate=tdate.format('d-m-Y h:i:s'); form+=""; form+="
"; return(form); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c function js_get_form_header(formname,title,subtitle) function js_get_form_display_imgWaiting(loading){ myDebug.line=3459;try{ ////tagfct = {kjsfile:jsform_popup,kjsline:myDebug.line,kjsfct:'js_get_form_display_imgWaiting(loading)',kjsstop:form_popup_stop}; tagfct.kjsfct='js_get_form_display_imgWaiting(loading)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var imgloading=myDebug.GetId('id_imgloading'); if(imgloading)imgloading.style.display=(loading?'inline':'none'); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function js_get_form_loadingEnd(help,color,loading){ myDebug.line=3459;try{ ////tagfct = {kjsfile:jsform_popup,kjsline:myDebug.line,kjsfct:'js_get_form_loadingEnd(help,color,loading)',kjsstop:form_popup_stop}; tagfct.kjsfct='js_get_form_loadingEnd(help,color,loading)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var msg=myDebug.GetId('message_for_help'); if(msg){ if(help!=="*")msg.innerHTML=help; msg.style.color=(color===greenLight||color===blueLight?'blue':'#777');///red'); msg.style.backgroundColor=(color!=="*"?color:blueLight); msg.style.fontWeight="bold"; if(typeof loading==='boolean')js_get_form_display_imgWaiting(loading); } ////if(typeof loading==='boolean')js_get_form_display_imgWaiting(loading); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function js_get_form_resize(form,width,height,loading){ myDebug.line=3847;try{ ///al ert('ok1 '); ///tagfct = {kjsfile:script_debug,kjsline:myDebug.line,kjsfct:'js_get_form_resize(form,width,height,loading)',kjsstop:debug_stop}; tagfct.kjsfct='js_get_form_resize(form,width,height,loading)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; /* width+=(typeof width==='number'?'px':''); height+=(typeof height==='number'?'px':''); */ var d=myDebug.GetId('div_formulaire_of_cache'); d.style.backgroundColor='#eee'; d.innerHTML=form; var o=myDebug.GetId('div_cache_js_formulaire'); o.style.display='inline'; ////al ert('ok2'); /* if(width)d.style.width=width;//+'px'; if(height)d.style.height=height;//+'px';//!\modif 02/09/2020 07:26:14 d.style.marginTop='50vh';//'50vh'; d.style.transform='translateY(-50%)'; */ if(typeof loading==='boolean')js_get_form_loadingEnd("*","*",loading); }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} }//c function js_get_form_resize(form,width,height,loading) function debug_get_form_image_person(arrayparams){ ///al ert("image person"); ///myDebug.debug_view_e_catch("js_get_form_image_person(who)",tagfct); ////var arrayparams={"width":500,"height":700}; js_get_form_popUpDiv_if_necessary(arrayparams); var vline=js_get_form_vline(); var action='contact'; ///var list=action+",*civility,company,*lastname,firstname,*email,phone,!message,!delay"; var form=js_get_form_header(arrayparams.formName,arrayparams.title,"Vous en avez rêvé, "+isApplication.APPNAME+" le fait !");//!\translate 09/08/2020 21:23:02 form+=js_get_form_inputHidden('action',action); form+=arrayparams.content;//''; form+="
"; js_get_form_resize(form,arrayparams.width,arrayparams.height,false); return(false); }//c function debug_get_form_image_person(content) function debug_get_form_popup_image(srcImage){ //if(typeof srcImage==="undefined")var srcImage=cst.srcImageX; if(typeof srcImage==="undefined")var srcImage=cst.srcImageXY; ///al ert('srcImage: '+srcImage+myDebug.chrrc+'cst.srcImageXY: '+cst.srcImageXY+" - "+cst.imgSystem); var content=''; ///var content=''; var arrayparams={"content":content,"width":500,"height":700,"marginTop":1, "formName":"FormZoomImage","title":"Zoom d'image"}; debug_get_form_image_person(arrayparams); ///js_get_form_loadingEnd("*","*",false); js_get_form_display_imgWaiting(false); }//c function debug_get_form_image_person() myDebug.get_form_popup_content=function(typeContent){// image, text var content,arrayparams={"content":content,"width":500,"height":700,"marginTop":1, "formName":"FormZoomImage","title":"Zoom d'image"}; switch(typeContent){ case "image": if(typeof srcImage==="undefined")var srcImage=cst.srcImageXY; ///al ert('srcImage: '+srcImage+myDebug.chrrc+'cst.srcImageXY: '+cst.srcImageXY+" - "+cst.imgSystem); arrayparams.content=''; arrayparams.formName="FormZoomImage"; debug_get_form_image_person(arrayparams); break; case "text": /* Instantiate the generator object. */ lipsum = new LoremIpsum(); /* Generate 100 words in "Lorem ipsum..." style. */ //blah = lipsum.generate(100); arrayparams.content=lipsum.generate(100);//"lorem impsum"; arrayparams.formName="FormZoomText"; debug_get_form_image_person(arrayparams); break; default: content="type non prévu"; arrayparams.formName="FormDefault"; } js_get_form_display_imgWaiting(false); }//c function myDebug.get_formget_form_popup_content(typeContent) //===================== END FORM / ELEMENTS ///myDebug.line=12;try{ }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} function clear_td_on_right(that){ myDebug.line=3940;try{ ///tagfct = {kjsfile:jsform_popup,kjsline:myDebug.line,kjsfct:'clear_td_on_right(that)',kjsstop:form_popup_stop}; tagfct.kjsfct='clear_td_on_right(that)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var bloque=myDebug.GetId('hidden'+that); if(bloque&&Number(bloque.value))return(false); var o=myDebug.GetId(that); if(o){ o.style.display='none'; var service=myDebug.GetId('services'+that); if(service)service.style.display='none'; } }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } function change_td_on_right(that){ myDebug.line=3942;try{ ////tagfct = {kjsfile:jsform_popup,kjsline:myDebug.line,kjsfct:'change_td_on_right(that)',kjsstop:form_popup_stop}; tagfct.kjsfct='change_td_on_right(that)'; tagfct.kjsfile=script_debug;tagfct.kjsline=myDebug.line;tagfct.kjsstop=debug_stop; var d=myDebug.GetId(that); if(d.style.display==='block'){ d.style.backgroundColor='#777'; return(false); } d.style.display='block'; var service=myDebug.GetId('services'+that); if(service)service.style.display='block'; }catch(e){if(myDebug)myDebug.debug_view_e_catch(e,tagfct);} } /** * https://gist.github.com/rviscomi/1479649 * @fileOverview Generates "Lorem ipsum" style text. * @author rviscomi@gmail.com Rick Viscomi, * tinsley@tinsology.net Mathew Tinsley * @version 1.0 */ /** * Copyright (c) 2009, Mathew Tinsley (tinsley@tinsology.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the organization nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY MATHEW TINSLEY ''AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * @class Jibborish generator. */ var LoremIpsum = function () { }; /** * Average number of words per sentence. * @constant {number} */ LoremIpsum.WORDS_PER_SENTENCE_AVG = 24.460; /** * Standard deviation of the number of words per sentence. * @constant {number} */ LoremIpsum.WORDS_PER_SENTENCE_STD = 5.080; /** * List of possible words. * @constant {Array.string} */ LoremIpsum.WORDS = [ 'lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'curabitur', 'vel', 'hendrerit', 'libero', 'eleifend', 'blandit', 'nunc', 'ornare', 'odio', 'ut', 'orci', 'gravida', 'imperdiet', 'nullam', 'purus', 'lacinia', 'a', 'pretium', 'quis', 'congue', 'praesent', 'sagittis', 'laoreet', 'auctor', 'mauris', 'non', 'velit', 'eros', 'dictum', 'proin', 'accumsan', 'sapien', 'nec', 'massa', 'volutpat', 'venenatis', 'sed', 'eu', 'molestie', 'lacus', 'quisque', 'porttitor', 'ligula', 'dui', 'mollis', 'tempus', 'at', 'magna', 'vestibulum', 'turpis', 'ac', 'diam', 'tincidunt', 'id', 'condimentum', 'enim', 'sodales', 'in', 'hac', 'habitasse', 'platea', 'dictumst', 'aenean', 'neque', 'fusce', 'augue', 'leo', 'eget', 'semper', 'mattis', 'tortor', 'scelerisque', 'nulla', 'interdum', 'tellus', 'malesuada', 'rhoncus', 'porta', 'sem', 'aliquet', 'et', 'nam', 'suspendisse', 'potenti', 'vivamus', 'luctus', 'fringilla', 'erat', 'donec', 'justo', 'vehicula', 'ultricies', 'varius', 'ante', 'primis', 'faucibus', 'ultrices', 'posuere', 'cubilia', 'curae', 'etiam', 'cursus', 'aliquam', 'quam', 'dapibus', 'nisl', 'feugiat', 'egestas', 'class', 'aptent', 'taciti', 'sociosqu', 'ad', 'litora', 'torquent', 'per', 'conubia', 'nostra', 'inceptos', 'himenaeos', 'phasellus', 'nibh', 'pulvinar', 'vitae', 'urna', 'iaculis', 'lobortis', 'nisi', 'viverra', 'arcu', 'morbi', 'pellentesque', 'metus', 'commodo', 'ut', 'facilisis', 'felis', 'tristique', 'ullamcorper', 'placerat', 'aenean', 'convallis', 'sollicitudin', 'integer', 'rutrum', 'duis', 'est', 'etiam', 'bibendum', 'donec', 'pharetra', 'vulputate', 'maecenas', 'mi', 'fermentum', 'consequat', 'suscipit', 'aliquam', 'habitant', 'senectus', 'netus', 'fames', 'quisque', 'euismod', 'curabitur', 'lectus', 'elementum', 'tempor', 'risus', 'cras' ]; /** * Generate "Lorem ipsum" style words. * @param num_words {number} Number of words to generate. * @return {string} "Lorem ipsum..." */ LoremIpsum.prototype.generate = function (num_words) { var words, ii, position, word, current, sentences, sentence_length, sentence; /** * @default 100 */ num_words = num_words || 100; words = [LoremIpsum.WORDS[0], LoremIpsum.WORDS[1]]; num_words -= 2; for (ii = 0; ii < num_words; ii++) { position = Math.floor(Math.random() * LoremIpsum.WORDS.length); word = LoremIpsum.WORDS[position]; if (ii > 0 && words[ii - 1] === word) { ii -= 1; } else { words[ii] = word; } } sentences = []; current = 0; while (num_words > 0) { sentence_length = this.getRandomSentenceLength(); if (num_words - sentence_length < 4) { sentence_length = num_words; } num_words -= sentence_length; sentence = []; for (ii = current; ii < (current + sentence_length); ii++) { sentence.push(words[ii]); } sentence = this.punctuate(sentence); current += sentence_length; sentences.push(sentence.join(' ')); } return sentences.join(' '); }; /** * Insert commas and periods in the given sentence. * @param {Array.string} sentence List of words in the sentence. * @return {Array.string} Sentence with punctuation added. */ LoremIpsum.prototype.punctuate = function (sentence) { var word_length, num_commas, ii, position; word_length = sentence.length; /* End the sentence with a period. */ sentence[word_length - 1] += '.'; if (word_length < 4) { return sentence; } num_commas = this.getRandomCommaCount(word_length); for (ii = 0; ii <= num_commas; ii++) { position = Math.round(ii * word_length / (num_commas + 1)); if (position < (word_length - 1) && position > 0) { /* Add the comma. */ sentence[position] += ','; } } /* Capitalize the first word in the sentence. */ sentence[0] = sentence[0].charAt(0).toUpperCase() + sentence[0].slice(1); return sentence; }; /** * Produces a random number of commas. * @param {number} word_length Number of words in the sentence. * @return {number} Random number of commas */ LoremIpsum.prototype.getRandomCommaCount = function (word_length) { var base, average, standard_deviation; /* Arbitrary. */ base = 6; average = Math.log(word_length) / Math.log(base); standard_deviation = average / base; return Math.round(this.gaussMS(average, standard_deviation)); }; /** * Produces a random sentence length based on the average word length * of an English sentence. * @return {number} Random sentence length */ LoremIpsum.prototype.getRandomSentenceLength = function () { return Math.round( this.gaussMS( LoremIpsum.WORDS_PER_SENTENCE_AVG, LoremIpsum.WORDS_PER_SENTENCE_STD ) ); }; /** * Produces a random number. * @return {number} Random number */ LoremIpsum.prototype.gauss = function () { return (Math.random() * 2 - 1) + (Math.random() * 2 - 1) + (Math.random() * 2 - 1); }; /** * Produces a random number with Gaussian distribution. * @param {number} mean * @param {number} standard_deviation * @return {number} Random number */ LoremIpsum.prototype.gaussMS = function (mean, standard_deviation) { return Math.round(this.gauss() * standard_deviation + mean); };