getPathname(); $relativePath = ltrim(substr($absolutePath, strlen($backupRootReal)), DIRECTORY_SEPARATOR); if ($relativePath === '') { continue; } $relativePathLower = mb_strtolower($relativePath); if ($query !== '' && !str_contains($relativePathLower, $qLower)) { continue; } $files[] = [ 'relative' => str_replace(DIRECTORY_SEPARATOR, '/', $relativePath), 'is_dir' => $entry->isDir(), 'size' => $entry->isFile() ? $entry->getSize() : 0, 'mtime' => $entry->getMTime(), 'is_pdf' => $entry->isFile() && str_ends_with(strtolower($relativePath), '.pdf'), ]; } usort($files, static function (array $a, array $b): int { if ($a['is_dir'] !== $b['is_dir']) { return $a['is_dir'] ? -1 : 1; } return strnatcasecmp($a['relative'], $b['relative']); }); if ($selected !== '') { $candidate = realpath($backupRootReal . DIRECTORY_SEPARATOR . $selected); if ($candidate !== false && is_file($candidate) && isInsideRoot($backupRootReal, $candidate)) { $selectedPath = $candidate; } } if (isset($_GET['download']) && $selectedPath !== null) { header('Content-Type: application/octet-stream'); header('Content-Disposition: inline; filename="' . basename($selectedPath) . '"'); header('Content-Length: ' . (string) filesize($selectedPath)); readfile($selectedPath); exit; } } ?> reMarkable Archiv
Links eine Datei waehlen. PDFs werden direkt angezeigt.

Keine PDF-Datei. Bitte ueber den Link oben herunterladen/oeffnen.