diff --git a/www/stats.php b/www/stats.php
index 6aa1b55..4fac899 100644
--- a/www/stats.php
+++ b/www/stats.php
@@ -9,7 +9,7 @@
CAcert.org =_("Statistics")?> |
- =_("Users")?>: |
+ =_("Verified Users")?>: |
=number_format(mysql_num_rows(mysql_query("select * from `users` where `verified`=1")))?> |
@@ -37,6 +37,7 @@
$certs += mysql_num_rows(mysql_query("select * from `gpg` where `expire`<=NOW()"));
$certs += mysql_num_rows(mysql_query("select * from `orgdomaincerts` where `revoked`=0 and `expire`>NOW()"));
$certs += mysql_num_rows(mysql_query("select * from `orgemailcerts` where `revoked`=0 and `expire`>NOW()"));
+ $totalassurers = mysql_num_rows(mysql_query("select * from notary group by `to` having sum(`points`) >= 100"));
?>
=_("Valid Certificates")?>: |
@@ -44,12 +45,68 @@
=_("Assurers")?>: |
- =number_format(mysql_num_rows(mysql_query("select * from notary group by `to` having sum(`points`) >= 100")))?> |
+ =number_format($totalassurers)?> |
=_("Assurances Made")?>: |
=number_format(mysql_num_rows(mysql_query("select * from `notary`")))?> |
+
+
+
+ CAcert.org =_("Growth in the last 12 months")?> |
+
+
+ =_("Date")?>
+ | =_("New Users")?>
+ | =_("New Assurers")?>
+ |
+ for($i = 0; $i < 12; $i++) {
+ $date = date("Y-m", mktime(0,0,0,date("m") - $i,1,date("Y")));
+ $totalusers += $users = mysql_num_rows(mysql_query("select * from `users` where `created` like '$date%' and `verified`=1"));
+ $totassurers += $assurers = mysql_num_rows(mysql_query("select * from `notary` where `when` like '$date%' and `method`!='Administrative Increase' group by `to` having sum(`points`) >= 100"));
+?>
+
+ =$date?> |
+ =number_format($users)?> |
+ =number_format($assurers)?> |
+
+ } ?>
+
+ N/A |
+ =number_format($totalusers)?> |
+ =number_format($totassurers)?> |
+
+
+
+
+
+ CAcert.org =_("Growth by year")?> |
+
+
+ =_("Date")?>
+ | =_("New Users")?>
+ | =_("New Assurers")?>
+ |
+
+ $totalusers = $totassurers = 0;
+ for($i = date("Y"); $i >= 2002; $i--) {
+ $totalusers += $users = mysql_num_rows(mysql_query("select * from `users` where `created` like '$i%' and `verified`=1"));
+ $totassurers += $assurers = mysql_num_rows(mysql_query("select * from `notary` where `when` like '$i%' and `method`!='Administrative Increase' group by `to` having sum(`points`) >= 100"));
+?>
+
+ =$i?> |
+ =number_format($users)?> |
+ =number_format($assurers)?> |
+
+ } ?>
+
+ N/A |
+ =number_format($totalusers)?> |
+ =number_format($totassurers)?> |
+
+
+
showfooter(); ?>