From 56c3baaefad32679a0a11bf6cfc45c43e7b5c17b Mon Sep 17 00:00:00 2001 From: Holger Lindemann Date: Tue, 10 Feb 2009 13:44:39 +0000 Subject: [PATCH] Units, UTF-Trans, db-Connect --- pepper/confedit.php | 143 +++++++++++++++++++++++++++++++------------- 1 file changed, 103 insertions(+), 40 deletions(-) diff --git a/pepper/confedit.php b/pepper/confedit.php index e393f1c6a..4414bbc0b 100644 --- a/pepper/confedit.php +++ b/pepper/confedit.php @@ -1,20 +1,39 @@ $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 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