Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

Artikelnummer;Hersteller;Produktname;Produktbeschreibung;Preis(EUR);Link;Bildlink;EAN;Kategorie;Versand(EUR);Lieferzeit
<?
        include("/web/apache/mediaran.de/connect.php"); 
        include("/web/apache/mediaran.de/preisagent/transfer/1und1/core_data.php");
        
        function get_clear_path($heritage)
        {
                array_shift($heritage);
                return $heritage;
        }

        function ausgabe($subdir,$heritage)
        {
                global $output;
                
                $artikel=array_pop($subdir);
                $subdirs=array_pop($subdir);

                $heritage[]=$subdir[Name];
                
                foreach($artikel as $current_row)
                {
                        $buffer=get_clear_path($heritage);
                        $current_row[category]=$buffer[0];

                        $buffer=array();
                        
                        $buffer["category"]                             =       $current_row[category];
                        $buffer["Produktname"]                  =       $current_row[bezeichnung];
                        $buffer["Link"]                                 =       "http://s87594393.einsundeinsshop.de/shopdata/go.shopscript?a=".$current_row[ID];
                        $buffer["Preis(EUR)"]                   =       $current_row[preis];

                        $output[]=$buffer;
                }
                
                foreach($subdirs as $current_subdir)
                {
                        ausgabe($current_subdir,$heritage);
                }
        }

        $output=array();
        ausgabe(core_data(),array());
        // $output ist jetzt gefüllt
        
        foreach($output as $elem)
        {
                echo implode(";",$elem)."\n";
        }
?>