X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/f829edfbeb390a25d1bf64b57c3f0307cf531066..4b48b46f55bb6a03a29d0d0db04b3076c1eaae8f:/index.php diff --git a/index.php b/index.php index 0b16f28..175d4ea 100644 --- a/index.php +++ b/index.php @@ -1,404 +1,317 @@ - -UnrealIRCd Panel - - - -
-

UnrealIRCd Administration Panel

- -
- Overview - Users - Channels - Server Bans - Spamfilter - News -
stats()->get(); +?> - $duration = ""; - if (!$banlen_d && !$banlen_h && !$banlen_w) - $duration .= "0"; - - else - { - if ($banlen_w) - $duration .= $banlen_w; - if ($banlen_d) - $duration .= $banlen_d; - if ($banlen_h) - $duration .= $banlen_h; - } +

Network Overview

- $rpc = new RPC(); - $rpc->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; - } + $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])); - } - } +/* 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; - if (!empty($_POST['sf'])) - foreach ($_POST as $key => $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])); - } - } -} +$userlist = []; +Hook::run(HOOKTYPE_GET_USER_LIST, $userlist); +$num_of_panel_admins = count($userlist); -rpc_pop_lists(); ?> + +
-
-
- - - - - - - - - -
Chat Overview
Users
Opers
Services
Most popular channel ( users)
Channels
Server bans
Spamfilter entries
- -
-
- - - - - - - -
Filter by: -
- Nick: - -
-
-
- Hostname: - -
-
-
- IP: - -
-
-
- Account: - -
-
- +
+
+
+
+
+ + user->record; ?> + +
+
+

user->total; ?>

+
+
+
+
+
+
+
Users Online
+
+ +
+
+
+ - ?> - - - - - - - - - - - - - - +
+
+
+
+
+ +
+
+

channel->total; ?>

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

user->oper; ?>

+
+
+
+
+
+
+
Opers
+
+ +
+
+
+
- /* Some basic filtering for NICK */ - if (isset($_POST['uf_nick']) && strlen($_POST['uf_nick']) && - strpos(strtolower($user['name']), strtolower($_POST['uf_nick'])) !== 0 && - strpos(strtolower($user['name']), strtolower($_POST['uf_nick'])) == false) - continue; +
+
+
+
+
+ +
+
+

server->total; ?>

+
+
+
+
+
+
+
Servers
+
+ +
+
+
+
+ + +
- /* 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; +
+
+
+
+
+
+ +
+
+

server_ban->server_ban; ?>

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

server_ban->spamfilter; ?>

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

server_ban->server_ban_exception; ?>

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

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

+
+
+
+
+
+
+
Services Online
+
+ +
+
+ +
+
+
+
- /* 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; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - $account = (isset($user['user']['account'])) ? ''.$user['user']['account'].'' : 'No 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'])) ? "Secure" : "Insecure"; - echo ""; - echo ""; - echo ""; + + +
+
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Accounts
+
+ +
+
+
+
+
+
+ -
- - -
- - +require_once "footer.php";
Select allNickUIDHost / IPAccountUsermodesℹ️OperSecureConnected toReputation ℹ️
".$user['name']."".$user['id']."".$user['hostname']." (".$user['ip'].")".$account."".$modes." ".$oper."".$secure."".$user['user']['servername']."".$user['user']['reputation']."