parent
54583b1d88
commit
ccd63ea392
18
index.php
18
index.php
|
@ -44,7 +44,7 @@
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div><a accesskey="h" href="/">home</a></div><br>';
|
echo '<div><a accesskey="h" href="' . $root . '">home</a></div><br>';
|
||||||
|
|
||||||
if (isset($_POST['savebutton']))
|
if (isset($_POST['savebutton']))
|
||||||
{
|
{
|
||||||
|
@ -90,10 +90,16 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$defaulttitle = date("Y-m-d H.i.s", time());
|
||||||
|
if (isset($_GET['userdata']))
|
||||||
|
{
|
||||||
|
$defaulttitle = $_GET['userdata'];
|
||||||
|
}
|
||||||
echo '<form action="index.php" method="GET">
|
echo '<form action="index.php" method="GET">
|
||||||
<input list="notes" name="userdata" value="' . date("Y-m-d H.i.s", time()) . '">
|
<input list="notes" name="userdata" value="' . $defaulttitle . '">
|
||||||
<input accesskey="n" type="submit" name="openaction" value="open">
|
<input accesskey="n" type="submit" name="openaction" value="open">
|
||||||
<input accesskey="f" type="submit" name="filteraction" value="filter">
|
<input accesskey="f" type="submit" name="filteraction" value="filter">
|
||||||
|
<input accesskey="g" type="submit" name="searchaction" value="search">
|
||||||
</form>';
|
</form>';
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
|
|
||||||
|
@ -109,6 +115,14 @@
|
||||||
if (!str_ends_with($name, '.del')
|
if (!str_ends_with($name, '.del')
|
||||||
&& (!isset($_GET['filteraction']) || str_contains($name, $_GET['userdata'])))
|
&& (!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 '<div><a href=index.php?openaction&userdata=' . urlencode($name) . '>' . $name .'</a></div>';
|
echo '<div><a href=index.php?openaction&userdata=' . urlencode($name) . '>' . $name .'</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
$password = '';
|
$password = '';
|
||||||
$dir = '';
|
$dir = '';
|
||||||
|
$root = '/';
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue