diff options
-rw-r--r-- | mobile/functions.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mobile/functions.php b/mobile/functions.php index e07225da7..71baa08d1 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -67,6 +67,8 @@ print "</ul>"; } else if ($cat_id == -1) { + $title = __('Special'); + print "<ul id='cat--1' title='$title' myBackLabel='Feeds' myBackHref='index.php' myBackTarget='_self'>"; @@ -86,6 +88,37 @@ } print "</ul>"; + } else if ($cat_id == -2) { + + $title = __('Labels'); + + print "<ul id='cat--2' title='$title' myBackLabel='Feeds' + myBackHref='index.php' myBackTarget='_self'>"; + + $result = db_query($link, "SELECT id, caption FROM ttrss_labels2 + WHERE owner_uid = '$owner_uid'"); + + $label_data = array(); + + while ($line = db_fetch_assoc($result)) { + + $id = -$line["id"] - 11; + + $unread = getFeedUnread($link, $id); + $title = $line["caption"]; + + if ($unread > 0) { + $title = $title . " ($unread)"; + $class = ''; + } else { + $class = 'oldItem'; + } + + print "<li class='$class'> + <a href='feed.php?id=$id&cat=-1'>$title</a></li>"; + + } + print "</ul>"; } } |