X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/4a759bb617538d4c16c54cdc2b83f8ebab2560c7..df9ec3bdf5dd9f4596c0bdf48beb71fa26ac2e40:/index.php
diff --git a/index.php b/index.php
index 21a5fe2..1e966ec 100644
--- a/index.php
+++ b/index.php
@@ -2,23 +2,38 @@
require_once "common.php";
require_once "header.php";
-rpc_pop_lists();
+$stats = $rpc->query("stats.get", []);
?>
Network Overview
-
+
-
+/* What if someone wants to add their own stats... */
+Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $array_of_stats);
+
+/* This makes sure that a plugin which called the parameter
+ * by reference can add/update the stats for display here.
+*/
+$stats = (object) $array_of_stats;
+
+
+?>
+
+
+
+
@@ -31,8 +46,10 @@ rpc_pop_lists();
+
+
-
+
@@ -54,7 +71,7 @@ rpc_pop_lists();
-
+
@@ -71,14 +88,13 @@ rpc_pop_lists();
Opers
-
-
+
-
+
@@ -105,7 +121,7 @@ rpc_pop_lists();
-
+
@@ -122,12 +138,12 @@ rpc_pop_lists();
Server Bans
-
+
-
+
@@ -149,7 +165,7 @@ rpc_pop_lists();
-
+
@@ -167,16 +183,25 @@ rpc_pop_lists();
Server Ban Exceptions
-
+
server->ulined) {
$bg = "bg-success";
- } ?>
-
+
+ /* honestly can't think of a case where there would actually be only one uline... but... well here we are, worrying over the small stuff =] */
+ $user_noun = ($stats->user->ulined == 1) ? "user" : "users"; // use "users" even if 0, sounds better.
+ $is_are = ($stats->user->ulined == 1) ? "is" : "are";
+ $server_noun = ($stats->server->ulined == 1) ? "server" : "servers";
+ $tooltip = "There $is_are " . $stats->user->ulined . " U-Lined $user_noun over " . $stats->server->ulined . " U-Lined $server_noun";
+ }
+ else
+ $bg = "bg-warning";
+ ?>
+
@@ -193,7 +218,7 @@ rpc_pop_lists();
Services Online
-
+
@@ -201,7 +226,41 @@ rpc_pop_lists();
+
+