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'];
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;
default: ; case "impressum":
//echo "Fehler bei ".$row['key']; $strImpressum =$row['value'];
// Ende Lokalisierung 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); // Falls der Parameter district fehlt => Hamm
$result->execute(); $result= $db->prepare("SELECT count(*) FROM district WHERE district=:district");
if ($row=$result->fetch(PDO::FETCH_NUM)) { $result->bindParam(":district",$strDistrict);
if ($row[0]==0) $strDistrict="hamm"; $result->execute();
} if ($row=$result->fetch(PDO::FETCH_NUM)) {
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) {