// $Id: confedit.php 2009/02/10 14:41:30 hli Exp $
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";
function unit($sel) {
global $dbP;
$sql="select name from units order by sortkey";
$pgs=$dbP->getall($sql);
if ($sel=='') $sel=$pgs[0][0];
if ($pgs) foreach ($pgs as $row) {
echo "\t