diff options
author | Andrew Dolgov <[email protected]> | 2005-11-20 11:36:00 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-20 11:36:00 +0100 |
commit | bca02305ba0a0f7ae90e328f838b17c409465599 (patch) | |
tree | d58a82e03bd10fcbd46a3098aa07c6a9d3f4f4fd /backend.php | |
parent | fdbcd71a7ecb3b6d872e2259af33205c9920bbb2 (diff) |
show latest headlines in feed details
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/backend.php b/backend.php index 169ce297a..9b2cd288f 100644 --- a/backend.php +++ b/backend.php @@ -2221,12 +2221,30 @@ print "</table>"; - print "</div>"; + $result = db_query($link, "SELECT title,updated + FROM ttrss_entries,ttrss_user_entries + WHERE ref_id = id AND feed_id = '$feed_id' + ORDER BY date_entered LIMIT 5"); - print "<div align='center'> - <input type='submit' class='button' - onclick=\"closeInfoBox()\" value=\"Close this window\"></div>"; + if (db_num_rows($result) > 0) { + + print "<h1>Latest headlines</h1>"; + print "<ul class=\"nomarks\">"; + + while ($line = db_fetch_assoc($result)) { + print "<li>" . $line["title"]. + " <span class=\"insensitive\">(" .$line["updated"].")</span></li>"; + } + + print "</ul>"; + + print "</div>"; + + print "<div align='center'> + <input type='submit' class='button' + onclick=\"closeInfoBox()\" value=\"Close this window\"></div>"; + } } db_close($link); |