X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/75c101fdf81cf76433e974b2dd9194aadbd75549..462bd7231d893710a96ac01a0b9ebdd43a4cac64:/index.php?ds=inline
diff --git a/index.php b/index.php
index 05675fd..f656ab4 100644
--- a/index.php
+++ b/index.php
@@ -1,25 +1,42 @@
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;
+
+$userlist = [];
+Hook::run(HOOKTYPE_GET_USER_LIST, $userlist);
+$num_of_panel_admins = count($userlist);
+
+?>
+
+
+
+
@@ -32,8 +49,10 @@ rpc_pop_lists();
+
+
-
+
@@ -55,7 +74,7 @@ rpc_pop_lists();
-
+
@@ -72,14 +91,13 @@ rpc_pop_lists();
Opers
-
-
+
-
+
@@ -96,7 +114,7 @@ rpc_pop_lists();
Servers
-
+
@@ -106,7 +124,7 @@ rpc_pop_lists();
-
+
@@ -123,12 +141,12 @@ rpc_pop_lists();
Server Bans
-
+
-
+
@@ -150,7 +168,7 @@ rpc_pop_lists();
-
+
@@ -168,16 +186,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";
+ ?>
+
@@ -194,11 +221,43 @@ rpc_pop_lists();
Services Online
-
+
-
\ No newline at end of file
+
+
+