From ccd63ea392d84c9a085df6bd59b695ff2d997668 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 16 Feb 2024 16:58:06 +0100 Subject: [PATCH] add root param add search action --- index.php | 18 ++++++++++++++++-- settings.php.sample.php | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 02d3828..215f332 100644 --- a/index.php +++ b/index.php @@ -44,7 +44,7 @@ exit; } - echo '
home

'; + echo '
home

'; if (isset($_POST['savebutton'])) { @@ -90,10 +90,16 @@ } else { + $defaulttitle = date("Y-m-d H.i.s", time()); + if (isset($_GET['userdata'])) + { + $defaulttitle = $_GET['userdata']; + } echo '
- + +
'; echo '
'; @@ -109,6 +115,14 @@ if (!str_ends_with($name, '.del') && (!isset($_GET['filteraction']) || str_contains($name, $_GET['userdata']))) { + if (isset($_GET['searchaction'])) + { + $content = file_get_contents($path); + if (!str_contains($content, $_GET['userdata'])) + { + continue; + } + } echo '
' . $name .'
'; } } diff --git a/settings.php.sample.php b/settings.php.sample.php index 9e5e000..31b1234 100644 --- a/settings.php.sample.php +++ b/settings.php.sample.php @@ -1,4 +1,5 @@ \ No newline at end of file