X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/10102cdc790926b5ec491db718572c0f44b2aeab..4b48b46f55bb6a03a29d0d0db04b3076c1eaae8f:/index.php diff --git a/index.php b/index.php index db5474b..175d4ea 100644 --- a/index.php +++ b/index.php @@ -1,16 +1,38 @@ query("stats.get", []); +$stats = $rpc->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); + +?> + +
+ +
+
@@ -20,7 +42,7 @@ $stats = $rpc->query("stats.get", []);
-

user->total - $stats->user->ulined; ?>

+

user->total; ?>

@@ -29,14 +51,14 @@ $stats = $rpc->query("stats.get", []);
Users Online
- +
-
+
@@ -44,7 +66,7 @@ $stats = $rpc->query("stats.get", []);
-

channel->total; ?>

+

channel->total; ?>

@@ -53,12 +75,12 @@ $stats = $rpc->query("stats.get", []);
Channels
- +
-
+
@@ -66,7 +88,7 @@ $stats = $rpc->query("stats.get", []);
-

user->oper - $stats->user->ulined; ?>

+

user->oper; ?>

@@ -75,14 +97,13 @@ $stats = $rpc->query("stats.get", []);
Opers
- - +
-
+
@@ -90,7 +111,7 @@ $stats = $rpc->query("stats.get", []);
-

server->total; ?>

+

server->total; ?>

@@ -99,17 +120,17 @@ $stats = $rpc->query("stats.get", []);
Servers
- +
-
+
-
+
@@ -117,7 +138,7 @@ $stats = $rpc->query("stats.get", []);
-

server_ban->server_ban; ?>

+

server_ban->server_ban; ?>

@@ -126,12 +147,12 @@ $stats = $rpc->query("stats.get", []);
Server Bans
- +
-
+
@@ -139,7 +160,7 @@ $stats = $rpc->query("stats.get", []);
-

server_ban->spamfilter; ?>

+

server_ban->spamfilter; ?>

@@ -148,12 +169,12 @@ $stats = $rpc->query("stats.get", []);
Spamfilter
- +
-
+
@@ -161,7 +182,7 @@ $stats = $rpc->query("stats.get", []);
-

server_ban->server_ban_exception; ?>

+

server_ban->server_ban_exception; ?>

@@ -171,7 +192,7 @@ $stats = $rpc->query("stats.get", []);
Server Ban Exceptions
- +
@@ -179,17 +200,12 @@ $stats = $rpc->query("stats.get", []); 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"; + $tooltip = "Users / Servers"; } else $bg = "bg-warning"; ?> -
+
@@ -197,7 +213,8 @@ $stats = $rpc->query("stats.get", []);
-

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

+ +

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

@@ -206,7 +223,7 @@ $stats = $rpc->query("stats.get", []);
Services Online
- +
@@ -215,6 +232,86 @@ $stats = $rpc->query("stats.get", []); + + + +
+ +
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Accounts
+
+ +
+
+
+
+
+