feat: improve dashboard and connection workflows

- add connection delete endpoint and update connection list handling

- expand dashboard visualization behavior

- update helpers/header and project TODO tracking
This commit is contained in:
2026-02-18 09:23:11 +01:00
parent 463ab97c4b
commit c8fb5b140c
7 changed files with 998 additions and 236 deletions

View File

@@ -0,0 +1,41 @@
<?php
/**
* app/modules/connections/delete.php
*
* Loescht eine Verbindung und leitet zur Liste zurueck.
*/
$connectionId = (int)($_GET['id'] ?? $_POST['id'] ?? 0);
if ($connectionId <= 0) {
$_SESSION['error'] = 'Ungueltige Verbindungs-ID';
header('Location: ?module=connections&action=list');
exit;
}
$connection = $sql->single(
"SELECT id FROM connections WHERE id = ?",
"i",
[$connectionId]
);
if (!$connection) {
$_SESSION['error'] = 'Verbindung nicht gefunden';
header('Location: ?module=connections&action=list');
exit;
}
$rows = $sql->set(
"DELETE FROM connections WHERE id = ?",
"i",
[$connectionId]
);
if ($rows > 0) {
$_SESSION['success'] = 'Verbindung geloescht';
} else {
$_SESSION['error'] = 'Verbindung konnte nicht geloescht werden';
}
header('Location: ?module=connections&action=list');
exit;