Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
3 lars 1
<?
2
	include("/web/apache/mediaran.de/preisagent/transfer/connect.php");
3
	include("/web/apache/mediaran.de/preisagent/transfer/avt-24/core_data.php");
4
 
5
	function get_clear_path($heritage)
6
	{
7
		array_shift($heritage);
8
		return $heritage;
9
	}
10
 
11
	function ausgabe($subdir,$heritage)
12
	{
13
		global $output;
14
 
15
		$artikel=array_pop($subdir);
16
		$subdirs=array_pop($subdir);
17
 
18
		$heritage[]=$subdir[Name];
19
 
20
		foreach($artikel as $current_row)
21
		{
22
			$current_row[category]=implode("|",get_clear_path($heritage));
23
			$output[]=$current_row;
24
		}
25
 
26
		foreach($subdirs as $current_subdir)
27
		{
28
			ausgabe($current_subdir,$heritage);
29
		}
30
	}
31
 
32
	$output=array();
33
	ausgabe(core_data(),array());
34
	// $output ist jetzt gefüllt
35
 
36
	$felder=array
37
	(
38
		"Bestellnummer",
39
		"Produktbezeichnung",
40
		"Produktbeschreibung",
41
		"Preis",
42
		"Lieferstatus"
43
	);
44
	echo implode("\t",$felder)."\n";
45
 
46
	foreach ($output as $artikel)
47
	{
48
		echo
49
			$artikel[ID]."\t".
50
			preg_replace("/[\r\n]/", "", $artikel[bezeichnung])."\t".
51
			preg_replace("/[\r\n]/", "", $artikel[beschreibung])."\t".
52
			$artikel[preis1]."\t".
53
			$artikel[preis4]."\t".
54
			$artikel[preis]."\t".
55
			"lieferbar\n";
56
	}
57
?>