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