\n
\n\n\n\n";
@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
$shopnr = $_GET["Shop"];
$nofiles = ( $_GET["nofiles"] == '1' )?true:false;
} else {
$p = array('shopnr','nofiles');
if ( $argc > 1 ) {
for( $i=1; $ioriginal = false;
//ERP-Instanz
$erpdb = new mydb($ERPhost,$ERPdbname,$ERPuser,$ERPpass,$ERPport,'pgsql',$err,$debug);
if ($erpdb->db->connected_database_name == $ERPdbname) {
$erp = new erp($erpdb,$err,$divStd,$divVerm,$auftrnr,$kdnum,$preA,$preK,$invbrne,$mwstS,$OEinsPart,$lager,$pricegroup,$ERPusrID);
} else {
$err->out('Keine Verbindung zur ERP',true);
exit();
}
//Shop-Instanz
$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err,$debug);
if ($shopdb->db->connected_database_name == $SHOPdbname) {
$shop = new pepper($shopdb,$err,$SHOPdbname,$divStd,$divVerm,$minder,$nachn,$versandS,$versandV,$paypal,$treuhand,$mwstLX,$mwstS,$variantnr,$pict,$nopic,$nopicerr,$nofiles);
} else {
$err->out('Keine Verbindung zum Shop',true);
exit();
}
$artikel = $erp->getParts($pricegroup);
$lang = $shop->getLang("de");
$cnt = 0;
$errors = 0;
if ( $api != 'cli' ) ob_start();
$err->out("Artikelexport für Shop $shopnr",true);
if ($artikel) foreach ($artikel as $row) {
$rc = $shop->saveArtikel($row,"de");
if ($rc) {
$cnt++;
if ( $cnt % 10 == 0 ) $err->out(".");
} else {
$errors++;
}
}
$err->out('',true);
$err->out("$cnt Artikel übertragen, $errors Artikel nicht",true);
if ( $api != "cli" ) {
echo "\n