From: Andrew Dolgov
Date: Tue, 19 Sep 2006 04:28:58 +0000 (+0100)
Subject: move stats.php to utils/
X-Git-Tag: 1.2.3~4
X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=fbf831b13ff3746ec410fd2566ded2d7328635f3;p=tt-rss.git
move stats.php to utils/
---
diff --git a/stats.php b/stats.php
deleted file mode 100644
index 5bc4355d..00000000
--- a/stats.php
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- Tiny Tiny Statistics
-
-
-
-
-
-Tiny Tiny Statistics
-
-Counters
-
-Total articles stored: $total_articles (${articles_size}K)
";
-
-/* $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login
- FROM ttrss_user_entries
- LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id)
- GROUP BY owner_uid,login ORDER BY cid DESC"); */
-
- $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");
-
- print "Per-user storage
";
-
- print "";
-
- print "
- Articles |
- Owner |
-
";
-
- while ($line = db_fetch_assoc($result)) {
- print "";
- print "" . $line["cid"] . " | " . $line["login"] . " | ";
- print "
";
- }
-
- print "
";
-
- 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 "
- Site |
- Feed |
- Owner |
- Stored Articles |
- Unread Articles |
-
";
-
- $cur_login = "";
-
- while ($line = db_fetch_assoc($result)) {
- print "";
- print "".$line["title"]." | ";
- print "".$line["feed_url"]." | ";
- print "" . $line["login"] . " | ";
- print "" . $line["num_articles"] . " | ";
- print "" . $line["num_articles_unread"] . " | ";
- print "
";
-
- if ($cur_login != $line["login"] && $cur_login != "") {
- print " |
";
- $cur_login = $line["login"];
- }
- }
-
- print "
";
-
-?>
-
-
-
-
diff --git a/utils/stats.php b/utils/stats.php
new file mode 100644
index 00000000..5bc4355d
--- /dev/null
+++ b/utils/stats.php
@@ -0,0 +1,110 @@
+
+
+
+
+ Tiny Tiny Statistics
+
+
+
+
+
+Tiny Tiny Statistics
+
+Counters
+
+Total articles stored: $total_articles (${articles_size}K)";
+
+/* $result = db_query($link, "SELECT COUNT(int_id) as cid,owner_uid,login
+ FROM ttrss_user_entries
+ LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id)
+ GROUP BY owner_uid,login ORDER BY cid DESC"); */
+
+ $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");
+
+ print "Per-user storage
";
+
+ print "";
+
+ print "
+ Articles |
+ Owner |
+
";
+
+ while ($line = db_fetch_assoc($result)) {
+ print "";
+ print "" . $line["cid"] . " | " . $line["login"] . " | ";
+ print "
";
+ }
+
+ print "
";
+
+ 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 "
+ Site |
+ Feed |
+ Owner |
+ Stored Articles |
+ Unread Articles |
+
";
+
+ $cur_login = "";
+
+ while ($line = db_fetch_assoc($result)) {
+ print "";
+ print "".$line["title"]." | ";
+ print "".$line["feed_url"]." | ";
+ print "" . $line["login"] . " | ";
+ print "" . $line["num_articles"] . " | ";
+ print "" . $line["num_articles_unread"] . " | ";
+ print "
";
+
+ if ($cur_login != $line["login"] && $cur_login != "") {
+ print " |
";
+ $cur_login = $line["login"];
+ }
+ }
+
+ print "
";
+
+?>
+
+
+
+