From ac43eba1ab9a352de1b06161f9d23f77d445dce8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 6 Sep 2005 05:14:17 +0100 Subject: inputify buttons, store view modes in session cookies, disable headline toolbar initially --- backend.php | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 922309968..492141b93 100644 --- a/backend.php +++ b/backend.php @@ -214,7 +214,7 @@ print ""; -/* + print ""; @@ -225,19 +225,15 @@ print " - "; */ + "; print " + colspan=\"2\" width=\"100%\">" . $line["content"] . ""; print "
Title: ".$line["title"]."  
Link: ".$line["link"]." $comments_prompt 
 
" . $line["content"] . " $feed_icon
"; } -/* print ""; */ - if ($addheader) { print ""; } @@ -258,7 +254,7 @@ if ($addheader) { print " - Tiny Tiny RSS : Article $id + Tiny Tiny RSS : Feed $feed @@ -310,6 +306,10 @@ $view_query_part = " marked = true AND "; } + if ($view_mode == "Unread") { + $view_query_part = " unread = true AND "; + } + $result = pg_query("SELECT count(id) AS total_entries FROM ttrss_entries WHERE $search_query_part @@ -317,12 +317,23 @@ $total_entries = pg_fetch_result($result, 0, "total_entries"); + $result = pg_query("SELECT count(id) AS unread_entries + FROM ttrss_entries WHERE + $search_query_part + unread = true AND + feed_id = '$feed'"); + + $unread_entries = pg_fetch_result($result, 0, "unread_entries"); + +/* if ($limit < $unread_entries) + $limit = $unread_entries; + if ($limit != "All") { $limit_query_part = "LIMIT " . $limit; - } + } */ $result = pg_query("SELECT - id,title,updated,unread,feed_id,marked, + id,title,updated,unread,feed_id,marked,link, EXTRACT(EPOCH FROM last_read) AS last_read_ts, EXTRACT(EPOCH FROM updated) AS updated_ts FROM @@ -364,7 +375,7 @@ alt=\"Set mark\" onclick='javascript:toggleMark($id, true)'>"; } - $content_link = "" . + $content_link = "" . $line["title"] . ""; print "".$line["updated"].""; print "$content_link"; + print "".$line["link"].""; + print ""; ++$lnum; -- cgit v1.2.3-54-g00ecf