districts
This commit is contained in:
47
config.php
47
config.php
@@ -33,9 +33,6 @@
|
||||
case "InfoLng":
|
||||
$numInfoLng=$row['value'];
|
||||
break;
|
||||
case "zoom":
|
||||
$numZoom=$row['value'];
|
||||
break;
|
||||
case "logo":
|
||||
$strLogo=$row['value'];
|
||||
break;
|
||||
@@ -51,9 +48,6 @@
|
||||
case "UrlBez":
|
||||
$strUrlBez =$row['value'];
|
||||
break;
|
||||
case "IntroText":
|
||||
$strIntroText=$row['value'];
|
||||
break;
|
||||
case "boolActive":
|
||||
$boolActive = ($row['value']=="1");
|
||||
break;
|
||||
@@ -82,6 +76,47 @@
|
||||
|
||||
}
|
||||
|
||||
$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";
|
||||
}
|
||||
|
||||
//$result = $db->query($strSQL);
|
||||
$result= $db->prepare("SELECT * FROM district WHERE district=:district");
|
||||
$result->bindParam(":district",$strDistrict);
|
||||
$result->execute();
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$strDistrict = $row['district'];
|
||||
$strTitle = $row['title'];
|
||||
$strGeojson = $row['geojson'];
|
||||
|
||||
$numULAND=$row['ULAND'];
|
||||
$numUREGBEZ=$row['UREGBEZ'];
|
||||
$numUKREIS=$row['UKREIS'];
|
||||
$numUGEMEINDE=$row['UGEMEINDE'];
|
||||
|
||||
$numInfoLat=$row['lat'];
|
||||
$numInfoLng=$row['lng'];
|
||||
$numZoom=$row['zoom'];
|
||||
|
||||
$strTitle = "ADFC Meldeportal $strTitle ";
|
||||
$strIntroText = "$strTitle";
|
||||
|
||||
$fileGeojson ="geojson/$strGeojson";
|
||||
$strLocation = " AND ULAND=$numULAND AND UREGBEZ=$numUREGBEZ AND UKREIS=$numUKREIS ";
|
||||
if ($numUGEMEINDE>0) {
|
||||
$strLocation .= "AND UGEMEINDE=$numUGEMEINDE";
|
||||
}
|
||||
}
|
||||
$arrDisctrict = array ();
|
||||
|
||||
$strSQL = "SELECT district,title FROM district ORDER BY title ASC";
|
||||
$result=$db->query($strSQL);
|
||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||
$arrDistrict[$row['district']]=$row['title'];
|
||||
}
|
||||
|
||||
|
||||
$arrTopic = array (
|
||||
|
||||
Reference in New Issue
Block a user