blob: 6fa91e1019217b6e3a6a1c1316ec030270144349 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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>
|