diff options
| author | Syndamia <kamen@syndamia.com> | 2025-01-26 19:01:17 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2025-01-26 22:21:31 +0200 |
| commit | 73ad3e330be1a6849269fec5d4b7b42b0330cede (patch) | |
| tree | 6806ec41af41fd23f3a8cacdbc235c828c494d85 /views | |
| parent | 77708ef5b9559e6598f5acf7d2b30dbdbd037d81 (diff) | |
| download | nowayforward_human-73ad3e330be1a6849269fec5d4b7b42b0330cede.tar nowayforward_human-73ad3e330be1a6849269fec5d4b7b42b0330cede.tar.gz nowayforward_human-73ad3e330be1a6849269fec5d4b7b42b0330cede.zip | |
feat(views): Implement list (get) view
Diffstat (limited to 'views')
| -rw-r--r-- | views/global/router.php | 1 | ||||
| -rw-r--r-- | views/list/index.php | 22 | ||||
| -rw-r--r-- | views/list/meta.php | 4 |
3 files changed, 27 insertions, 0 deletions
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 @@ +<?php + $list = null; + $author = null; + + try { + $list = Database\ArchiveList::fromDB($lid); + $author = Database\User::fromDBuid($list->AuthorUID); + } + catch(Exception $e) {} +?> + +<?php if ($list !== null): ?> + <section> + <p><?= $list->Name ?></p> + <p><?= $list->Description ?></p> + <p><?= $author->Username ?></p> + </section> +<?php else: ?> + <p> + List doesn't exist + </p> +<?php endif; ?> 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 @@ +<?php + +$lid = explode('/', $uri, 4)[2]; +$title = 'List'; |
