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