open($zip_name, ZipArchive::CREATE); foreach($_SESSION['index'] as $path) { if (!str_ends_with($path, '.del')) { $path = $path . '.md'; if (file_exists($path)) { $zip->addFile($path, basename($path)); } } } $zip->close(); header('Content-disposition: attachment; filename=' . $zip_name); header('Content-type: application/zip'); readfile($zip_name); unlink($zip_name); } if (isset($_GET['download'])) { downloadall(); exit; } $filter = ''; if (isset($_GET['filter'])) { $filter = $_GET['filter']; } ?> bbn
new download
' . $name .''; if ($filter && str_contains(cleanstring($content), cleanstring($filter))) { $pos = strpos(cleanstring($content), cleanstring($filter)); $start = max($pos - 21, 0); echo ' '; echo substr($content, $start, min(21, $pos)); echo '' . $filter . ''; echo substr($content, $pos + strlen($filter), 21); echo ''; } echo'
'; } ?>