X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/76200e36b9dce259a825f751f5e33abab4be9a06..44c4413886a9c33daf3a7cd300f353547735ef30:/index.php diff --git a/index.php b/index.php index 044775f..173a84d 100644 --- a/index.php +++ b/index.php @@ -1,213 +1,234 @@ - - - -
-

UnrealIRCd Administration Panel


-
- -
- Overview - Users - Channels - Server Bans - Spamfilter -
$value) - { - foreach ($value as $tok) - { - $tok = explode(",",$tok); - rpc_tkl_del(base64_decode($tok[0]), base64_decode($tok[1])); - } - } +require_once "common.php"; +require_once "header.php"; -rpc_pop_lists(); // populate our static lists (users, channels, tkl, spamfilter) +$stats = $rpc->query("stats.get", []); ?> -
-
- - - - - - - - - -
Chat Overview
Users
Opers
Services
Most popular channel ( users)
Channels
Server bans
Spamfilter entries
- -
-
-

- - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - $account = (isset($user['user']['account'])) ? $user['user']['account'] : ""; - echo ""; - $modes = (isset($user['user']['modes'])) ? "+" . $user['user']['modes'] : ""; - echo ""; - $oper = (isset($user['user']['operlogin'])) ? $user['user']['operlogin']." (".$user['user']['operclass'].")" : ""; - echo ""; - $secure = (isset($user['tls'])) ? "✅" : "❌"; - echo ""; - echo ""; - echo ""; - } - ?>
NickUIDHost / IPAccountUsermodesOperSecureConnected toReputation ℹ️".$user['name']."".$user['id']."".$user['hostname']." (".$user['ip'].")".$account."".$modes."".$oper."".$secure."".$user['user']['servername']."".$user['user']['reputation']."
- -
-
-

- - - - - - - - - "; - echo ""; - echo ""; - echo ""; - $topic = (isset($channel['topic'])) ? $channel['topic'] : ""; - echo ""; - $setby = (isset($channel['topic'])) ? "By ".$channel['topic_set_by'] .", at ".$channel['topic_set_at'] : ""; - echo ""; - $modes = (isset($channel['modes'])) ? "+" . $channel['modes'] : ""; - echo ""; - } - ?>
NameCreatedUser countTopicTopic SetModes".$channel['name']."".$channel['creation_time']."".$channel['num_users']."".$topic."".$setby."".$modes."
- - -
-
- - - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - ?>
Select allMaskTypeSet BySet OnExpiresDurationReason".$tkl['name']."".$tkl['type_string']."".$tkl['set_by']."".$tkl['set_at_string']."".$tkl['expire_at_string']."".$tkl['duration_string']."".$tkl['reason']."

- - -
-
-

- - - - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - for ($i = 0, $targs = ""; ($c = $sf['spamfilter_targets'][$i]); $i++) - { - if ($c == "c") - $targs .= "Channel, "; - else if ($c == "p") - $targs .= "Private,"; - else if ($c == "n") - $targs .= "Notice, "; - else if ($c == "N") - $targs .= "Channel notice, "; - else if ($c == "P") - $targs .= "Part message, "; - else if ($c == "q") - $targs .= "Quit message, "; - else if ($c == "d") - $targs .= "DCC filename, "; - else if ($c == "a") - $targs .= "Away message, "; - else if ($c == "t") - $targs .= "Channel topic, "; - else if ($c == "T") - $targs .= "MessageTag, "; - else if ($c == "u") - $targs .= "Usermask, "; - - $targs = rtrim($targs,", "); - } - echo ""; - echo ""; +

Network Overview

+ + +
+ +
+
+
+
+
+
+ + user->record; ?> + +
+
+

user->total; ?>

+
+
+
+
+
+
+
Users Online
+
+ +
+
+
+ +
+
+
+
+
+
+ +
+
+

channel->total; ?>

+
+
+
+
+
+
+
Channels
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

user->oper; ?>

+
+
+
+
+
+
+
Opers
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+

server->total; ?>

+
+
+
+
+
+
+
Servers
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+

server_ban->server_ban; ?>

+
+
+
+
+
+
+
Server Bans
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

server_ban->spamfilter; ?>

+
+
+
+
+
+
+
Spamfilter
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

server_ban->server_ban_exception; ?>

+
+
+
+ +
+
+
+
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"; } - ?>
MaskTypeSet BySet OnExpiresDurationMatch TypeActionAction DurationTargetReason".$sf['name']."".$sf['type_string']."".$sf['set_by']."".$sf['set_at_string']."".$sf['expire_at_string']."".$sf['duration_string']."".$sf['match_type']."".$sf['ban_action']."".$sf['ban_duration_string']."".$targs."".$sf['reason']."
- - + else + $bg = "bg-warning"; + ?> +
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+
Services Online
+
+ +
+
+ +
+
+ + + +

Copyright 2022-2023 © UnrealIRCd

\ No newline at end of file +require_once "footer.php";