notes app created with files backend

This commit is contained in:
bogale 2026-09-29 00:55:38 +09:00
commit 9d716fd449
9 changed files with 85 additions and 14 deletions

View file

@ -1,21 +0,0 @@
<?php
$title = "Media manager";
$root = $_SERVER["DOCUMENT_ROOT"];
require "$root/templates/header.php";
$urls_base = __DIR__ . "/../urls";
if (isset($_GET["list"])) {
$file = "$urls_base/" . $_GET["list"];
$urls = json_decode(file_get_contents($file));
$url = $urls[array_rand($urls)];
echo "<a href='$url'>Watch</a><br>";
} else {
foreach (scandir($urls_base) as $list) {
if ($list === '.' || $list === '..')
continue;
echo "<a href='" . $_SERVER['PHP_SELF'] . "?list=$list'>List $list</a><br>";
}
}
require "$root/templates/footer.php";
?>