Поправил функцию getColN(name) для поиска данных по названию колонки.
This commit is contained in:
@ -1101,7 +1101,7 @@
|
|||||||
}else
|
}else
|
||||||
if ($fn==8)//Получить отчёт как Excel.xls файл (почти тоже самое что и функция 4)
|
if ($fn==8)//Получить отчёт как Excel.xls файл (почти тоже самое что и функция 4)
|
||||||
{
|
{
|
||||||
$dir='./temp/';
|
$dir='./temp/'; //$tmpfname = tempnam($dir, "");
|
||||||
// отправка файла в отдельном файле download.php для совместимости с java версией
|
// отправка файла в отдельном файле download.php для совместимости с java версией
|
||||||
session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими
|
session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими
|
||||||
|
|
||||||
@ -1307,7 +1307,6 @@
|
|||||||
header('Content-type: text/xml');
|
header('Content-type: text/xml');
|
||||||
echo '<?xml version="1.0" encoding="utf-8"?><metadata fn="8"><file><![CDATA['.$num.']]></file></metadata>';
|
echo '<?xml version="1.0" encoding="utf-8"?><metadata fn="8"><file><![CDATA['.$num.']]></file></metadata>';
|
||||||
|
|
||||||
//deleteTempFiles($dir);
|
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
sendError(1,trt('Not found the requested node:').' "'.$typename.'"!');
|
sendError(1,trt('Not found the requested node:').' "'.$typename.'"!');
|
||||||
|
|||||||
@ -1462,10 +1462,11 @@ class SRec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get column number by name
|
//Get column number by name, if result=-1 then not find else find
|
||||||
getColN(name){
|
getColN(name){
|
||||||
let i=-1;
|
let result=-1;
|
||||||
//determine the sequence number of the column
|
//determine the sequence number of the column
|
||||||
|
let pos=0;
|
||||||
let node=findNodeOnPath(this.nodeMetadata,"type/objects-list");
|
let node=findNodeOnPath(this.nodeMetadata,"type/objects-list");
|
||||||
let nodeCol = node.firstChild;
|
let nodeCol = node.firstChild;
|
||||||
while (nodeCol != null)
|
while (nodeCol != null)
|
||||||
@ -1473,13 +1474,14 @@ class SRec
|
|||||||
if(nodeCol.nodeName=="column")
|
if(nodeCol.nodeName=="column")
|
||||||
{
|
{
|
||||||
if(nodeCol.getAttribute("n")==name){
|
if(nodeCol.getAttribute("n")==name){
|
||||||
|
result=pos;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i++;
|
pos++;
|
||||||
}
|
}
|
||||||
nodeCol = nodeCol.nextSibling;
|
nodeCol = nodeCol.nextSibling;
|
||||||
}
|
}
|
||||||
return i;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//find the value in the result set by the id of the record and the name of the column
|
//find the value in the result set by the id of the record and the name of the column
|
||||||
|
|||||||
@ -632,8 +632,8 @@ function setCookie (name, value, expires, path, domain, secure)
|
|||||||
((expires) ? "; expires=" + expires : "") +
|
((expires) ? "; expires=" + expires : "") +
|
||||||
((path) ? "; path=" + path : "") +
|
((path) ? "; path=" + path : "") +
|
||||||
((domain) ? "; domain=" + domain : "") +
|
((domain) ? "; domain=" + domain : "") +
|
||||||
((secure) ? "; secure" : "");
|
((secure) ? "; secure" : "") +
|
||||||
|
"; SameSite=Strict";
|
||||||
document.cookie = str;
|
document.cookie = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user