From: Andrew Dolgov Date: Sun, 12 Feb 2006 10:45:47 +0000 (+0100) Subject: statistics stub X-Git-Tag: 1.1.3~16 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=81f8401db744830ca78f6aa7a54e11de79bcf1e9;p=tt-rss.git statistics stub --- diff --git a/error.php b/error.php index 2dd8e133..cc57b64d 100644 --- a/error.php +++ b/error.php @@ -28,6 +28,7 @@ $ERRORS[8] = "Could not display feed: query failed. Please check label match syntax or local configuration."; + $ERRORS[8] = "Denied. Your access level is insufficient to access this page."; ?> diff --git a/stats.php b/stats.php new file mode 100644 index 00000000..65723ff2 --- /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"] . "
 
"; + +?> + + + +