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
			$dropFelder=array
23
			(
24
				"category",
25
				"detailbeschreibung",
26
				"detailbild",
27
				"templatefile_smalllist",
28
				"templatefile_detail",
29
				"is_invisible",
30
				"mwst",
31
				"bild",
32
				"artikelnr"
33
			);
34
 
35
			foreach($dropFelder as $dropping)
36
			{
37
				unset($current_row[$dropping]);
38
			}
39
 
40
			$current_row["Deeplink"]		=	"http://www.avt-24.de/geizhals.htm?file=item.php&id=".$current_row[ID];
41
			$current_row[Beschreibung]=preg_replace("/[\r\n]/", "", $current_row[beschreibung]);
42
			unset($current_row[beschreibung]);
43
			$current_row[Verf]="lieferbar";
44
			$current_row[preis]=number_format($current_row[preis],2,',','.');
45
 
46
			$output[]=$current_row;
47
		}
48
 
49
		foreach($subdirs as $current_subdir)
50
		{
51
			ausgabe($current_subdir,$heritage);
52
		}
53
	}
54
 
55
	$output=array();
56
	ausgabe(core_data(),array());
57
	// $output ist jetzt gefüllt
58
 
59
	echo "ArtikelNr\tBezeichnung\tPreis\tDeeplink\tBeschreibung\tVerfügbarkeit\n";
60
	foreach($output as $elem)
61
	{
62
		echo implode("\t",$elem)."\n";
63
	}
64
?>