новенькое

This commit is contained in:
Igor I
2024-10-21 16:31:14 +05:00
parent afbf168bd8
commit 6155890816
3 changed files with 17 additions and 6 deletions

View File

@ -1038,7 +1038,7 @@
echo $xs;
exit();
}elseif ($cmd==3) //Авторизация по логину и паролю
}elseif ($cmd==3) //Авторизация по логину и паролю (везде где используется JWT этот код не нужен)
{
//По идентификатору выбираем информацию о пользователе
$ans='0';

View File

@ -21,7 +21,10 @@ function trt(key)
}
}
}
if(val==null || val===undefined) return (''+key).replace(/_/g, ' ');
if(val==null || val===undefined) {
return ('' + key).replace(/_/g, ' ');
}
else return val;
}

View File

@ -359,9 +359,14 @@ class TWin
//json - объект который передастца в виде JSON строки по URL
//func - функция которая выполниться после загрузки данных в форму
load(url,json,func,tr)
{
this.loadBody(url,"POST",json,func,tr);
console.error('Please use the "loadBody" function.');
};
loadBody(url,method,json,func,tr)
{
this.showProgressBar();
var r=createRequestObject();
let r=createRequestObject();
r.onreadystatechange = function(r,w,thiz,func)
{
return function(){
@ -370,16 +375,19 @@ class TWin
else w.innerHTML=r.responseText;
thiz.hideProgressBar();
if(func !== undefined && func!=null) func();
//Для подстройки формы под новый размер, а то showProgressBar не по размеру было
thiz.div.style.width=thiz.tbl.offsetWidth+"px"
thiz.div.style.height=thiz.tbl.offsetHeight+"px";
thiz.setCenter();
}
}
}(r,this.co,this,func,tr)
r.open( "POST", url, true );
r.open( method, url, true );
r.setRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate");
r.setRequestHeader("Pragma", "no-cache");
r.setRequestHeader("Expires", "0");
if(json!=null)
r.send(JSON.stringify(json));
else