diff --git a/admin/alter_table.php b/admin/alter_table.php
index 253bdad..919fb99 100644
--- a/admin/alter_table.php
+++ b/admin/alter_table.php
@@ -21,11 +21,4 @@ $db->exec("CREATE TABLE IF NOT EXISTS user(
created_at TEXT DEFAULT CURRENT_TIMESTAMP
)");
-header("Location: configuration.php");
-
-
-
-INSERT INTO user (username, passwordhash, district)
-SELECT district, "$2y$10$W9CE8IOOfnfi3XTMEVByZeDIrZo1VPxCHz2CfCe.sOH87V/AdaUG2", district
-FROM district;
-
+header("Location: configuration.php");
\ No newline at end of file
diff --git a/admin/configuration.php b/admin/configuration.php
index ecdf3e1..783b4d0 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -5,14 +5,12 @@
if (!$boolLogin) {
header("Location: login.php");
}
-
if (isset($_SESSION['superadmin'])) {
- $boolSuperAdmin = $_SESSION['superadmin']==true;
- } else {
- $boolSuperAdmin=false;
+ $boolSuperAdmin = (bool)$_SESSION['superadmin'];
}
-
-
+ // Für lokale Administration keine Konfiguration
+ if (!$boolSuperAdmin) { header("Location: index.php"); }
+ $strDistrict = $_SESSION['district'];
require_once("../config.php");
$boolError=false;
?>
@@ -27,10 +25,9 @@
Konfigruation
@@ -59,7 +56,6 @@
Passwort ändern
-
-
-
diff --git a/admin/geocoding.php b/admin/geocoding.php
index 5fba9f2..ff35859 100644
--- a/admin/geocoding.php
+++ b/admin/geocoding.php
@@ -14,6 +14,9 @@
if (!$boolLogin) {
header("Location: login.php");
}
+ if (isset($_SESSION['superadmin'])) {
+ $boolSuperAdmin = (bool)$_SESSION['superadmin'];
+ }
$strDistrict=$_SESSION['district'];
require ("../config.php");
require ("../lib/geocoding.php");
@@ -35,10 +38,9 @@
Konfigruation
@@ -59,7 +61,6 @@
-
Addressen ermitteln
-
-
Export
@@ -67,7 +68,6 @@
Passwort ändern
-
-
diff --git a/admin/index.php b/admin/index.php
index a8aed43..afead40 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,5 +1,4 @@
Liste (current)
+
-
Konfiguration
-
Addressen ermitteln
+
-
Export
@@ -374,8 +371,6 @@ $( document ).ready(function() {
});
= $strScript ?>
-
-
});
diff --git a/admin/password.php b/admin/password.php
index 111c783..3e40c90 100644
--- a/admin/password.php
+++ b/admin/password.php
@@ -4,15 +4,21 @@
* Ideenmelder
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
- * Version: 1.0
+ * Version: 3.0
* Datum: 18.05.2021
+ * letzte Änderung: 12.03.2024
******************************** */
-
session_start();
- $dbFilename="../db/locations.db";
- require ("../config.php");
+ $strDistrict=$_SESSION['district'];
$strLoginName=(isset($_SESSION['user'])) ? $_SESSION['user'] : "" ;
+ if (isset($_SESSION['superadmin'])) {
+ $boolSuperAdmin = $_SESSION['superadmin']==true;
+ } else {
+ $boolSuperAdmin=false;
+ }
+ require ("../config.php");
+
$boolLogin = (!empty($strLoginName));
if (!$boolLogin) {
header("Location: login.php");
@@ -72,12 +78,14 @@
-
Liste (current)
+
-
Konfiguration
-
Addressen ermitteln
+ endif; ?>
-
Export
diff --git a/ajax/ajax_update.php b/ajax/ajax_update.php
index 18755c8..aa947ce 100644
--- a/ajax/ajax_update.php
+++ b/ajax/ajax_update.php
@@ -9,9 +9,8 @@ $numDefect = (isset($_POST['defect'])) ? $_POST['defect'] : 0;
$id = (int) $_POST['loc_id'];
$filename ="";
-
$boolUploadOk=false;
-if ($boolUpload && isset($_FILES['uploadfile'])) {
+if ($boolUpload && ($_FILES['uploadfile']['size']>0)) {
$uploadfile = $uploaddir . basename($_FILES['uploadfile']['name']);
$fileinfo = @getimagesize($_FILES["uploadfile"]["tmp_name"]);
if (!empty($fileinfo)) {
@@ -54,7 +53,7 @@ if ($boolUploadOk) {
$result = array(
"id" => $id,
- "description" => stripshlashes(nl2br($strDescription)),
+ "description" => stripslashes(nl2br($strDescription)),
"defect" => $arrDefect[$numDefect],
"filename" => $filename,
);
diff --git a/lib/dialog_edit_location.php b/lib/dialog_edit_location.php
index f0dafa2..bd071dd 100644
--- a/lib/dialog_edit_location.php
+++ b/lib/dialog_edit_location.php
@@ -15,7 +15,6 @@
}
-