From 81f8401db744830ca78f6aa7a54e11de79bcf1e9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 12 Feb 2006 11:45:47 +0100 Subject: statistics stub --- stats.php | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 stats.php (limited to 'stats.php') diff --git a/stats.php b/stats.php new file mode 100644 index 000000000..65723ff2e --- /dev/null +++ b/stats.php @@ -0,0 +1,102 @@ + + + + + Tiny Tiny Statistics + + + + +

Tiny Tiny Statistics

+ +

Counters

+ +Total articles stored: $total_articles

"; + + $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login + FROM ttrss_user_entries + JOIN ttrss_users ON (owner_uid = ttrss_users.id) + GROUP BY owner_uid,login ORDER BY cid DESC"); + + print "

Per-user storage

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

User subscriptions

"; + + $result = db_query($link, "SELECT title,feed_url,site_url,login, + (SELECT count(int_id) FROM ttrss_user_entries + WHERE feed_id = ttrss_feeds.id) AS num_articles, + (SELECT count(int_id) FROM ttrss_user_entries + WHERE feed_id = ttrss_feeds.id AND unread = true) AS num_articles_unread + FROM ttrss_feeds,ttrss_users + WHERE owner_uid = ttrss_users.id ORDER BY login"); + + print ""; + print " + + + + + + "; + + $cur_login = ""; + + while ($line = db_fetch_assoc($result)) { + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + if ($cur_login != $line["login"] && $cur_login != "") { + print ""; + $cur_login = $line["login"]; + } + } + + print "
SiteFeedOwnerStored ArticlesUnread Articles
".$line["title"]."".$line["feed_url"]."" . $line["login"] . "" . $line["num_articles"] . "" . $line["num_articles_unread"] . "
 
"; + +?> + + + + -- cgit v1.2.3