From ef8dd588a43e9e5db29ba0b36ffce00d725530b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Jan=C4=8D=C3=A1r?= Date: Wed, 29 May 2024 12:26:03 +0200 Subject: [PATCH] hehe --- index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index f82fa3c..267bafc 100644 --- a/index.php +++ b/index.php @@ -47,9 +47,12 @@ if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST["submit"])) { $files = scandir($target_dir); $out = "Názov súboruDownload"; foreach ($files as $file) { - $filename = $file; - $filepath = "/uploads/$file"; - $out .= "SuperSubor$filename"; + if (!str_starts_with($file, '.')) { + $filename = $file; + $displayname = explode('.', $filename)[0]; + $filepath = "/uploads/$file"; + $out .= "$displayname$filename"; + } } } else {