X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/ffd01497e696241bc48fccdcf09538c0fb2bc406..39330628e8c0719660d6adaf6171b855f69513e7:/index.php diff --git a/index.php b/index.php index b70bd38..6ac2254 100644 --- a/index.php +++ b/index.php @@ -1,407 +1,376 @@ - -UnrealIRCd Panel - - - -
-

UnrealIRCd Administration Panel

- -
- Overview - Users - Channels - Server Bans - Spamfilter - News -
set_method("user.get"); - $rpc->set_params(["nick" => "$user"]); - $rpc->execute(); - $nick = ($rpc->result) ? $rpc->fetch_assoc() : NULL; - if (!$nick) - { - Message::Fail("Could not find that user. Maybe they disconnected after you clicked this?"); - return; - } +require_once "inc/header.php"; - $msg_msg = ($duration == "0" || $duration == "0w0d0h") ? "permanently" : "for ".rpc_convert_duration_string($duration); - $reason = (isset($_POST['ban_reason'])) ? $_POST['ban_reason'] : "No reason"; - if (rpc_tkl_add($user, $bantype, $duration, $reason)) - { - $c = $nick['result']['client']; - Message::Success($c['name'] . " (*@".$c['hostname'].") has been $bantype" . "d $msg_msg: $reason"); - } - } - } - - if (!empty($_POST['tklch'])) - foreach ($_POST as $key => $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - if (rpc_tkl_del(base64_decode($tok[0]), base64_decode($tok[1]))) - Message::Success(base64_decode($tok[1])." has been removed for ".base64_decode($tok[0])); - } - } +?> +
+

Network Overview

+ LIVE + +
+ $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])); - } - } +/* 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); +$current_user = unreal_get_current_user(); +if (isset($current_user->user_meta['hibp'])) +{ + $num = $current_user->user_meta['hibp']; + Message::Fail("
Urgent
","Your password was found in a data breach $num time(s).", + "Please update your password immediately"); } - -rpc_pop_lists(); ?> + +
- /* Some basic filtering for HOST */ - if (isset($_POST['uf_host']) && strlen($_POST['uf_host']) && - strpos(strtolower($user['hostname']), strtolower($_POST['uf_host'])) !== 0 && - strpos(strtolower($user['hostname']), strtolower($_POST['uf_host'])) == false) - continue; +
+ + + + +
+
+
- /* Some basic filtering for IP */ - if (isset($_POST['uf_ip']) && strlen($_POST['uf_ip']) && - strpos(strtolower($user['ip']), strtolower($_POST['uf_ip'])) !== 0 && - strpos(strtolower($user['ip']), strtolower($_POST['uf_ip'])) == false) - continue; +
+ + + + +
+
- /* Some basic filtering for ACCOUNT */ - if (isset($_POST['uf_account']) && strlen($_POST['uf_account']) && - strpos(strtolower($user['user']['account']), strtolower($_POST['uf_account'])) !== 0 && - strpos(strtolower($user['user']['account']), strtolower($_POST['uf_account'])) == false) - continue; + +
+
+ + +
+
+ -
- - -
- - +Hook::run(HOOKTYPE_OVERVIEW_CARD, $stats); + +require_once "inc/footer.php";