| 3 |
lars |
1 |
"Warengruppe"|"Artikelnummer"|"Hersteller"|"Artikelbezeichnung"|"Preis"|"Produktverfügbarkeit"|"Deeplink"|"BildURL"|"Lieferbarkeit"
|
|
|
2 |
<?
|
|
|
3 |
include("/web/apache/mediaran.de/preisagent/transfer/connect.php");
|
|
|
4 |
include("/web/apache/mediaran.de/preisagent/transfer/avt-24/core_data.php");
|
|
|
5 |
|
|
|
6 |
function get_clear_path($heritage)
|
|
|
7 |
{
|
|
|
8 |
array_shift($heritage);
|
|
|
9 |
return $heritage;
|
|
|
10 |
}
|
|
|
11 |
|
|
|
12 |
function ausgabe($subdir,$heritage)
|
|
|
13 |
{
|
|
|
14 |
global $output;
|
|
|
15 |
|
|
|
16 |
$artikel=array_pop($subdir);
|
|
|
17 |
$subdirs=array_pop($subdir);
|
|
|
18 |
|
|
|
19 |
$heritage[]=$subdir[Name];
|
|
|
20 |
|
|
|
21 |
foreach($artikel as $current_row)
|
|
|
22 |
{
|
|
|
23 |
$buffer=$heritage;
|
|
|
24 |
array_shift($buffer);
|
|
|
25 |
$current_row[category]=implode($buffer," > ");
|
|
|
26 |
|
|
|
27 |
$buffer=array();
|
|
|
28 |
|
|
|
29 |
$buffer["Kategorie"] = $current_row[category];
|
|
|
30 |
$buffer["Artikelnummer"] = $current_row[ID];
|
|
|
31 |
$buffer["Hersteller"] = substr($current_row[bezeichnung], 0, strpos ($current_row[bezeichnung], " "));
|
|
|
32 |
$buffer["Produktname"] = $current_row[bezeichnung];
|
|
|
33 |
$buffer["Preis(EUR)"] = $current_row[preis];
|
|
|
34 |
$buffer["Produktverfügbarkeit"] = "lieferbar";
|
|
|
35 |
$buffer["Link"] = "http://www.avt-24.de/idealo.htm?file=item.php&id=".$current_row[ID];
|
|
|
36 |
$buffer["Bildlink"] = "http://www.avt-24.de/images/bild1/$current_row[bild]";
|
|
|
37 |
if (!$current_row[bild]) { $buffer["Bildlink"] = ""; }
|
|
|
38 |
|
|
|
39 |
$buffer["Lieferzeit"] = "lieferbar";
|
|
|
40 |
|
|
|
41 |
$output[]=$buffer;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
foreach($subdirs as $current_subdir)
|
|
|
45 |
{
|
|
|
46 |
ausgabe($current_subdir,$heritage);
|
|
|
47 |
}
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
$output=array();
|
|
|
51 |
ausgabe(core_data(),array());
|
|
|
52 |
// $output ist jetzt gefüllt
|
|
|
53 |
|
|
|
54 |
foreach($output as $elem)
|
|
|
55 |
{
|
|
|
56 |
echo "\"".implode("\"|\"",$elem)."\"\n";
|
|
|
57 |
}
|
|
|
58 |
?>
|