From fc69e64169acac42622be2fcf3fba14711b11768 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 23 Oct 2005 16:40:55 +0100 Subject: start work on showing number of unread articles in title --- backend.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 6f5e2dd59..495cebe72 100644 --- a/backend.php +++ b/backend.php @@ -28,6 +28,13 @@ /* FIXME this needs reworking */ + function getGlobalCounters($link) { + $result = db_query($link, "SELECT count(id) as c_id FROM ttrss_entries + WHERE unread = true"); + $c_id = db_fetch_result($result, 0, "c_id"); + print ""; + } + function getTagCounters($link) { $result = db_query($link, "SELECT tag_name,count(ttrss_entries.id) AS count FROM ttrss_tags,ttrss_entries WHERE @@ -276,8 +283,8 @@ getLabelCounters($link); getFeedCounters($link); getTagCounters($link); + getGlobalCounters($link); print ""; - } if ($subop == "mark") { @@ -321,6 +328,7 @@ if (strchr($omode, "l")) getLabelCounters($link); if (strchr($omode, "f")) getFeedCounters($link); if (strchr($omode, "t")) getTagCounters($link); + getGlobalCounters($link); print ""; } -- cgit v1.2.3