10) { return substr($dir, 0, $available) . '/.../' . $filename; } return '...' . substr($path, -($maxLength - 3)); }; $formatBytes = function (int $bytes): string { if ($bytes >= 1048576) { return number_format($bytes / 1048576, 1) . ' MB'; } if ($bytes >= 1024) { return number_format($bytes / 1024, 1) . ' KB'; } return $bytes . ' B'; }; ?>
| ID | Dateipfad | Version | Typ | Größe | Datum |
|---|---|---|---|---|---|
| = $backup['id'] ?> | = htmlspecialchars($this->shortenPath($backup['file_path'])) ?> | = $backup['version'] ?> | = $backup['change_type'] ?> | = $this->formatBytes($backup['file_size']) ?> | = substr($backup['changed_at'], 0, 16) ?> |
| Keine Backups vorhanden | |||||