parent
d007101e08
commit
4fd592ceb3
15
index.php
15
index.php
|
@ -88,8 +88,8 @@
|
|||
else
|
||||
{
|
||||
echo '<form action="index.php" method="GET">
|
||||
<input name="open" value="' . time() . '">
|
||||
<input accesskey="n" type="submit" value="create new">
|
||||
<input list="notes" name="open" value="' . date("Y-m-d H.i.s", time()) . '">
|
||||
<input accesskey="n" type="submit" value="open">
|
||||
</form>';
|
||||
echo '<br>';
|
||||
|
||||
|
@ -99,15 +99,18 @@
|
|||
return filemtime($b) - filemtime($a);
|
||||
});
|
||||
|
||||
$autocomplete = '<datalist id="notes">';
|
||||
foreach($files as $path)
|
||||
{
|
||||
if (!str_ends_with($path, '.del'))
|
||||
$name = basename($path);
|
||||
if (!str_ends_with($name, '.del'))
|
||||
{
|
||||
$name = basename($path);
|
||||
$mod = date("F d Y H:i:s", filemtime($path));
|
||||
echo '<div>' . $mod . ' <a href=index.php?open=' . urlencode($name) . '>' . $name .'</a></div>';
|
||||
$autocomplete .= '<option value="' . $name . '">';
|
||||
echo '<div><a href=index.php?open=' . urlencode($name) . '>' . $name .'</a></div>';
|
||||
}
|
||||
}
|
||||
$autocomplete .= '</datalist>';
|
||||
echo $autocomplete;
|
||||
echo '<br>';
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue