summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-08-26 04:11:37 +0100
committerAndrew Dolgov <[email protected]>2005-08-26 04:11:37 +0100
commitb7f4bda2987193da0399aed302df0c5624e0f9ce (patch)
tree9d84e618b3fa1ae777e3f164aef5951141fc5f9c /backend.php
parenta14b6d21d977058359acda6719ff528fde583209 (diff)
support for feed-specific images (channel->url)
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php34
1 files changed, 20 insertions, 14 deletions
diff --git a/backend.php b/backend.php
index 6dd80a414..e34cde944 100644
--- a/backend.php
+++ b/backend.php
@@ -178,30 +178,36 @@
$result = pg_query("UPDATE ttrss_entries SET unread = false,last_read = NOW() WHERE id = '$id'");
- $result = pg_query("SELECT title,link,content FROM ttrss_entries
+ $result = pg_query("SELECT title,link,content,feed_id,
+ (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url
+ FROM ttrss_entries
WHERE id = '$id'");
if ($result) {
$line = pg_fetch_assoc($result);
-/* print "<table class=\"feedOverview\">";
- print "<tr><td><b>Title:</b></td><td>".$line["title"]."</td></tr>";
- print "<tr><td><b>Link:</b></td><td><a href=\"".$line["link"]."\">".$line["link"]."</a></td></tr>";
- print "</table>";
-
- print $line["content"]; */
-
+ if ($line["icon_url"]) {
+ $feed_icon = "<img class=\"feedIcon\" src=\"" . $line["icon_url"] . "\">";
+ } else {
+ $feed_icon = "&nbsp;";
+ }
- print "<table class=\"postTable\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
+ 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></tr>";
+ <td width=\"100%\">".$line["title"]."</td>
+ <td>&nbsp;</td></tr>";
print "<tr class=\"titleBottom\"><td align=\"right\"><b>Link:</b></td>
- <td><a href=\"".$line["link"]."\">".$line["link"]."</a></td></tr>";
-
- print "<tr><td class=\"post\" colspan=\"2\">" . $line["content"] . "</td></tr>";
- print "</table>";
+ <td><a href=\"".$line["link"]."\">".$line["link"]."</a></td>
+ <td>&nbsp;</td> </tr>";
+ print "<tr><td class=\"post\" colspan=\"2\">" . $line["content"] . "</td>
+ <td valign=\"top\">$feed_icon</td>
+ </tr>";
+ print "</table>";
+
}
}