feat(license): implement Hardware-ID v2, multi-platform Linux support, StateStore LLS2 hardening, and AI Agent docs
This commit is contained in:
+42
-3
@@ -262,6 +262,27 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
}
|
||||
|
||||
// Release (Delete) Hardware Activation
|
||||
if ($action === 'release_activation') {
|
||||
$actId = (int)($_POST['activation_id'] ?? 0);
|
||||
if ($actId > 0) {
|
||||
$actStmt = $pdo->prepare('SELECT a.*, l.license_key FROM license_activations a JOIN license_licenses l ON a.license_id = l.id WHERE a.id = :id');
|
||||
$actStmt->execute([':id' => $actId]);
|
||||
$actRow = $actStmt->fetch();
|
||||
if ($actRow) {
|
||||
$delStmt = $pdo->prepare('DELETE FROM license_activations WHERE id = :id');
|
||||
$delStmt->execute([':id' => $actId]);
|
||||
Audit::log($pdo, $_SESSION['username'] ?? 'admin', 'activation_released', [
|
||||
'license_id' => $actRow['license_id'],
|
||||
'license_key' => $actRow['license_key'],
|
||||
'hardware_id' => $actRow['hardware_id'],
|
||||
'hostname' => $actRow['hostname']
|
||||
]);
|
||||
$msg = "Hardware-Aktivierung wurde freigegeben (gelöscht).";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add Watchdog Host Machine / Application
|
||||
if ($action === 'add_watchdog_monitor') {
|
||||
$source = trim($_POST['source'] ?? '');
|
||||
@@ -1188,11 +1209,12 @@ $baseUrl = $protocol . '://' . $host;
|
||||
<tr>
|
||||
<th>Projekt</th>
|
||||
<th>Lizenzschlüssel</th>
|
||||
<th>Hardware-ID</th>
|
||||
<th>Hardware-ID / Quelle</th>
|
||||
<th>Plattform / Ver.</th>
|
||||
<th>Hostname</th>
|
||||
<th>Zuletzt gesehen</th>
|
||||
<th>Status</th>
|
||||
<th>Aktion</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -1200,7 +1222,17 @@ $baseUrl = $protocol . '://' . $host;
|
||||
<tr>
|
||||
<td><?= htmlspecialchars($a['product_name']) ?></td>
|
||||
<td><code><?= htmlspecialchars($a['license_key']) ?></code></td>
|
||||
<td><code><?= htmlspecialchars($a['hardware_id']) ?></code></td>
|
||||
<td>
|
||||
<code><?= htmlspecialchars($a['hardware_id']) ?></code>
|
||||
<?php if (!empty($a['hwid_source'])): ?>
|
||||
<br><small style="color:var(--text-muted);">Quelle: <?= htmlspecialchars($a['hwid_source']) ?></small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge" style="background:var(--bg-card); border:1px solid var(--border-color); color:var(--text-main);">
|
||||
<?= htmlspecialchars(strtoupper($a['platform'] ?? 'WIN')) ?> (v<?= (int)($a['hwid_version'] ?? 1) ?>)
|
||||
</span>
|
||||
</td>
|
||||
<td><?= htmlspecialchars($a['hostname'] ?? '-') ?></td>
|
||||
<td><?= htmlspecialchars($a['last_seen']) ?></td>
|
||||
<td>
|
||||
@@ -1215,6 +1247,13 @@ $baseUrl = $protocol . '://' . $host;
|
||||
<?= $a['is_blocked'] ? 'Entsperren' : 'Sperren' ?>
|
||||
</button>
|
||||
</form>
|
||||
<form method="POST" action="index.php#sub-license-details" style="display:inline" onsubmit="return confirm('Möchtest du diese Aktivierung wirklich freigeben (löschen)?');">
|
||||
<input type="hidden" name="action" value="release_activation">
|
||||
<input type="hidden" name="activation_id" value="<?= $a['id'] ?>">
|
||||
<button type="submit" class="btn btn-sm btn-danger" style="margin-left:4px;">
|
||||
Freigeben
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user