diff --git a/.gitignore b/.gitignore index c4f101b..c8100dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ /local/net /favicon.ico -/local/media/urls -/local/notes/files -/local/media/videos +/local/filemgr/files diff --git a/index.php b/index.php index dd2155e..fc752cf 100644 --- a/index.php +++ b/index.php @@ -11,8 +11,8 @@ require "$_shared/header.php";

Private

Vaultwarden
Grafana
-Notes
-Media viewer
+File manager
+Media viewer
Hub $list
\n"; +} +require "$_shared/footer.php"; +?> diff --git a/local/filemgr/index.php b/local/filemgr/index.php new file mode 100644 index 0000000..90c6fea --- /dev/null +++ b/local/filemgr/index.php @@ -0,0 +1,42 @@ +Create
\t"; +echo "Up
\n"; +foreach (scandir($baseDir) as $entry) { + if ($entry[0] === ".") continue; + $path = "$baseDir/$entry"; + $elem = [ "name" => trim("$name/$entry", "/") ]; + if (is_dir($path)) { + $elem["type"] = "dirs"; + $elem["href"] = "?name=".$elem["name"]; + } else { + $elem["type"] = "files"; + $elem["href"] = "files/".$elem["name"]; + } + $elem["entry"] = $entry; + $elem["date"] = filemtime($path); + $elems[] = $elem; +} +usort($elems, function($a, $b) { + return $b["type"] <=> $a["type"] ?: $b["date"] <=> $a["date"]; +}); +$type = null; +foreach ($elems as $elem) { + if ($elem["type"] !== $type) { + $type = $elem["type"]; + echo "

$type

\n"; + } + echo date("Y-m-d\TH:i", $elem["date"])."\t".$elem["entry"]."\t"; + echo "View\t"; + if ($elem["type"] !== "dirs") + echo "Edit\t"; + echo "Delele
\n"; +} +require "$_shared/footer.php"; +?> diff --git a/local/filemgr/write.php b/local/filemgr/write.php new file mode 100644 index 0000000..264ad07 --- /dev/null +++ b/local/filemgr/write.php @@ -0,0 +1,72 @@ + +
+ + + note + file
+ + dir +
+ + +
+ + diff --git a/local/media/get.php b/local/media/get.php deleted file mode 100644 index 9695cb1..0000000 --- a/local/media/get.php +++ /dev/null @@ -1,19 +0,0 @@ -Try $list
"; - } -} -require "$_shared/footer.php"; -?> diff --git a/local/notes/index.php b/local/notes/index.php deleted file mode 100644 index b4be00c..0000000 --- a/local/notes/index.php +++ /dev/null @@ -1,40 +0,0 @@ -New note
\n"; -foreach (scandir($baseDir) as $entry) { - if ($entry === ".") continue; - $path = "$baseDir/$entry"; - $newName = trim("$name/$entry", "/"); - if (is_dir($path)) { - $elem["type"] = "dirs"; - $elem["href"] = ".?name=$newName"; - } else if (substr($entry, -5) === ".note") { - $elem["type"] = "notes"; - $entry = substr($entry, 0, -5); - $elem["href"] = "write.php?name=$newName"; - } else { - $elem["type"] = "files"; - $elem["href"] = "files/$newName"; - } - $elem["entry"] = $entry; - $elem["date"] = filemtime($path); - $elems[] = $elem; -} -usort($elems, function($a, $b) { - return $a["type"] <=> $b["type"] ?: $b["date"] <=> $a["date"]; -}); -foreach ($elems as $elem) { - if ($elem["type"] !== $type) { - $type = $elem["type"]; - echo "

$type

\n"; - } - $text = date("Y-m-d\TH:i", $elem["date"])." ".$elem["entry"]; - echo "$text
\n"; -} -require "$_shared/footer.php"; -?> diff --git a/local/notes/write.php b/local/notes/write.php deleted file mode 100644 index 73e3c6e..0000000 --- a/local/notes/write.php +++ /dev/null @@ -1,38 +0,0 @@ - -
- - - - - -
- diff --git a/style.css b/style.css index 49d3884..b86db8e 100644 --- a/style.css +++ b/style.css @@ -12,7 +12,7 @@ body { color: #ffffff; background: #000000; } -.content { +input, button, textarea { color: #ffffff; background-color: #303030; }