try{
js.pageFileSource='/iC/_scripts/js/firstForm';
var orientationScreen=window.screen.orientation.type;//landscape-primary
var orientationAngleScreen=window.screen.orientation.angle;
var orientation=orientationScreen+"-"+orientationAngleScreen;//landscape-primary-0
let paramsScreen="paramsScreen";
// Apply setCookie
setCookie("paramsScreen", window.screen.width+"x"+window.screen.height, 30);
var jsuserSitename=jsStartSite.userSite;
var jsidAddress=jsStartSite.isRemoteIP;//'';
jsStartSite.isLOCALHOST='http:\/\/localhost\/'.includes('localhost')&&(jsidAddress==jslocalhost);
document.getElementById("idparamA").value="";
document.getElementById("idclickA").value="";
//===
//======
function padTo2Digits(num){js.fct="js.fct:jsb:padTo2Digits(num)";
return num.toString().padStart(2,'0');
}//!\end:function padTo2Digits(num){js.fct="js.fct:jsb:padTo2Digits(num)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//======
function formatTimeMMSS(date){js.fct="js.fct:jsb:formatTimeMMSS(date)";
return([padTo2Digits(date.getHours()),padTo2Digits(date.getMinutes()),padTo2Digits(date.getSeconds()),].join(''));
}//!\end:function formatTimeMMSS(date){js.fct="js.fct:jsb:formatTimeMMSS(date)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//======
function formatDate(date){js.fct="js.fct:jsb:formatDate(date)";
return([date.getFullYear(),padTo2Digits(date.getMonth() + 1),padTo2Digits(date.getDate()),].join('-')+' ' +
[padTo2Digits(date.getHours()),padTo2Digits(date.getMinutes()),padTo2Digits(date.getSeconds()),].join(':')
);
}//!\end:function formatDate(date){js.fct="js.fct:jsb:formatDate(date)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//======
function goNewContentPostit(NewPostitThIs,mode){js.fct="js.fct:jsb:goNewContentPostit(NewPostitThIs,mode)";
///function goNewContentPostit(NewPostitThIs,mode){js.fct="js.fct:jsb:goNewContentPostit(NewPostitThIs,mode)";
switch(mode){
case "new0":
let d=formatDate(new Date());
content='
'+d+' | ID: '+jlist_Postits.NumberID+' | ADNK: '+'ADNKID'+'
';
// content+='
';
content+=contentHR;//'
';
content+='(zone du contenu qui sera enregistré)
';
break;
case "new1":
default:
valueOnsubmit="goSaveNewPostit(this);return(false);";
valueSuccess='Postit Form';
value_form_='postit.0,'+js.tablez+',password,record,keywords,content';
array=[valueOnsubmit,valueSuccess,value_form_];
content='';
content+='';
content+='
'+'//!\fr Mots clés'+': ';
content+='
'+'';
content=goConstructForm(array,content);
break;
}
return(content);
}//!\end:function goNewContentPostit(NewPostitThIs,mode){js.fct="js.fct:jsb:goNewContentPostit(NewPostitThIs,mode)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function getXDomainRequest(){js.fct="js.fct:jsb:getXDomainRequest()";
if (window.XDomainRequest){js.xdr = new XDomainRequest(); }
else if (window.XMLHttpRequest) { js.xdr = new XMLHttpRequest(); }
else {js.line=68;jsfct_dvlptAlert(['',l2p,h2p,"//!\fr Votre navigateur ne gère pas l'AJAX cross-domain !"]);
}
return js.xdr;
}//!\end:function getXDomainRequest(){js.fct="js.fct:jsb:getXDomainRequest()";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function jsc_getformDataObj(formthis){js.fct="js.fct:jsb:jsc_getformDataObj(formthis)";
//----
js.formdata=new FormData(formthis);
//jspageFileAXForum
js.formdata.append("FileAX",postPostit.jspageFileAXForum);
js.formdata.append("FileLearnerSerialData",postPostit.jsfileLearnerSerialData);
js.formdata.append("userSite",jsStartSite.userSite);
js.formdata.append("isDir_iC",jsStartSite.isDir_iC);
js.formdata.append("isDir_Site",jsStartSite.isDir_Site);
js.formdata.append("isLOCALHOST",jsStartSite.isLOCALHOST);
js.formdata.append("isRemoteIP",jsStartSite.isRemoteIP);
js.formdata.append("isLang",jsStartSite.isLang);
js.formdata.append("isConnected",jsStartSite.isConnected);
//----
js.iData={};js.formdata.forEach((value,key)=>(js.iData[key]=value));
return(new Array(js.formdata,js.iData));
}//!\end:function jsc_getformDataObj(formthis){js.fct="js.fct:jsb:jsc_getformDataObj(formthis)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function sendDataOpenResults(formthis){js.fct="js.fct:jsb:sendDataOpenResults(formthis)";
let d0=formatTimeMMSS(new Date(),'');d1=d0;
while(d1-d0<3) {//inférieur à 3s
d1=formatTimeMMSS(new Date(),'');
if((d1-d0)){
//-----
msg="";sparseArray=["'xdebug-error'","Notice: Undefined Index","Parse error: syntax error"];
for(element of sparseArray){indexOfFirst=js.xdr.responseText.indexOf(element);
if(indexOfFirst>-1){errorXText=msg="Warning! "+element+"\n"+js.xdr.responseText;break;}
}
if(msg){alert(msg);return;}
//-----
js.oData=JSON.parse(js.xdr.responseText);
msg="";sparseArray=["js.oData.success","js.oData.fileResult"];
for(element of sparseArray){if(!js.oData.success||!js.oData.fileResult){errorXText=msg="Warning! "+element;break;}}
if(msg){alert(msg);return;}
//-----
dataSuccessForm=js.iData.success.split("|");iT=dataSuccessForm[0];dataSuccessForm=dataSuccessForm[1];
dataSuccessoData=js.oData.success.split("|");oT=dataSuccessoData[0];dataSuccessoData=dataSuccessoData[1];
sameSuccess=(iT==0&&oT==1&&(dataSuccessForm===dataSuccessoData));
//-----
if(sameSuccess){
idSuccessHx=document.getElementById(formthis.idSuccessHx.name);
if(idSuccessHx){
idSuccessHx.style.padding="5";
idSuccessHx.style.margin="5";
idSuccessHx.style.border="dashed 2px green";
idSuccessHx.style.background="#efeeef";
idSuccessHx.style.fontWeight="bold";
idSuccessHx.style.fontSize="1.5vw";
idSuccessHx.style.display="inline";
jsmethodControlCommonWaiting("idSuccessHx","//!\fr réussite","green");
}
if(0){
//-----
idResponseHx=document.getElementById("idResponseHx");
if(idResponseHx){
idResponseHx.style.fontSize="0.8vw";
idResponseHx.innerHTML=js.iData.mail+", "+js.iData.pass+", "+" | "+js.oData.mail+", "+js.oData.pass+" | "
+(js.iData.mail==js.oData.mail&&js.iData.pass==js.oData.pass);
}
//-----
idobjectConON0=document.getElementById("idobjectConON0");
//idobjectConON0.style.display="inline";
idobjectConON1=document.getElementById("idobjectConON1");
if(idobjectConON0){
idobjectConON0.style.display=idobjectConON1.style.display="inline";
}
//-----
idobjectConOFF=document.getElementById("idobjectConOFF");
if(idobjectConOFF){
idobjectConOFF.style.display="none";
}
//-----
}
return(true);
}
js.line=305;jsfct_dvlptAlert(['',l2p+js.line,h2p+js.fct,"idSuccessHx.style.color= "+idSuccessHx.style.color
]);
idSuccessHx.style.color="red";
break;//!\sendX //step:logger:9 traitment of js.xdr.responseText ready
}//!\end:js:if((d1-d0)){
}//!\end:js:while (d1-d0<3) {//inférieur à 3s
}//!\end:function sendDataOpenResults(formthis){js.fct="js.fct:jsb:sendDataOpenResults(formthis)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function goConstructForm(array,content){js.fct="js.fct:jsb:goConstructForm(array,content)";
return(jsmethodConstructFORM(true,array)+content+jsmethodConstructFORM(false));// head+content+end
}//!\end:function goConstructForm(array,content){js.fct="js.fct:jsb:goConstructForm(array,content)";
//3$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function jsmethodConstructFORM(mode,xarray){js.fct="js.fct:jsb:jsmethodConstructFORM(mode,xarray)";
// permet de créer une form pour ajax
content='';
if(mode===false)return('');
if(jsStartSite.isLOCALHOST){
content='';
content+='idResponseHx
';
}
if(mode&&xarray){
xonsubmit=xarray[0];//'goSaveNewPostit(this,\'ta blez\');return(false);';
valueSuccess=xarray[1];//'Postit Form';
value_form_=xarray[2];//'postit.0,ta blez,password,record,keywords,content';
content='