Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?
        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)
                {
                        $dropFelder=array
                        (
                                "bild",
                                "beschreibung",
                                "detailbeschreibung",
                                "detailbild",
                                "templatefile_smalllist",
                                "templatefile_detail",
                                "is_invisible",
                                "mwst",
                                "artikelnr"
                        );
                        
                        foreach($dropFelder as $dropping)
                        {
                                unset($current_row[$dropping]);
                        }
                        
                        $current_row[preis]=number_format($current_row[preis],2,',','.');

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

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