// $Id: confedit.php,v 1.6 2007/01/07
if (!isset($_SERVER['PHP_AUTH_USER'])) {
Header("WWW-Authenticate: Basic realm=\"Configurations-Editor\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Sie müssen sich autentifizieren\n";
exit;
} else {
$login=($_GET["login"])?$_GET["login"]:$_POST["login"];
if (file_exists ("conf$login.php")) {
require "conf$login.php";
} else {
require "conf.php";
}
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;
}
require_once "DB.php";
$db=@DB::connect($ERPdns);
if (!DB::isError($db)) {
$sql="select id,pricegroup from pricegroup";
$pgs=$db->getall($sql);
}
function pg($sel) {
global $pgs;
echo "\t