From 9d716fd4497501aef18c748ca15bd6a4d564a381 Mon Sep 17 00:00:00 2001 From: bogale Date: Tue, 29 Sep 2026 00:55:38 +0900 Subject: [PATCH] notes app created with files backend --- .gitignore | 6 ++--- app/pswd.php | 6 +++-- index.php | 8 ++++--- local/{apps => media}/get.php | 9 ++++---- local/notes/db.php | 8 +++++++ local/notes/index.php | 15 +++++++++++++ local/notes/write.php | 41 +++++++++++++++++++++++++++++++++++ marks | 3 +++ templates/header.php | 3 ++- 9 files changed, 85 insertions(+), 14 deletions(-) rename local/{apps => media}/get.php (73%) create mode 100644 local/notes/db.php create mode 100644 local/notes/index.php create mode 100644 local/notes/write.php create mode 100644 marks diff --git a/.gitignore b/.gitignore index d69e2d9..783175d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/favicon.ico /local/net -/local/urls -/local/videos +/favicon.ico +/local/media/urls +/local/media/videos diff --git a/app/pswd.php b/app/pswd.php index bc8a60e..59e7571 100644 --- a/app/pswd.php +++ b/app/pswd.php @@ -1,11 +1,13 @@ $str\n"; +echo "
\n"; +echo "\n"; require "$root/templates/footer.php"; ?> diff --git a/index.php b/index.php index 026f32e..495a4df 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ @@ -9,8 +9,10 @@ require "$root/templates/header.php"; Password generator

Private

Vaultwarden
-Media manager
-Media downloader
+Grafana
+Notes
+Media viewer
+Media downloader
diff --git a/local/apps/get.php b/local/media/get.php similarity index 73% rename from local/apps/get.php rename to local/media/get.php index cd0070f..74b725f 100644 --- a/local/apps/get.php +++ b/local/media/get.php @@ -1,19 +1,18 @@ Watch
"; + header("Location: " . $urls[array_rand($urls)]); } else { foreach (scandir($urls_base) as $list) { if ($list === '.' || $list === '..') continue; - echo "List $list
"; + echo "Try $list
"; } } diff --git a/local/notes/db.php b/local/notes/db.php new file mode 100644 index 0000000..58bdacc --- /dev/null +++ b/local/notes/db.php @@ -0,0 +1,8 @@ + PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, +]); +$pdo->query("create table mail(id int)"); +?> diff --git a/local/notes/index.php b/local/notes/index.php new file mode 100644 index 0000000..963b81b --- /dev/null +++ b/local/notes/index.php @@ -0,0 +1,15 @@ + +Write a note
+

Notes

+$note
\n"; +} +require "$root/templates/footer.php"; +?> diff --git a/local/notes/write.php b/local/notes/write.php new file mode 100644 index 0000000..3f0e120 --- /dev/null +++ b/local/notes/write.php @@ -0,0 +1,41 @@ + +
+ + +

+ +
+ + diff --git a/marks b/marks new file mode 100644 index 0000000..af48e8b --- /dev/null +++ b/marks @@ -0,0 +1,3 @@ +todo: +- notes manager +- video downloader diff --git a/templates/header.php b/templates/header.php index 976668b..f650dbd 100644 --- a/templates/header.php +++ b/templates/header.php @@ -2,7 +2,8 @@ - <?= $title ?> + <?= $_title ?> +