From f3c368ea55c3a24636ca99a5c8a836c288026c02 Mon Sep 17 00:00:00 2001 From: David Morley Date: Sun, 26 Feb 2017 13:55:53 -0800 Subject: [PATCH] Basic pod stats (#97) * wip * re * more * fixes and make the sql work right * Make the SQL query easier to read and shorten it a bit. (#116) * use y twice * Few updates --- js/podup.js | 1 - podstat.php | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++ rate.php | 2 +- showfull.php | 3 +- 4 files changed, 174 insertions(+), 4 deletions(-) create mode 100644 podstat.php diff --git a/js/podup.js b/js/podup.js index 2b1c1e1..1fcd8ea 100644 --- a/js/podup.js +++ b/js/podup.js @@ -12,4 +12,3 @@ $.facebox.settings.loadingImage = 'bower_components/facebox/src/loading.gif' }) }); - diff --git a/podstat.php b/podstat.php new file mode 100644 index 0000000..9d662be --- /dev/null +++ b/podstat.php @@ -0,0 +1,172 @@ + + + + diff --git a/rate.php b/rate.php index 9451b01..c260d58 100644 --- a/rate.php +++ b/rate.php @@ -49,7 +49,7 @@ -
+
' . $version . '
'; echo '' . $row['softwarename'] . ''; - echo '' . ($row['uptime_alltime'] > 0 ? $row['uptime_alltime'].'%' : '-') . ''; + echo '' . ($row['uptime_alltime'] > 0 ? $row['uptime_alltime'].'%' : '') . ''; echo '' . ($row['ipv6'] === 't' ? '✓' : '') . ''; echo '' . ($row['latency'] > 0 ? $row['latency'] : '') . ''; echo '' . ($row['signup'] === 't' ? '✓' : '') . ''; @@ -79,7 +79,6 @@ $numrows = pg_num_rows($result); echo '' . ($row['active_users_monthly'] > 0 ? $row['active_users_monthly'] : '') . ''; echo '' . ($row['local_posts'] > 0 ? $row['local_posts'] : '') . ''; echo '' . ($row['comment_counts'] > 0 ? $row['comment_counts'] : '') . ''; - $moreurl = '/showstats.php?domain=' . $row['domain']; echo '
' . $row['monthsmonitored'] . '
'; echo '' . $row['userrating']; echo ''; -- GitLab