DB = new DB($conf->WFdbhost,$conf->WFdbname,$conf->WFdbuser,$conf->WFdbpass,null,$conf->WFdbport); $app->remote = new Remote($app); if(class_exists('erpAPICustom')) { $erp = new erpAPICustom($app); }else{ $erp = new erpAPI($app); } $app->erp = $erp; } //$app->DB->Update("UPDATE artikel SET cache_lagerplatzinhaltmenge='0'"); $shops = $app->DB->SelectArr("SELECT id from shopexport s where s.geloescht <> '1' AND s.aktiv = '1'"); if($shops) { foreach($shops as $shop) { $partner = $app->DB->SelectArr("SELECT p.*,a.name,a.strasse,a.telefon,a.plz,a.ort,a.land,a.telefax,a.email from partner p left join adresse a on p.adresse = a.id where p.shop= '".$shop['id']."' and p.geloescht <> '1'"); if($partner) { $app->remote->RemoteSendPartner($shop['id'],$partner); } } } else { echo "Keine Shops"; } echo "\r\n"; /* if($message !="") { $erp->MailSend($erp->GetFirmaMail(),$erp->GetFirmaName(),$erp->GetFirmaBCC1(),"Lagerverwaltung","Systemmeldung: Auto Update Lagerlampen",$message); } */ ?>