From: Sven Schöling Date: Fri, 29 Jun 2012 10:36:32 +0000 (+0200) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-3.0.0beta1~317 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/1085fcebcf6bb39790162b89f3a9e59d00446d00?hp=37eb6908b96fb01c90a7130ff8453926a337876f Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/peppershop/ArtikelErpToShop.php b/peppershop/ArtikelErpToShop.php index ff8a56acc..087e207cb 100644 --- a/peppershop/ArtikelErpToShop.php +++ b/peppershop/ArtikelErpToShop.php @@ -11,14 +11,23 @@ if ( $api != "cli" ) { $shopnr = $_GET["Shop"]; $nofiles = ( $_GET["nofiles"] == '1' )?true:false; } else { + $p = array('shopnr','nofiles'); if ( $argc > 1 ) { - $tmp = explode("=",trim($argv[1])); - if ( count($tmp) != 2 ) { - echo "Falscher Aufruf: php shop=1\n"; - exit (-1); - } else { - $shopnr = $tmp[1]; + for( $i=1; $idb->connected_database_name == $ERPdbname) { exit(); } //Shop-Instanz -$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err); +$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 { diff --git a/peppershop/ArtikelShopToErp.php b/peppershop/ArtikelShopToErp.php index d7b4d1ef2..173e2fa31 100644 --- a/peppershop/ArtikelShopToErp.php +++ b/peppershop/ArtikelShopToErp.php @@ -11,14 +11,23 @@ if ( $api != "cli" ) { $shopnr = $_GET["Shop"]; $nofiles = ( $_GET["nofiles"] == '1' )?true:false; } else { + $p = array('shopnr','nofiles'); if ( $argc > 1 ) { - $tmp = explode("=",trim($argv[1])); - if ( count($tmp) != 2 ) { - echo "Falscher Aufruf: php shop=1\n"; - exit (-1); - } else { - $shopnr = $tmp[1]; - } + for( $i=1; $i 1 ) { - $tmp = explode("=",trim($argv[1])); - if ( count($tmp) != 2 ) { - echo "Falscher Aufruf: php shop=1\n"; - exit (-1); - } else { - $shopnr = $tmp[1]; + for( $i=1; $idb->connected_database_name == $ERPdbname) { } //Shop-Instanz -$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err); +$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); //echo "
"; print_r($shopdb->db); print_r($shopnr); echo "
"; diff --git a/peppershop/confedit.php b/peppershop/confedit.php index b70fd4d41..fbf957247 100644 --- a/peppershop/confedit.php +++ b/peppershop/confedit.php @@ -7,24 +7,28 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) { exit; } else { if (!$_POST) { - //Je Shop ein Conf-File == Multishop - $Shop=$_GET["Shop"]; - if ($Shop != "" and file_exists ("conf$Shop.php")) { - require "conf$Shop.php"; - $out = "Konfiguration für Shop $Shop gelesen"; - } else { - //Singleshop oder noch kein Shop definiert - require "conf.php"; - $out = "Standard-Konfiguration gelesen"; - } - if ($_SERVER['PHP_AUTH_USER']<>$ERPftpuser || $_SERVER['PHP_AUTH_PW']<>$ERPftppwd) { - Header("WWW-Authenticate: Basic realm='My Realm'"); - Header("HTTP/1.0 401 Unauthorized"); - echo "Sie müssen sich autentifizieren\n"; - exit; - } - echo $out; - } + //Je Shop ein Conf-File == Multishop + if( isset($_GET["Shop"]) ) { + $Shop = $_GET["Shop"]; + } else { + $Shop = ''; + }; + if ( $Shop != "" and file_exists ('conf'.$Shop.'.php') ) { + require 'conf'.$Shop.'.php'; + $out = "Konfiguration für Shop $Shop gelesen"; + } else { + //Singleshop oder noch kein Shop definiert + require "conf.php"; + $out = "Standard-Konfiguration gelesen"; + } + if ( $_SERVER['PHP_AUTH_USER']<>$ERPftpuser || $_SERVER['PHP_AUTH_PW']<>$ERPftppwd ) { + Header("WWW-Authenticate: Basic realm='My Realm'"); + Header("HTTP/1.0 401 Unauthorized"); + echo "Sie müssen sich autentifizieren\n"; + exit; + } + echo $out; + } } include_once("error.php"); @@ -42,38 +46,38 @@ function lager($sel,$db) { $sql = "select w.description as lager,b.description as platz,b.id from "; $sql .= "bin b left join warehouse w on w.id=b.warehouse_id "; $sql .= "order by b.warehouse_id,b.id"; - $bin=$db->getall($sql); + $bin=$db->getall($sql); echo "\t