Revision 7c4272de
Von Holger Lindemann vor mehr als 12 Jahren hinzugefügt
peppershop/confedit.php | ||
---|---|---|
8 | 8 |
} else { |
9 | 9 |
if (!$_POST) { |
10 | 10 |
//Je Shop ein Conf-File == Multishop |
11 |
$Shop=$_GET["Shop"]; |
|
12 |
if ($Shop != "" and file_exists ("conf$Shop.php")) { |
|
13 |
require "conf$Shop.php"; |
|
14 |
$out = "Konfiguration für Shop $Shop gelesen"; |
|
15 |
} else { |
|
16 |
//Singleshop oder noch kein Shop definiert |
|
17 |
require "conf.php"; |
|
18 |
$out = "Standard-Konfiguration gelesen"; |
|
19 |
} |
|
20 |
if ($_SERVER['PHP_AUTH_USER']<>$ERPftpuser || $_SERVER['PHP_AUTH_PW']<>$ERPftppwd) { |
|
21 |
Header("WWW-Authenticate: Basic realm='My Realm'"); |
|
22 |
Header("HTTP/1.0 401 Unauthorized"); |
|
23 |
echo "Sie müssen sich autentifizieren\n"; |
|
24 |
exit; |
|
25 |
} |
|
26 |
echo $out; |
|
11 |
if( isset($_GET["Shop"]) ) { |
|
12 |
$Shop = $_GET["Shop"]; |
|
13 |
} else { |
|
14 |
$Shop = ''; |
|
15 |
}; |
|
16 |
if ( $Shop != "" and file_exists ('conf'.$Shop.'.php') ) { |
|
17 |
require 'conf'.$Shop.'.php'; |
|
18 |
$out = "Konfiguration für Shop $Shop gelesen"; |
|
19 |
} else { |
|
20 |
//Singleshop oder noch kein Shop definiert |
|
21 |
require "conf.php"; |
|
22 |
$out = "Standard-Konfiguration gelesen"; |
|
23 |
} |
|
24 |
if ( $_SERVER['PHP_AUTH_USER']<>$ERPftpuser || $_SERVER['PHP_AUTH_PW']<>$ERPftppwd ) { |
|
25 |
Header("WWW-Authenticate: Basic realm='My Realm'"); |
|
26 |
Header("HTTP/1.0 401 Unauthorized"); |
|
27 |
echo "Sie müssen sich autentifizieren\n"; |
|
28 |
exit; |
|
29 |
} |
|
30 |
echo $out; |
|
27 | 31 |
} |
28 | 32 |
} |
29 | 33 |
|
... | ... | |
107 | 111 |
if ($bg) fputs($f,'$'.$key.'["TAX"]=\''. $var['TAX'].'\';'.$lf); |
108 | 112 |
} |
109 | 113 |
|
110 |
if ($_POST["ok"]=="sichern") {
|
|
114 |
if ( isset($_POST["ok"]) ) {
|
|
111 | 115 |
foreach ($_POST as $key=>$val) { |
112 | 116 |
${$key} = $val; |
113 | 117 |
} |
... | ... | |
189 | 193 |
echo "Keine Verbindung zum Shop<br>"; |
190 | 194 |
$dbM=false; |
191 | 195 |
}; |
192 |
if ($_POST["ok"]=="sichern") {
|
|
196 |
if ( isset($_POST["ok"]) ) {
|
|
193 | 197 |
$lf = "\n"; |
194 |
$f = @fopen("conf$Shop.php","w");
|
|
198 |
$f = @fopen('conf'.$Shop.'.php','w');
|
|
195 | 199 |
if ($f) { |
196 | 200 |
$v="1.5"; |
197 | 201 |
$d=date("Y/m/d H:i:s"); |
Auch abrufbar als: Unified diff
Kleinigkeiten