From 73ad3e330be1a6849269fec5d4b7b42b0330cede Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 26 Jan 2025 19:01:17 +0200 Subject: feat(views): Implement list (get) view --- models/archivelist.php | 2 +- views/global/router.php | 1 + views/list/index.php | 22 ++++++++++++++++++++++ views/list/meta.php | 4 ++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 views/list/index.php create mode 100644 views/list/meta.php diff --git a/models/archivelist.php b/models/archivelist.php index 3723419..25b75fe 100644 --- a/models/archivelist.php +++ b/models/archivelist.php @@ -19,7 +19,7 @@ class ArchiveList extends Table { static function fromDB(int $LID) : ArchiveList { return Table::_fromDB( "SELECT * FROM ArchiveLists WHERE LID = \"$LID\"", - 'Database\ArchiveLists' + 'Database\ArchiveList' ); } diff --git a/views/global/router.php b/views/global/router.php index f8e1299..fa9348d 100644 --- a/views/global/router.php +++ b/views/global/router.php @@ -18,6 +18,7 @@ function route_view() { case '/login': return '/login'; case '/logout': return '/logout'; case '/newlist': return '/newlist'; + case '/list': return '/list'; } switch ($uri) { diff --git a/views/list/index.php b/views/list/index.php new file mode 100644 index 0000000..01c18b4 --- /dev/null +++ b/views/list/index.php @@ -0,0 +1,22 @@ +AuthorUID); + } + catch(Exception $e) {} +?> + + +
+

Name ?>

+

Description ?>

+

Username ?>

+
+ +

+ List doesn't exist +

+ diff --git a/views/list/meta.php b/views/list/meta.php new file mode 100644 index 0000000..137794e --- /dev/null +++ b/views/list/meta.php @@ -0,0 +1,4 @@ +