X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/2697173721db10cd600539beed661a06bb9a3f2b..fd4848e4bc329f633c8faf725f9d4faef27ca54c:/index.php diff --git a/index.php b/index.php index 7b9bc7c..397cf17 100644 --- a/index.php +++ b/index.php @@ -1,299 +1,292 @@ - - - - -
-

UnrealIRCd Administration Panel


-
- -
- Overview - Users - Channels - Server Bans - Spamfilter - News -
stats()->get(); +?> - } else if (!($users = $_POST["userch"])) { - Message::Fail("No user was specified"); - } else { - foreach ($_POST["userch"] as $user) { - $user = base64_decode($user); - $bantype = $_POST["bantype"]; - rpc_tkl_add($user, $bantype, "2h", "You have been banned lol"); - Message::Success($user . " has been banned"); - } - } +

Network Overview

- if (!empty($_POST['tklch'])) - foreach ($_POST as $key => $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - rpc_tkl_del(base64_decode($tok[0]), base64_decode($tok[1])); - } - } + $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - rpc_sf_del(base64_decode($tok[0]), base64_decode($tok[1]), base64_decode($tok[2]), base64_decode($tok[3])); - } - } -} +/* 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); -rpc_pop_lists(); // populate our static lists (users, channels, tkl, spamfilter) ?> +
-
-
- - - - - - - - - -
Chat Overview
Users
Opers
Services
Most popular channel ( users)
Channels
Server bans
Spamfilter entries
-
-
-
-

- - - - - - - - - - - - - "; - echo ""; - 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 ""; - } - ?>
Select allNickUIDHost / IPAccountUsermodesOperSecureConnected toReputation ℹ️".$user['name']."".$user['id']."".$user['hostname']." (".$user['ip'].")".$account."".$modes."".$oper."".$secure."".$user['user']['servername']."".$user['user']['reputation']."
+
+
+
+
+
+
+ + user->record; ?> + +
+
+

user->total; ?>

+
+
+
+
+
+
+
Users Online
+
+ +
+
+
+ -
+
+
+
+
+
+
+ +
+
+

channel->total; ?>

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

user->oper; ?>

+
+
+
+
+
+
+
Opers
+
+ +
+
+
+
-
-
-

- - - - - - - - - "; - 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."
+
+
+
+
+
+ +
+
+

server->total; ?>

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

server_ban->server_ban; ?>

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

server_ban->spamfilter; ?>

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

server_ban->server_ban_exception; ?>

+
+
+
-
-
- - - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; +
+
+
+
Server Ban Exceptions
+
+ +
+
+ + + server->ulined) { + $bg = "bg-success"; + $tooltip = "Users / Servers"; } - ?>
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']."

- + else + $bg = "bg-warning"; + ?> +
+
+
+
+
+ +
+
+ +

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

+
+
+
+
+
+
+
Services Online
+
+ +
+
+ +
+
+
+
-
-
-

- - - - - - - - - - - - - - - - "; - echo ""; - 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 ""; - + +
+
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Access
+
+ +
+
+
+
+
+
+ -
- - -
- - +Hook::run(HOOKTYPE_OVERVIEW_CARD, $stats); - \ No newline at end of file +require_once "footer.php";
Select allMaskTypeSet 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']."