X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/4a759bb617538d4c16c54cdc2b83f8ebab2560c7..bdf7619aefc98b662efbf7336ea2118044db141e:/index.php diff --git a/index.php b/index.php index 21a5fe2..511bd46 100644 --- a/index.php +++ b/index.php @@ -2,11 +2,26 @@ require_once "common.php"; require_once "header.php"; -rpc_pop_lists(); +$stats = $rpc->query("stats.get", []); +var_dump($stats); ?>

Network Overview

+ +
@@ -15,10 +30,12 @@ rpc_pop_lists();
- + + user->record; ?> +
-

+

user->total; ?>

@@ -31,6 +48,8 @@ rpc_pop_lists();
+ +
@@ -40,7 +59,7 @@ rpc_pop_lists();
-

+

channel->total; ?>

@@ -62,7 +81,7 @@ rpc_pop_lists();
-

+

user->oper; ?>

@@ -71,8 +90,7 @@ rpc_pop_lists();
Opers
- -
View
+
">View
@@ -86,7 +104,7 @@ rpc_pop_lists();
-

+

server->total; ?>

@@ -113,7 +131,7 @@ rpc_pop_lists();
-

+

server_ban->server_ban; ?>

@@ -135,7 +153,7 @@ rpc_pop_lists();
-

+

server_ban->spamfilter; ?>

@@ -157,7 +175,7 @@ rpc_pop_lists();
-

+

server_ban->server_ban_exception; ?>

@@ -173,9 +191,18 @@ 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"; + ?>
@@ -184,7 +211,7 @@ rpc_pop_lists();
-

+

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

@@ -204,4 +231,6 @@ rpc_pop_lists();