-
Notifications
You must be signed in to change notification settings - Fork 46
/
cachelists.php
executable file
·49 lines (41 loc) · 1.66 KB
/
cachelists.php
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
***************************************************************************/
require('./lib2/web.inc.php');
require_once('./lib2/logic/cachelist.class.php');
require_once('./lib2/pager.class.php');
$login->verify();
$tpl->name = 'cachelists';
$tpl->menuitem = MNU_CACHES_LISTS;
if (isset($_REQUEST['watchlist'])) {
$list = new cachelist($_REQUEST['watchlist'] + 0);
if ($list->exist()) {
$list->watch(true);
}
} elseif (isset($_REQUEST['dontwatchlist'])) {
$list = new cachelist($_REQUEST['dontwatchlist'] + 0);
if ($list->exist()) {
$list->watch(false);
}
}
$MAXITEMS = 30;
$startat = isset($_REQUEST['startat']) ? max(0, floor($_REQUEST['startat'] + 0)) : 0;
$name_filter = isset($_REQUEST['name']) ? $_REQUEST['name'] : '';
$by_filter = isset($_REQUEST['by']) ? $_REQUEST['by'] : '';
$listcount = cachelist::getPublicListCount($name_filter, $by_filter);
$tpl->assign('name_filter', $name_filter);
$tpl->assign('by_filter', $by_filter);
$tpl->assign('cachelists', cachelist::getPublicLists($startat, $MAXITEMS, $name_filter, $by_filter));
$tpl->assign('show_bookmarks', true);
$tpl->assign('show_status', false);
$tpl->assign('show_user', true);
// Do not show watchers because this would allow conclusions on what the list owner watches.
$tpl->assign('show_watchers', false);
$tpl->assign('show_edit', false);
$tpl->assign('togglewatch', 'cachelists.php');
$pager = new pager("cachelists.php?startat={offset}");
$pager->make_from_offset($startat, $listcount, $MAXITEMS);
$tpl->display();