Upload via GUI (258 Dateien)

This commit is contained in:
2026-10-16 19:12:24 +00:00
parent de06066052
commit 5a602de484
50 changed files with 8948 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
require_once __DIR__ . '/../includes/bootstrap.php';
$staff = require_admin();
$zipName = $_SESSION['update_zip'] ?? '';
if (!$zipName || !preg_match('/^deskhub-update-[\w\.\-]+\.zip$/', $zipName)) {
http_response_code(400); die('Kein Update-ZIP vorhanden.');
}
$zipPath = realpath(__DIR__ . '/../downloads') . '/' . $zipName;
if (!file_exists($zipPath)) {
http_response_code(404); die('Datei nicht gefunden.');
}
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . $zipName . '"');
header('Content-Length: ' . filesize($zipPath));
header('Cache-Control: private, no-cache');
readfile($zipPath);
// Nach Download aufräumen
unlink($zipPath);
unset($_SESSION['update_zip'], $_SESSION['update_version'], $_SESSION['update_backup']);
exit;