From 77de8e47f244e7cedfe5552c3b4bc9ad5bfbf5d4 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sun, 27 Oct 2024 14:51:58 +0100 Subject: [PATCH] Added feature to hide files and cleaned the PHP a little. --- file_viewer.php | 67 ++++++++++++++++++++++++++++++++----------------- index.php | 2 +- styles.php | 2 +- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/file_viewer.php b/file_viewer.php index 64d2bf7..e80bdda 100644 --- a/file_viewer.php +++ b/file_viewer.php @@ -1,8 +1,22 @@ $filename) { - $useableName = str_replace("/", "_", $path); // CSS classes cant contain slashes + if ($filename !== "README.txt") { + $useableName = str_replace("/", "_", $path); // CSS classes cant contain slashes - if (is_array($filename)) { - $folderName = end(explode("/", $path)); - echo " $indentation - $indentation - $indentation + $indentation
\n"; - } else { - if ($filename !== "README.txt") { - echo " $indentation$filename\n"; + } else { + if ($filename !== "README.txt") { + echo " $indentation$filename\n"; + } } + echo " $indentation
\n"; } - echo " $indentation
\n"; } } ?> \ No newline at end of file diff --git a/index.php b/index.php index ace431f..ac066cf 100644 --- a/index.php +++ b/index.php @@ -131,7 +131,7 @@ echo " "; Evtl. könnt ihr hier etwas brauchbares finden.

-
+
diff --git a/styles.php b/styles.php index 70f8212..f256740 100644 --- a/styles.php +++ b/styles.php @@ -41,7 +41,7 @@ label { } hr { - margin: 0px 16px 0px 0px; + margin: 0px 16px 16px 0px; border: 1px solid rgba(255, 255, 255, 0.5); }