changeset 1056:6dc4337c7068

Add more information about voting.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 22 Nov 2015 00:33:51 +0200
parents 86f6a6191749
children c9676c9eb511
files admajax.php
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/admajax.php	Sat Nov 21 17:40:48 2015 +0200
+++ b/admajax.php	Sun Nov 22 00:33:51 2015 +0200
@@ -407,7 +407,12 @@
 {
   $nkeys = stFetchSQLColumn("SELECT COUNT(*) FROM votekeys WHERE active=1");
   $totalKeys = stFetchSQLColumn("SELECT COUNT(*) FROM votekeys");
-  return "Info: <b>".$nkeys."</b> of <b>".$totalKeys."</b> votekeys are activated.";
+  
+  $nvoters = stFetchSQLColumn("SELECT COUNT(DISTINCT(key_id)) FROM votes");
+
+  return
+    "Info: <b>".$nkeys."</b> of <b>".$totalKeys."</b> votekeys are activated. ".
+    "Also, <b>".$nvoters."</b> keys have been used for voting.";
 }