CMS
Version 3.9
my_bookmarks.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"bookmark"
);
3
$page
->page_title =
"My Bookmarks"
;
4
5
$bookmarks
= GroupedQuery::create(
Bookmark
,
"WHERE user_id=:u ORDER BY category, title"
,
"category"
)
6
->bind(
":u"
,
$user
->get(
$user
->getPrimaryKey()))
7
->execute();
8
9
if
(count(
$bookmarks
) > 0)
10
{
11
foreach
(
$bookmarks
as $category =>
$links
)
12
{
13
if
(!$category) $category =
"Unclassified"
;
14
15
echo
"<h3>$category</h3>"
;
16
echo
"<ul>"
;
17
18
foreach
(
$links
as
$link
)
19
{
20
echo
$link
->format(
"<li><a href='{url}'>{title}</a> <img src='/fakoli/images/icon_edit.png' alt='Edit' style='cursor: pointer' onclick='BookmarkManager.editBookmark({bookmark_id}); return false'/>"
);
21
}
22
23
echo
"</ul>"
;
24
}
25
}
26
else
27
{
28
echo
"<em>You haven't recorded any bookmarks.</em>"
;
29
}
$page
$page
Definition:
help.inc:39
Bookmark
Definition:
bookmark.inc:40
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
$user
global $user
Definition:
comment_form.inc:16
$link
$link
Definition:
delete_link.inc:38
$links
$links
Definition:
library_link_list.inc:10
$bookmarks
$bookmarks
Definition:
my_bookmarks.inc:5
code
cms.sonjara.com
cms
components
bookmark
pages
my_bookmarks.inc
Generated on Tue Mar 23 2021 15:36:12 for CMS by
1.9.1