Füge Dashboard-Funktionen hinzu: Zeige UUIDs und zugehörige Identitäten an, verbessere die Benutzeroberfläche des Admin Dashboards.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
# businesscard
|
||||
|
||||
## TODO
|
||||
- admin create edit delete
|
||||
- admin https://chatgpt.com/share/697f82e6-1ed0-800e-b8d1-1ba0ce969dcf
|
||||
- admin ident werte typen
|
||||
@@ -409,19 +409,55 @@ exit;
|
||||
}
|
||||
|
||||
/* ─────────────────────────────
|
||||
DASHBOARD
|
||||
DASHBOARD (UUIDs + Identitäten)
|
||||
───────────────────────────── */
|
||||
$tokens = $sql->get(
|
||||
"SELECT t.uuid, t.notes, i.name AS identity_name
|
||||
FROM access_tokens t
|
||||
JOIN identities i ON t.identity_id = i.id
|
||||
ORDER BY t.created_at DESC"
|
||||
);
|
||||
|
||||
$identities = $sql->get("SELECT * FROM identities ORDER BY id DESC");
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head><meta charset="utf-8"><title>Admin</title></head>
|
||||
<head><meta charset="utf-8"><title>Admin Dashboard</title></head>
|
||||
<body>
|
||||
|
||||
<h1>Admin Dashboard</h1>
|
||||
|
||||
<p><a href="admin.php?action=identity_create">➕ Identität anlegen</a></p>
|
||||
|
||||
<h2>Alle UUIDs</h2>
|
||||
<?php if (!empty($tokens)): ?>
|
||||
<table border="1" cellpadding="5" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>UUID</th>
|
||||
<th>Identität</th>
|
||||
<th>Notiz</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($tokens as $t): ?>
|
||||
<tr>
|
||||
<td><code><?= htmlspecialchars($t['uuid']) ?></code></td>
|
||||
<td><?= htmlspecialchars($t['identity_name']) ?></td>
|
||||
<td><?= htmlspecialchars($t['notes']) ?></td>
|
||||
<td><a href="admin.php?action=uuid_edit&uuid=<?= urlencode($t['uuid']) ?>">bearbeiten</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine UUIDs vorhanden.</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Identitäten</h2>
|
||||
<ul>
|
||||
<?php foreach ($identities as $i): ?>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user