";
$result = db_query($link, "SELECT
ttrss_entries.title,
content,link,
substring(date_entered,1,19) as date_entered,
substring(updated,1,19) as updated
FROM ttrss_entries,ttrss_user_entries
WHERE ttrss_entries.id = ref_id AND feed_id = '$id'
ORDER BY updated DESC LIMIT 5");
if (db_num_rows($result) > 0) {
print "".__('Last headlines:')." ";
print "
".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."
";
$limit = db_escape_string($_GET["limit"]);
if (!$limit) $limit = 25;
$owner_uid = $_SESSION["uid"];
$result = db_query($link, "SELECT feed_url,COUNT(id) AS subscribers
FROM ttrss_feeds WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
WHERE tf.feed_url = ttrss_feeds.feed_url
AND owner_uid = '$owner_uid') GROUP BY feed_url
ORDER BY subscribers DESC LIMIT $limit");
print " ";
print "