aboutsummaryrefslogtreecommitdiff
path: root/views/list/update
diff options
context:
space:
mode:
Diffstat (limited to 'views/list/update')
-rw-r--r--views/list/update/index.php32
-rw-r--r--views/list/update/meta.php3
2 files changed, 35 insertions, 0 deletions
diff --git a/views/list/update/index.php b/views/list/update/index.php
new file mode 100644
index 0000000..6fa91e1
--- /dev/null
+++ b/views/list/update/index.php
@@ -0,0 +1,32 @@
+
+<!-- TODO: Redirect when no user -->
+
+<?php
+ $user = null;
+ $webpage = null;
+ $lists = null;
+
+ try {
+ $user = Database\Cookie::fromDB($TOKEN);
+ $webpage = Database\Webpage::fromDBwid($_GET['wid']);
+ $lists = Database\ArchiveList::allListsByUser($user->UID);
+ }
+ catch (Exception $e) {}
+?>
+
+<!-- TODO: Redirect when no webpage -->
+<!-- TODO: Redirect when lists is empty -->
+
+<h2>To which list do you want to add "<?= $webpage->URL ?>"?</h2>
+
+<form action="/list" method="GET">
+ <input type="hidden" name="method" value="PATCH">
+ <select name="lid">
+ <?php foreach ($lists as $list): ?>
+ <option value="<?= $list->LID ?>"><?= $list->Name ?></option>
+ <?php endforeach; ?>
+ </select>
+ <input type="hidden" name="type" value="add">
+ <input type="hidden" name="wid" value="<?= $_GET['wid'] ?>">
+ <input type="submit" value="Select">
+</form>
diff --git a/views/list/update/meta.php b/views/list/update/meta.php
new file mode 100644
index 0000000..96fd169
--- /dev/null
+++ b/views/list/update/meta.php
@@ -0,0 +1,3 @@
+<?php
+
+$title = 'Add to list';