diff --git a/.gitignore b/.gitignore
index 514a6f3..29128a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/values/langfiles
*.swp
*.swo
+commonservices
diff --git a/csv_laden_hu.php b/csv_laden_hu.php
index 22c4989..e69de29 100644
--- a/csv_laden_hu.php
+++ b/csv_laden_hu.php
@@ -1,51 +0,0 @@
-'; // für ungarn sonst weg //////////////////////
-require 'inc/zeichen.php';
-$filename = $_GET['fnam'];
-$csv_datei = 'csv/' . $filename;
-
-if (!file_exists("xml")) {
- mkdir("xml", 0700);
-}
-
-$fp = fopen ( $csv_datei, 'r' );
-$y = 0;
-while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
-{
- $y++;
- //echo 'Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'
';
- $zieldatei = 'xml/' . $y . '.xml';
- if (!$handle = fopen($zieldatei, 'w')) {
- echo "Cannot open file ($zieldatei)";exit;
- }
- $somecontent = '' . "\n"; // für Ungarn ///////////////////////////////////
- /*$somecontent=''."\n"; // normal */
- $somecontent = $somecontent . '' . "\n";
-
- for ($x = 0; $x < count ( $zeile ); $x++)
- {
- $inhalt[$y][$x] = $zeile[$x];
- //echo ''.$inhalt[1][$x].' --> '.$zeile[$x].'
';
- if ($inhalt[$y][$x] == '') $inhalt[$y][$x] = 'ERSATZ';
- //$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).''.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
- $somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
-
- //$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).''.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
- }
- $somecontent = $somecontent . '';
- //if ($y>1)
- //{
- if (fwrite($handle, $somecontent) === FALSE) {
- echo "Cannot write to file ($filename)";exit;
- }
- // echo "Success, wrote to file ($filename)
";
- //}
- fclose($handle);
-}
-fclose($fp);
-echo ($y - 1) . ' files created';
-echo '
Download as zip';
diff --git a/csv_laden_utf.php b/csv_laden_utf.php
index a791c73..02584df 100644
--- a/csv_laden_utf.php
+++ b/csv_laden_utf.php
@@ -1,39 +1 @@
'; // für ungarn sonst weg //////////////////////
-require 'inc/zeichen.php';
-$filename = $_GET['fnam'];
-$csv_datei = 'csv/' . $filename;
-
-mkdir("xml", 0777);
-$fp = fopen ( $csv_datei, 'r' );
-$y = 0;
-while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
-{
- $y++;
- $zieldatei = 'xml/' . $y . '.xml';
- if (!$handle = fopen($zieldatei, 'w')) {
- echo "Cannot open file ($zieldatei)";exit;
- }
- $somecontent = '' . "\n"; // für Ungarn ///////////////////////////////////
- $somecontent = $somecontent . '' . "\n";
-
- for ($x = 0; $x < count ( $zeile ); $x++)
- {
- $inhalt[$y][$x] = $zeile[$x];
- $inhalt[$y][$x] = preg_replace('/[\x00-\x1F\x7F]/u', '', $inhalt[$y][$x]);
- $inhalt[$y][$x] = str_replace('>', ']', str_replace('<', '[', $inhalt[$y][$x]));
- //if ($y!=1) $inhalt[$y][$x] = '';
- $somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg }
- }
- $somecontent = $somecontent . '';
- if (fwrite($handle, $somecontent) === FALSE) {
- echo "Cannot write to file ($filename)";exit;
- }
- fclose($handle);
-}
-fclose($fp);
-echo ($y - 1) . ' files created';
-echo '
Download as zip';
diff --git a/index4.php b/index4.php
index 68e044a..9118083 100644
--- a/index4.php
+++ b/index4.php
@@ -9,10 +9,45 @@ echo '';
echo '
';
echo '
';
echo '';
- echo '';
- echo 'Please wait ... (transforming) ';
- require 'csv_laden_utf.php';
- echo ' | ';
+echo '';
+echo 'Please wait ... (transforming) ';
+ob_start();
+echo ''; // für ungarn sonst weg //////////////////////
+require 'inc/zeichen.php';
+$filename = $_GET['fnam'];
+$csv_datei = 'csv/' . $filename;
+
+mkdir("xml", 0777);
+$fp = fopen ( $csv_datei, 'r' );
+$y = 0;
+while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
+{
+ $y++;
+ $zieldatei = 'xml/' . $y . '.xml';
+ if (!$handle = fopen($zieldatei, 'w')) {
+ echo "Cannot open file ($zieldatei)";exit;
+ }
+ $somecontent = '' . "\n"; // für Ungarn ///////////////////////////////////
+ $somecontent = $somecontent . '' . "\n";
+
+ for ($x = 0; $x < count ( $zeile ); $x++)
+ {
+ $inhalt[$y][$x] = $zeile[$x];
+ $inhalt[$y][$x] = preg_replace('/[\x00-\x1F\x7F]/u', '', $inhalt[$y][$x]);
+ $inhalt[$y][$x] = str_replace('>', ']', str_replace('<', '[', $inhalt[$y][$x]));
+ //if ($y!=1) $inhalt[$y][$x] = '';
+ $somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg }
+ }
+ $somecontent = $somecontent . '';
+ if (fwrite($handle, $somecontent) === FALSE) {
+ echo "Cannot write to file ($filename)";exit;
+ }
+ fclose($handle);
+}
+fclose($fp);
+echo ($y - 1) . ' files created';
+echo ' Download as zip';
+echo ' | ';
echo '
';
echo '
';
echo '
';
diff --git a/index6.php b/index6.php
index b6022a7..884bdf4 100644
--- a/index6.php
+++ b/index6.php
@@ -9,8 +9,54 @@ echo '
echo '';
echo '';
echo 'Please wait ... (transforming) ';
-require 'csv_laden_hu.php';
+
+require 'inc/zeichen.php';
+$filename = $_GET['fnam'];
+$csv_datei = 'csv/' . $filename;
+
+if (!file_exists("xml")) {
+ mkdir("xml", 0700);
+}
+
+$fp = fopen ( $csv_datei, 'r' );
+$y = 0;
+while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
+{
+ $y++;
+ //echo 'Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).' ';
+ $zieldatei = 'xml/' . $y . '.xml';
+ if (!$handle = fopen($zieldatei, 'w')) {
+ echo "Cannot open file ($zieldatei)";exit;
+ }
+ $somecontent = '' . "\n"; // für Ungarn ///////////////////////////////////
+ /*$somecontent=''."\n"; // normal */
+ $somecontent = $somecontent . '' . "\n";
+
+ for ($x = 0; $x < count ( $zeile ); $x++)
+ {
+ $inhalt[$y][$x] = $zeile[$x];
+ //echo ''.$inhalt[1][$x].' --> '.$zeile[$x].' ';
+ if ($inhalt[$y][$x] == '') $inhalt[$y][$x] = 'ERSATZ';
+ //$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).''.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
+ $somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
+
+ //$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).''.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
+ }
+ $somecontent = $somecontent . '';
+ //if ($y>1)
+ //{
+ if (fwrite($handle, $somecontent) === FALSE) {
+ echo "Cannot write to file ($filename)";exit;
+ }
+ // echo "Success, wrote to file ($filename)
";
+ //}
+ fclose($handle);
+}
+fclose($fp);
+
+echo ($y - 1) . ' files created';
+echo ' Download as zip';
echo ' | ';
echo '
';
echo '
';
-echo '';
\ No newline at end of file
+echo '';