diff --git a/WEBROOT/config.php b/WEBROOT/config.php index 07f5eef..bdcb8e7 100644 --- a/WEBROOT/config.php +++ b/WEBROOT/config.php @@ -36,12 +36,13 @@ $serviceGroups = array ( ), 'System' => array ( - 'label' => 'Administration', + 'label' => 'Verwaltung', 'defaultOpen' => true, 'services' => array ( 0 => 'services_control', 1 => 'user_control', + 2 => 'variablen_control', ), ), ); @@ -91,7 +92,7 @@ $services = array ( ), 'services_control' => array ( - 'name' => 'Seitenverwaltung', + 'name' => 'Seiten', 'active' => true, 'adminOnly' => true, ), @@ -109,10 +110,16 @@ $services = array ( ), 'user_control' => array ( - 'name' => 'Benutzerverwaltung', + 'name' => 'Benutzer', 'active' => true, 'adminOnly' => false, ), + 'variablen_control' => + array ( + 'name' => 'Variablen', + 'active' => true, + 'adminOnly' => true, + ), ); $linkGroups = array ( diff --git a/WEBROOT/config_backups/config_2026-02-20_08-25-08.php b/WEBROOT/config_backups/config_2026-02-20_08-25-08.php new file mode 100644 index 0000000..89e0e2d --- /dev/null +++ b/WEBROOT/config_backups/config_2026-02-20_08-25-08.php @@ -0,0 +1,257 @@ + + array ( + 'password' => 'bBHofurUJWKzPE8Z:', + 'active' => true, + ), +); + +$serviceGroups = array ( + 'Info' => + array ( + 'label' => 'Home', + 'defaultOpen' => true, + 'services' => + array ( + 0 => 'home_info', + 1 => 'links', + 2 => 'berichte_arbeit', + 3 => 'berichte_arbeit_gen', + ), + ), + 'Logs' => + array ( + 'label' => 'Webserver', + 'defaultOpen' => true, + 'services' => + array ( + 0 => 'public_request_logs', + 1 => 'public_request_chart', + 2 => 'backend_request_logs', + 3 => 'backend_request_chart', + 4 => 'personal_request_logs', + ), + ), + 'System' => + array ( + 'label' => 'Administration', + 'defaultOpen' => true, + 'services' => + array ( + 0 => 'services_control', + 1 => 'user_control', + 2 => 'test', + ), + ), +); + +$services = array ( + 'home_info' => + array ( + 'name' => 'Home', + 'active' => true, + 'adminOnly' => false, + ), + 'links' => + array ( + 'name' => 'Externe Links', + 'active' => true, + 'adminOnly' => false, + ), + 'public_request_logs' => + array ( + 'name' => 'Public Logs', + 'active' => true, + 'adminOnly' => false, + ), + 'public_request_chart' => + array ( + 'name' => 'Public Statistik', + 'active' => true, + 'adminOnly' => false, + ), + 'backend_request_logs' => + array ( + 'name' => 'Backend Logs', + 'active' => true, + 'adminOnly' => false, + ), + 'backend_request_chart' => + array ( + 'name' => 'Backend Statistik', + 'active' => true, + 'adminOnly' => false, + ), + 'personal_request_logs' => + array ( + 'name' => 'Persönliche Logs', + 'active' => true, + 'adminOnly' => false, + ), + 'services_control' => + array ( + 'name' => 'Seitenverwaltung', + 'active' => true, + 'adminOnly' => true, + ), + 'berichte_arbeit' => + array ( + 'name' => 'Arbeitsberichte', + 'active' => true, + 'adminOnly' => false, + ), + 'berichte_arbeit_gen' => + array ( + 'name' => 'Arbeitsberichte PDF', + 'active' => true, + 'adminOnly' => false, + ), + 'user_control' => + array ( + 'name' => 'Benutzerverwaltung', + 'active' => true, + 'adminOnly' => false, + ), + 'test' => + array ( + 'name' => 'Test Seite', + 'active' => true, + 'adminOnly' => true, + ), +); + +$linkGroups = array ( + 'info' => + array ( + 'label' => 'Informationen', + 'color' => '#3498db', + 'defaultOpen' => false, + ), + 'tools' => + array ( + 'label' => 'IoT', + 'color' => '#2ecc71', + 'defaultOpen' => false, + ), + 'admin' => + array ( + 'label' => 'Administration', + 'color' => '#e74c3c', + 'defaultOpen' => false, + ), + 'devices' => + array ( + 'label' => 'Geräte', + 'color' => '#b7db33', + 'defaultOpen' => false, + ), +); + +$linkButtons = array ( + 0 => + array ( + 'label' => 'Gitea', + 'url' => 'http://gitea.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'admin', + ), + 1 => + array ( + 'label' => 'HAProxy', + 'url' => 'http://stats.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'admin', + ), + 2 => + array ( + 'label' => 'Public', + 'url' => 'https://blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'info', + ), + 3 => + array ( + 'label' => 'NAS-1', + 'url' => 'http://nas-1.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'devices', + ), + 4 => + array ( + 'label' => 'NAS-2', + 'url' => 'http://nas-2.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'devices', + ), + 5 => + array ( + 'label' => 'FritzBox-1', + 'url' => 'http://fritzbox-1.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'devices', + ), + 6 => + array ( + 'label' => 'FritzBox-2', + 'url' => 'http://fritzbox-2.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'devices', + ), + 7 => + array ( + 'label' => 'GS1910-24', + 'url' => 'http://switch.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'admin', + ), + 8 => + array ( + 'label' => 'NWA5121-NI Innen', + 'url' => 'http://ap-1.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'devices', + ), + 9 => + array ( + 'label' => 'NWA5121-NI Aussen', + 'url' => 'http://ap-2.blackpi.ipv64.net', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'devices', + ), + 10 => + array ( + 'label' => 'ZyWALL 110', + 'url' => 'http://10.233.1248', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'admin', + ), + 11 => + array ( + 'label' => 'Ender 3 V3 KE', + 'url' => 'http://10.233.1.52', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'tools', + ), + 12 => + array ( + 'label' => 'Ubuntu NAS', + 'url' => 'http://10.233.1.32:9000', + 'newTab' => true, + 'adminOnly' => false, + 'group' => 'tools', + ), +); \ No newline at end of file diff --git a/WEBROOT/services/personal_request_logs.php b/WEBROOT/services/personal_request_logs.php index 4822799..4e5d9fb 100644 --- a/WEBROOT/services/personal_request_logs.php +++ b/WEBROOT/services/personal_request_logs.php @@ -43,6 +43,16 @@ if (!$useCustom) { "; } +if (isset($_POST['delete_logs'])) { + DatabaseDelete( + "logs", + "CLIENT_IP = ?", + (new getSpecificData())->getClientIP() + ); + header("Location: " . (new getSpecificData())->getReferer()); + exit; +} + ?>

📊 Logs

@@ -62,6 +72,11 @@ if ($erg = $conn->query($sql)) {
+ getIsAdmin()): ?> +
+ +
+ $_): ?> diff --git a/WEBROOT/services/variablen_control.php b/WEBROOT/services/variablen_control.php new file mode 100644 index 0000000..658b2d8 --- /dev/null +++ b/WEBROOT/services/variablen_control.php @@ -0,0 +1,55 @@ +getLoggingStatus($name)[0]['WERT']; + $newValue = ($current === "ON") ? "OFF" : "ON"; + + DatabaseUpdate( + "Variablen", + "WERT = ?", + "VARIABLENNAME = ?", + $newValue, + $name + ); + header("Location: " . (new getSpecificData())->getReferer()); + exit; +} + +$variablen = DatabaseShow( + "Variablen", + "VARIABLENNAME, WERT, ANZEIGENAME" +); + +?> + +
+ + +
+ +
+ +
+ +
+ + + + + +
+ Status: + + + +
+ +
+ + +
\ No newline at end of file diff --git a/WEBROOT/style.css b/WEBROOT/style.css index 35f20cf..5036d2b 100644 --- a/WEBROOT/style.css +++ b/WEBROOT/style.css @@ -844,4 +844,59 @@ body.dark-mode .user-table .btn-primary:hover { border-radius: 4px; cursor: pointer; font-size: 0.8rem; +} + +/* ===== Toggle Switch ===== */ + +.toggle-card { + display: flex; + flex-direction: column; + gap: 15px; + align-items: center; +} + +.toggle-header { + font-size: 1rem; + text-align: center; + word-break: break-word; +} + +.toggle-switch { + width: 60px; + height: 32px; + background: #ccc; + border-radius: 50px; + position: relative; + border: none; + cursor: pointer; + transition: background 0.3s ease; + padding: 0; +} + +.toggle-switch.active { + background: #28a745; +} + +.toggle-slider { + width: 26px; + height: 26px; + background: white; + border-radius: 50%; + position: absolute; + top: 3px; + left: 4px; + transition: transform 0.3s ease; +} + +.toggle-switch.active .toggle-slider { + transform: translateX(28px); +} + +/* Dark Mode Anpassung */ +body.dark-mode .toggle-switch { + background: #444; +} + +body.dark-mode .toggle-switch.active { + background: #28a745; } \ No newline at end of file