X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/809f7483740d9eae0abd77aa670fe26b5ce70c41..44c4413886a9c33daf3a7cd300f353547735ef30:/index.php
diff --git a/index.php b/index.php
index dd0d60f..173a84d 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
-
-
+
-
+
@@ -95,7 +111,7 @@ rpc_pop_lists();
Servers
-
+
@@ -105,7 +121,7 @@ rpc_pop_lists();
-
+
@@ -127,7 +143,7 @@ rpc_pop_lists();
-
+
@@ -149,7 +165,7 @@ rpc_pop_lists();
-
+
@@ -173,10 +189,19 @@ rpc_pop_lists();
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
-
+
@@ -204,4 +229,6 @@ rpc_pop_lists();