This commit is contained in:
Walter Hupfeld 2024-02-18 19:16:48 +01:00
parent 2d055ac66a
commit 69ab1ac004

View File

@ -8,79 +8,83 @@
* Datum: 18.02.2024
******************************** */
require_once("config.db.php");
require_once("config.db.php");
$strSQL = "select * from config";
$result = $db->query($strSQL);
$strSQL = "select * from config";
$result = $db->query($strSQL);
// Allegemeine Konfiguration
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
switch ($row['key']) {
case "uploaddir" :
$uploaddir=$row['value'];
break;
case "stadt" :
$strStadt=$row['value'];
break;
case "title" :
$strTitle=$row['value'];
break;
case "fileGeojson":
$fileGeojson=$row['value'];
break;
case "InfoLat":
$numInfoLat=$row['value'];
break;
case "InfoLng":
$numInfoLng=$row['value'];
break;
case "logo":
$strLogo=$row['value'];
break;
case "contactEmail":
$contactEmail =$row['value'];
break;
case "impressum":
$strImpressum =$row['value'];
break;
case "url":
$strUrl =$row['value'];
break;
case "UrlBez":
$strUrlBez =$row['value'];
break;
case "boolRating":
$boolRating = ($row['value']=="1");
break;
case "boolComment":
$boolComment = ($row['value']=="1");
break;
case "boolUpload":
$boolUpload = ($row['value']=="1");
break;
case "boolDefect":
$boolDefect = ($row['value']=="1");
break;
case "boolUserinfo":
$boolUserinfo = ($row['value']=="1");
break;
// Allegemeine Konfiguration
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
switch ($row['key']) {
case "uploaddir" :
$uploaddir=$row['value'];
break;
case "stadt" :
$strStadt=$row['value'];
break;
case "title" :
$strTitle=$row['value'];
break;
case "fileGeojson":
$fileGeojson=$row['value'];
break;
case "InfoLat":
$numInfoLat=$row['value'];
break;
case "InfoLng":
$numInfoLng=$row['value'];
break;
case "logo":
$strLogo=$row['value'];
break;
case "contactEmail":
$contactEmail =$row['value'];
break;
case "introText":
$strIntroText =$row['value'];
break;
default: ;
//echo "Fehler bei ".$row['key'];
// Ende Lokalisierung
case "impressum":
$strImpressum =$row['value'];
break;
case "url":
$strUrl =$row['value'];
break;
case "UrlBez":
$strUrlBez =$row['value'];
break;
case "boolRating":
$boolRating = ($row['value']=="1");
break;
case "boolComment":
$boolComment = ($row['value']=="1");
break;
case "boolUpload":
$boolUpload = ($row['value']=="1");
break;
case "boolDefect":
$boolDefect = ($row['value']=="1");
break;
case "boolUserinfo":
$boolUserinfo = ($row['value']=="1");
break;
break;
}
default: ;
//echo "Fehler bei ".$row['key'];
// Ende Lokalisierung
break;
}
// Falls der Parameter district fehlt => Hamm
$result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
if ($row=$result->fetch(PDO::FETCH_NUM)) {
if ($row[0]==0) $strDistrict="hamm";
}
}
// Falls der Parameter district fehlt => Hamm
$result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
$result->bindParam(":district",$strDistrict);
$result->execute();
if ($row=$result->fetch(PDO::FETCH_NUM)) {
if ($row[0]==0) $strDistrict="hamm";
}
// Spezifische Konfiguration für Districtt
$result= $db->prepare("SELECT * FROM district WHERE district=:district");
@ -103,7 +107,7 @@
$numZoom=$row['zoom'];
$strTitle = "ADFC Meldeportal $strTitle ";
$strIntroText = ($boolActive) ? $strIntroText = "$strTitle" : "Dateneingabe nicht möglich";
$strIntroText = ($boolActive) ? $strIntroText : "Dateneingabe nicht möglich";
$fileGeojson ="geojson/$strGeojson";
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
if ($numUGEMEINDE>0) {