diff options
| -rw-r--r-- | models/archivelist.php | 11 | ||||
| -rw-r--r-- | views/list/index.php | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/models/archivelist.php b/models/archivelist.php index 09d5d86..75bee1f 100644 --- a/models/archivelist.php +++ b/models/archivelist.php @@ -38,4 +38,15 @@ class ArchiveList extends Table { "(\"$WID\", \"$this->LID\", \"0\")" ); } + + function allItems() : array { + return Table::_get_all( + 'Webpages', + 'Database\Webpage', + "INNER JOIN ArchiveListsWebpages ON Webpages.WID = ArchiveListsWebpages.WID + WHERE ArchiveListsWebpages.LID = $this->LID + ORDER BY ArchiveListsWebpages.Position ASC", + 'Webpages.*' + ); + } } diff --git a/views/list/index.php b/views/list/index.php index 79402ec..9047fb3 100644 --- a/views/list/index.php +++ b/views/list/index.php @@ -15,6 +15,12 @@ <p><?= $list->Description ?></p> <p><?= $author->Username ?></p> </section> + <?php foreach($list->allItems() as $webpage): ?> + <section> + <?= $webpage->URL ?> + </section> + <?php endforeach; ?> + <?php else: ?> <p> List doesn't exist |
