X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/3f431b7a3666a818f0895e14049b1d25aa8df924..180b8ec1d4d2b3d4e930f57b9850348159510b27:/index.php diff --git a/index.php b/index.php index 98ef1da..61fef15 100644 --- a/index.php +++ b/index.php @@ -1,25 +1,39 @@ query("stats.get", []); ?>

Network Overview

-
+ -
+/* 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; + + +?> +
+ +
+
- + + user->record; ?> +
-

+

user->total; ?>

@@ -32,8 +46,10 @@ rpc_pop_lists();
+ +
-
+
@@ -41,7 +57,7 @@ rpc_pop_lists();
-

+

channel->total; ?>

@@ -55,7 +71,7 @@ rpc_pop_lists();
-
+
@@ -63,7 +79,7 @@ rpc_pop_lists();
-

+

user->oper; ?>

@@ -72,14 +88,13 @@ rpc_pop_lists();
Opers
- - +
-
+
@@ -87,7 +102,7 @@ rpc_pop_lists();
-

+

server->total; ?>

@@ -96,7 +111,7 @@ rpc_pop_lists();
Servers
- +
@@ -106,7 +121,7 @@ rpc_pop_lists();
-
+
@@ -114,7 +129,7 @@ rpc_pop_lists();
-

+

server_ban->server_ban; ?>

@@ -123,12 +138,12 @@ rpc_pop_lists();
Server Bans
- +
-
+
@@ -136,7 +151,7 @@ rpc_pop_lists();
-

+

server_ban->spamfilter; ?>

@@ -150,7 +165,7 @@ rpc_pop_lists();
-
+
@@ -158,7 +173,7 @@ rpc_pop_lists();
-

+

server_ban->server_ban_exception; ?>

@@ -168,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"; + ?> +
@@ -185,7 +209,7 @@ rpc_pop_lists();
-

+

user->ulined; ?>/server->ulined; ?>

@@ -194,11 +218,17 @@ rpc_pop_lists();
Services Online
- +
- \ No newline at end of file + + +