From 1c8b0b3784cf5614652f5207b3bee6bd6234b2f9 Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 21 Oct 2005 17:07:51 +0000 Subject: [PATCH] ordendlicher abbruch bei fehlenden xml file git-svn-id: svn://svn.cccv.de/engel-system@6 29ba0400-6e00-0410-a75a-ca02368028f8 --- admin/dbUpdateFromXLS.php | 6 +++--- inc/funktion_xml.php | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/admin/dbUpdateFromXLS.php b/admin/dbUpdateFromXLS.php index 22b1b0bd..88f7a0f5 100755 --- a/admin/dbUpdateFromXLS.php +++ b/admin/dbUpdateFromXLS.php @@ -58,9 +58,8 @@ else //readXMLfile("xml.php.xml"); -readXMLfile("/tmp/engelXML"); - - +if( readXMLfile("/tmp/engelXML") == 0) +{ /* echo "

"; echo $XMLmain->name; @@ -442,6 +441,7 @@ echo "
\n"; echo "\t\n"; echo "
\n"; +} //if XMLopenOOK include ("./inc/footer.php"); ?> diff --git a/inc/funktion_xml.php b/inc/funktion_xml.php index f740cfac..41a18503 100755 --- a/inc/funktion_xml.php +++ b/inc/funktion_xml.php @@ -107,7 +107,8 @@ function readXMLfile( $file ) xml_set_character_data_handler($xml_parser, "character_data_handler"); if (!($fp = fopen($file, "r"))) { - die("could not open XML input"); + echo("

could not open XML file \"$file\"

"); + return -1; } if( $XMLDEBUG) echo "
";
@@ -122,6 +123,7 @@ function readXMLfile( $file )
 	}
 	if( $XMLDEBUG)	echo "
"; xml_parser_free($xml_parser); + return 0; } /*#######################################################################################*/ @@ -132,7 +134,7 @@ function getXMLsubPease( $Sourse, $Name ) return $value; echo "

Fehler: getXMLsubPease( $Sourse, $Name ) not found

"; - die; +// die; } ?>