| 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]=implode("/",$buffer);
|
|
|
24 |
|
|
|
25 |
$buffer=array();
|
|
|
26 |
|
|
|
27 |
$buffer["Produktbezeichnung"] = $current_row[bezeichnung];
|
|
|
28 |
$buffer["Beschreibung"] = "\"".preg_replace("/[\r\n;]/", "", preg_replace("/\"/", """,$current_row[beschreibung]))."\"";
|
|
|
29 |
$buffer["Preis"] = preg_replace("/\./", ",",$current_row[preis]);
|
|
|
30 |
|
|
|
31 |
$buffer["Deeplink"] = "http://s87594393.einsundeinsshop.de/shopdata/go.shopscript?a=".$current_row[ID];
|
|
|
32 |
$buffer["Bild"] = "http://s87594393.einsundeinsshop.de/shopdata$current_row[bild]";
|
|
|
33 |
|
|
|
34 |
$buffer["Waehrung"] = "EUR";
|
|
|
35 |
$buffer["Kategorie"] = $current_row[category];
|
|
|
36 |
|
|
|
37 |
$output[]=$buffer;
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
foreach($subdirs as $current_subdir)
|
|
|
41 |
{
|
|
|
42 |
ausgabe($current_subdir,$heritage);
|
|
|
43 |
}
|
|
|
44 |
}
|
|
|
45 |
|
|
|
46 |
$output=array();
|
|
|
47 |
ausgabe(core_data(),array());
|
|
|
48 |
// $output ist jetzt gefüllt
|
|
|
49 |
|
|
|
50 |
foreach($output as $elem)
|
|
|
51 |
{
|
|
|
52 |
echo implode(";",$elem)."\n";
|
|
|
53 |
}
|
|
|
54 |
?>
|