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 -
-
-