diff --git a/admin/configuration.php b/admin/configuration.php index 653dcff..140c7c5 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -137,7 +137,25 @@ -


+


+ +

Auswahl Kreise und kreisfreie Städte

+
+ query($strSQL); + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $strChecked= ($row['active']==1) ? "checked='checked'" : ""; + $strValue=$row['active']; + $strDistrict=$row['district']; + echo " "; + echo "
\n"; + } + ?> +
+ + +
diff --git a/admin/configuration_chk.php b/admin/configuration_chk.php index 65f9084..1d30a90 100644 --- a/admin/configuration_chk.php +++ b/admin/configuration_chk.php @@ -5,7 +5,6 @@ if (!$boolLogin) { header("Location: login.php"); } - $dbFilename="../db/locations.db"; require("../config.php"); if($_POST['csrf'] !== $_SESSION['csrf_token']) { diff --git a/admin/district_chk.php b/admin/district_chk.php new file mode 100644 index 0000000..16d08d8 --- /dev/null +++ b/admin/district_chk.php @@ -0,0 +1,29 @@ +query($strSQL); + $numCounter=1; + while ($row = $result->fetch(PDO::FETCH_ASSOC)) { + $strDistrict=$row['district']; + if (isset($_POST[$strDistrict])) { + $db->query("UPDATE `district` SET `active`= '1' WHERE `district`='$strDistrict'"); + } else { + $db->query("UPDATE `district` SET `active`= '0' WHERE `district`='$strDistrict'"); + } + } + header("Location: configuration.php"); +//print_r($_POST); + + +?> \ No newline at end of file diff --git a/index.php b/index.php index d1231f2..4d9f373 100644 --- a/index.php +++ b/index.php @@ -85,7 +85,7 @@ - Ideenmelder + <?=$strTitle?> diff --git a/start.php b/start.php index def592f..48e0408 100644 --- a/start.php +++ b/start.php @@ -14,9 +14,6 @@ - - - <?=$strTitle?>