]> git.wh0rd.org - tt-rss.git/commitdiff
show latest headlines in feed details
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 10:36:00 +0000 (11:36 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 10:36:00 +0000 (11:36 +0100)
backend.php
tt-rss.css

index 169ce297a181165547f29e0e32d10821475325eb..9b2cd288f5d028ca0b7d72fa595da96dce0806bb 100644 (file)
 
                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"].
+                               "&nbsp;<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);
index 7c32578875566503c2b976d866a185de51b1e51a..cf9aeea32023312b44bc1c67352265caf6236579 100644 (file)
@@ -613,3 +613,7 @@ table.innerLoginForm td {
 div.small, p.small {
        font-size : x-small;
 }
+
+span.insensitive {
+       color : gray;
+}