diff --git a/admin/api_keys.php b/admin/api_keys.php index 4817b71..550bd03 100644 --- a/admin/api_keys.php +++ b/admin/api_keys.php @@ -37,7 +37,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['create_key'])) { ); $auth->writeAuditLog($_SESSION['user_id'], 'api_key_create', 'api_key', null, "API-Key '$name' erstellt"); $newKey = $k['plain']; - $success = 'API-Schlüssel erstellt. Bitte JETZT kopieren – er wird nur einmal angezeigt!'; + $success = __('api_created_once'); } } } @@ -46,14 +46,14 @@ if (isset($_GET['toggle']) && isset($_GET['token']) && $auth->validateCsrfToken( $row = $db->fetchOne("SELECT is_active FROM api_keys WHERE id = ?", [(int)$_GET['toggle']]); if ($row) { $db->query("UPDATE api_keys SET is_active = ? WHERE id = ?", [$row['is_active'] ? 0 : 1, (int)$_GET['toggle']]); - $success = 'Status aktualisiert.'; + $success = __('api_status_updated'); } } if (isset($_GET['delete']) && isset($_GET['token']) && $auth->validateCsrfToken($_GET['token'])) { $db->query("DELETE FROM api_keys WHERE id = ?", [(int)$_GET['delete']]); $auth->writeAuditLog($_SESSION['user_id'], 'api_key_delete', 'api_key', (int)$_GET['delete'], 'API-Key gelöscht'); - $success = 'API-Schlüssel gelöscht.'; + $success = __('api_deleted'); } $keys = $db->fetchAll("SELECT k.*, u.name AS creator FROM api_keys k LEFT JOIN users u ON k.created_by = u.id ORDER BY k.created_at DESC"); @@ -66,12 +66,12 @@ $adminBase = '';
-Zugänge für externe Systeme – mit Scope und Rate-Limit.
+= __('api_subtitle') ?>
Kopieren Sie ihn jetzt – aus Sicherheitsgründen wird er nicht erneut angezeigt.
+= __('api_new_key_hint') ?>
Noch keine API-Schlüssel angelegt.
+= __('api_none') ?>
| Name | Präfix | Scope | Limit | Status | Zuletzt genutzt | Erstellt von | |||
|---|---|---|---|---|---|---|---|---|---|
| = __('label_name') ?> | = __('api_col_prefix') ?> | = __('api_col_scope') ?> | = __('api_col_limit') ?> | = __('label_status') ?> | = __('api_col_last_used') ?> | = __('api_col_created_by') ?> | |||
| = htmlspecialchars($k['name']) ?> | uvt_= htmlspecialchars($k['key_prefix']) ?>… |
- = ($k['scope'] ?? 'write') === 'read' ? 'nur Lesen' : 'Lesen+Erstellen' ?> | += ($k['scope'] ?? 'write') === 'read' ? __('api_scope_read_short') : __('api_scope_write_short') ?> | = (int)($k['rate_limit'] ?? 0) === 0 ? '∞' : (int)$k['rate_limit'] . '/min' ?> | -= $k['is_active'] ? 'aktiv' : 'gesperrt' ?> | += $k['is_active'] ? __('api_state_active') : __('api_state_blocked') ?> | = $k['last_used_at'] ? date('d.m.Y H:i', strtotime($k['last_used_at'])) : '–' ?> | = htmlspecialchars($k['creator'] ?? '–') ?> | - = $k['is_active'] ? 'Sperren' : 'Aktivieren' ?> - Löschen + = $k['is_active'] ? __('api_action_block') : __('api_action_unblock') ?> + = __('btn_delete') ?> |