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/connect.php");
3
	include("/web/apache/mediaran.de/preisagent/transfer/1und1/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
			$buffer=get_clear_path($heritage);
23
			$current_row[category]=$buffer[0];
24
 
25
			$ValidFrom	=	date("Y-m-d",time());
26
			$ValidUntil	=	date("Y-m-d",time() + 60*60*6); // 60 Sekunden * 60 Minuten * 6 Stunden
27
 
28
			$buffer=array();
29
 
30
			$buffer["Language"]				=	"de";
31
			$buffer["merchantCategorie"]	=	$current_row[category];
32
			$buffer["ProductID"]			=	"";
33
			$buffer["OfferID"]				=	$current_row[ID];
34
			$buffer["Name"]					=	substr($current_row[bezeichnung], strpos ($current_row[bezeichnung], " ")+1);
35
			$buffer["Brand"]				=	substr($current_row[bezeichnung], 0, strpos ($current_row[bezeichnung], " "));
36
			$buffer["Description"]			=	preg_replace("/[\r\n;]/", "", $current_row[beschreibung]);
37
			$buffer["DeepLink"]				=	"http://s87594393.einsundeinsshop.de/shopdata/go.shopscript?a=".$current_row[ID];
38
			$buffer["ImageURL"]				=	"http://s87594393.einsundeinsshop.de/shopdata$current_row[bild]";
39
 
40
			$buffer["Delivery"]				=	"siehe Shop";
41
			$buffer["ValidFrom"]			=	"";
42
			$buffer["ValidUntil"]			=	"";
43
			$buffer["Prices"]				=	number_format($current_row[preis], 2, ',', '');
44
 
45
			$output[]=$buffer;
46
		}
47
 
48
		foreach($subdirs as $current_subdir)
49
		{
50
			ausgabe($current_subdir,$heritage);
51
		}
52
	}
53
 
54
	$output=array();
55
	ausgabe(core_data(419),array());
56
	// $output ist jetzt gefüllt
57
 
58
	foreach($output as $elem)
59
	{
60
		echo "\"".implode("\";\"",$elem)."\"\n";
61
	}
62
?>