summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-09-06 05:14:17 +0100
committerAndrew Dolgov <[email protected]>2005-09-06 05:14:17 +0100
commitac43eba1ab9a352de1b06161f9d23f77d445dce8 (patch)
treee7bd2bd547ca99355594fc02cf3032f2d9a5b691 /backend.php
parent5f89f7803b18d2c66a076bf7c3b9a7221dc3278f (diff)
inputify buttons, store view modes in session cookies, disable headline toolbar initially
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php35
1 files changed, 24 insertions, 11 deletions
diff --git a/backend.php b/backend.php
index 922309968..492141b93 100644
--- a/backend.php
+++ b/backend.php
@@ -214,7 +214,7 @@
print "<table class=\"postTable\" width=\"100%\" cellspacing=\"0\"
cellpadding=\"0\">";
-/*
+
print "<tr class=\"titleTop\"><td align=\"right\"><b>Title:</b></td>
<td width=\"100%\">".$line["title"]."</td>
<td>&nbsp;</td></tr>";
@@ -225,19 +225,15 @@
print "<tr class=\"titleBottom\"><td align=\"right\"><b>Link:</b></td>
<td><a href=\"".$line["link"]."\">".$line["link"]."</a> $comments_prompt</td>
- <td>&nbsp;</td></tr>"; */
+ <td>&nbsp;</td></tr>";
print "<tr><td valign=\"top\" class=\"post\"
- colspan=\"2\">" . $line["content"] . "</td>
+ colspan=\"2\" width=\"100%\">" . $line["content"] . "</td>
<td valign=\"top\">$feed_icon</td>
</tr>";
print "</table>";
}
-/* print "<script type=\"text/javascript\">
- p_notify(''); -- FLICKER
- </script>"; */
-
if ($addheader) {
print "</body></html>";
}
@@ -258,7 +254,7 @@
if ($addheader) {
print "<html><head>
- <title>Tiny Tiny RSS : Article $id</title>
+ <title>Tiny Tiny RSS : Feed $feed</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<script type=\"text/javascript\" src=\"functions.js\"></script>
@@ -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 = "<a href=\"javascript:view($id,$feed_id);\">" .
+ $content_link = "<a id=\"FTITLE-$id\" href=\"javascript:view($id,$feed_id);\">" .
$line["title"] . "</a>";
print "<tr class='$class' id='RROW-$id'";
@@ -380,6 +391,8 @@
<a href=\"javascript:view($id,$feed_id);\">".$line["updated"]."</a></td>";
print "<td class='headlineTitle'>$content_link</td>";
+ print "<td class=\"invisible\" id=\"FLINK-$id\">".$line["link"]."</td>";
+
print "</tr>";
++$lnum;