From: Andrew Dolgov Date: Mon, 19 Nov 2007 09:27:24 +0000 (+0100) Subject: tweak stats.php X-Git-Tag: 1.2.17~11 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9c705370053c0ab4664b815c9e67f9c6794ac5c0;p=tt-rss.git tweak stats.php --- diff --git a/utils/stats.php b/utils/stats.php index 51dcaf59..b8e6e06d 100644 --- a/utils/stats.php +++ b/utils/stats.php @@ -47,7 +47,8 @@ $result = db_query($link, "SELECT count(ttrss_entries.id) AS cid, login FROM ttrss_entries LEFT JOIN ttrss_user_entries ON (ref_id = ttrss_entries.id) - LEFT JOIN ttrss_users ON (ttrss_users.id = owner_uid) GROUP BY login"); + LEFT JOIN ttrss_users ON (ttrss_users.id = ttrss_user_entries.owner_uid) + GROUP BY login"); print "

Per-user storage

"; @@ -60,12 +61,36 @@ while ($line = db_fetch_assoc($result)) { print ""; - print "" . $line["cid"] . "" . $line["login"] . ""; + print "" . $line["cid"] . ""; + print "" . $line["login"] . ""; print ""; } print ""; + $result = db_query($link, "SELECT COUNT(ttrss_feeds.id) AS fc, + login FROM ttrss_users, ttrss_feeds + WHERE ttrss_users.id = ttrss_feeds.owner_uid + GROUP BY login ORDER BY fc DESC"); + + print "

Per-user subscriptions

"; + + print ""; + + print " + + + "; + + while ($line = db_fetch_assoc($result)) { + print ""; + print ""; + print ""; + print ""; + } + + print "
OwnerFeeds
" . $line["login"] . "" . $line["fc"] . "
"; + print "

User subscriptions

"; $result = db_query($link, "SELECT title,feed_url,site_url,login,