From 0a25d999343bd72895533d7bb43b167ba2d42335 Mon Sep 17 00:00:00 2001 From: igor Date: Mon, 24 Jan 2022 20:43:19 +0600 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B0=D0=B9=D0=BB=20=D0=B2=20PHP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadata/dbms/records.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php index 46c621c..651f462 100644 --- a/metadata/dbms/records.php +++ b/metadata/dbms/records.php @@ -21,7 +21,6 @@ //include("../include/toExcell.php"); //require_once("config.php"); - function getCurrentDirectory() { $path = dirname($_SERVER['PHP_SELF']); $position = strrpos($path,'/') + 1; @@ -815,9 +814,16 @@ { if($nextnode->getAttribute("vt")=="b"){ if($row[$nextnode->getAttribute("n")]===false) { $row[$nextnode->getAttribute("n")]="0"; } else if($row[$nextnode->getAttribute("n")]===true) { $row[$nextnode->getAttribute("n")]="1"; } } - if($nextnode->getAttribute("vt")=="blob") { $xmlstring.='getAttribute("cd")].']]>'."\n"; } - //else if($nextnode->getAttribute("vt")=="file") { $xmlstring.='getAttribute("cd")].']]>'."\n"; } - else { $xmlstring.='getAttribute("n")].']]>'."\n"; } + if($nextnode->getAttribute("vt")=="blob") { //Только blob не file так как file как обычная текстовая строка (100 символов) + if(array_key_exists($nextnode->getAttribute("cd"), $row)) { + $xmlstring .= 'getAttribute("cd")] . ']]>' . "\n"; + }else{ + sendError('Поле "'.$nextnode->getAttribute("cd").'" не найдено в результирующем наборе!'); + } + } + else { + $xmlstring.='getAttribute("n")].']]>'."\n"; + } }else { sendError('Поле "'.$nextnode->getAttribute("n").'" не найдено в результирующем наборе!');