X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/98255c8891bd9b772f73be9a72e4f456998c8b3b..03ea97647e3fbdea4323f4f2136bdfa87cb15c1b:/lxo-import/import_lib.php?ds=sidebyside diff --git a/lxo-import/import_lib.php b/lxo-import/import_lib.php index 72f3ae39d..902feff2c 100644 --- a/lxo-import/import_lib.php +++ b/lxo-import/import_lib.php @@ -69,8 +69,8 @@ $parts = array( "weight" => "Gewicht in Benutzerdefinition", "onhand" => "Lagerbestand", "notes" => "Beschreibung", - "makemodel" => "Hersteller", - "model" => "Modellbezeichnung", + //"makemodel" => "Hersteller", + //"model" => "Modellbezeichnung", "bin" => "Lagerort", "image" => "Pfad/Dateiname", "drawing" => "Pfad/Dateiname", @@ -88,6 +88,7 @@ $parts = array( "shop" => "Shopartikel (Y/N)", "assembly" => "Stückliste (Y/N); wird noch nicht unterstützt", "partsgroup" => "Warengruppenbezeichnung", + "partsgroup1" => "2.Warengruppenbezeichnung", //"income_accno_0" => "?Nummer? für Erlöse Inland", //"income_accno_1" => "?Nummer? für Erlöse EG", //"income_accno_3" => "?Nummer? für Erlöse Ausland", @@ -287,6 +288,10 @@ class myDB extends DB { var $showErr = false; var $db = false; var $debug = false; + var $logsql = false; + var $errfile = false; + var $logfile = false; + /**************************************************** * uudecode @@ -296,6 +301,7 @@ class myDB extends DB { * http://de3.php.net/base64_decode (bug #171) *****************************************************/ function uudecode($encode) { + $encode=stripslashes($encode); $b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; $encode = preg_replace("/^./m","",$encode); @@ -317,13 +323,17 @@ class myDB extends DB { echo "$sql : $err\n"; } - function showDebug($sql) { + function showDebug($sql) { echo $sql."\n"; if ($this->debug==2) { print_r($this->rc); }; } + function logSql($sql) { + if (!$this->logfile) $this->logfile=fopen("import.sql","a"); + fputs($this->logfile,$sql."\n"); + } function myDB($usr) { // Datenbankparameter des ERP-Users benutzen. $tmp = file_get_contents("../users/$usr.conf"); @@ -357,6 +367,7 @@ class myDB extends DB { function query($sql) { $this->rc=@$this->db->query($sql); + if ($this->logsql) $this->logSql($sql); if ($this->debug) $this->showDebug($sql); if(DB::isError($this->rc)) { $this->dbFehler($sql,$this->rc->getMessage()); @@ -367,6 +378,7 @@ class myDB extends DB { } function getAll($sql) { $this->rc=@$this->db->getAll($sql,DB_FETCHMODE_ASSOC); + if ($this->logsql) $this->logSql($sql); if ($this->debug) $this->showDebug($sql); if(DB::isError($this->rc)) { $this->dbFehler($sql,$this->rc->getMessage());