Revision 36ae8db4
Von Holger Lindemann vor mehr als 12 Jahren hinzugefügt
peppershop/ArtikelErpToShop.php | ||
---|---|---|
11 | 11 |
$shopnr = $_GET["Shop"]; |
12 | 12 |
$nofiles = ( $_GET["nofiles"] == '1' )?true:false; |
13 | 13 |
} else { |
14 |
$p = array('shopnr','nofiles'); |
|
14 | 15 |
if ( $argc > 1 ) { |
15 |
$tmp = explode("=",trim($argv[1])); |
|
16 |
if ( count($tmp) != 2 ) { |
|
17 |
echo "Falscher Aufruf: php <scriptname.php> shop=1\n"; |
|
18 |
exit (-1); |
|
19 |
} else { |
|
20 |
$shopnr = $tmp[1]; |
|
16 |
for( $i=1; $i<count($argv); $i++) { |
|
17 |
$tmp = explode("=",trim($argv[$i])); |
|
18 |
if ( count($tmp) < 2 ) { |
|
19 |
echo "Falscher Aufruf: php ArtikelErpToShop.php shopnr=1 [nofiles=1]\n"; |
|
20 |
exit (-1); |
|
21 |
}; |
|
22 |
if ( ! in_array(strtolower($tmp[0]),$p) ) { |
|
23 |
echo "Falscher Aufruf: php ArtikelErpToShop.php shopnr=1 [nofiles=1]\n"; |
|
24 |
exit (-1); |
|
25 |
}; |
|
26 |
${$tmp[0]} = trim($tmp[1]); |
|
21 | 27 |
} |
28 |
} else { |
|
29 |
$shopnr=false; |
|
30 |
$nofiles=false; |
|
22 | 31 |
} |
23 | 32 |
} |
24 | 33 |
|
... | ... | |
46 | 55 |
exit(); |
47 | 56 |
} |
48 | 57 |
//Shop-Instanz |
49 |
$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err); |
|
58 |
$shopdb = new mydb($SHOPhost,$SHOPdbname,$SHOPuser,$SHOPpass,$SHOPport,'mysql',$err,$debug); |
|
59 |
|
|
50 | 60 |
if ($shopdb->db->connected_database_name == $SHOPdbname) { |
51 | 61 |
$shop = new pepper($shopdb,$err,$SHOPdbname,$divStd,$divVerm,$minder,$nachn,$versandS,$versandV,$paypal,$treuhand,$mwstLX,$mwstS,$variantnr,$pict,$nopic,$nopicerr,$nofiles); |
52 | 62 |
} else { |
Auch abrufbar als: Unified diff
Parameter frü Cli-Aufruf angepasst