X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/4cba23263a53a67d8d15f9555ac2b5e369e94244..fd4848e4bc329f633c8faf725f9d4faef27ca54c:/index.php diff --git a/index.php b/index.php index ef7c0d6..397cf17 100644 --- a/index.php +++ b/index.php @@ -1,721 +1,292 @@ - -UnrealIRCd Panel - - - -
-

UnrealIRCd Administration Panel

- -
- Overview - Users - Channels - Server Bans - Spamfilter - News -
stats()->get(); +?> -if (!empty($_POST)) { +

Network Overview

- if ($sf = $_POST['sf_add']) // if it was a spamfilter entry - { - /* get targets */ - $targets = []; // empty arrae - foreach($_POST as $key => $value) - { - if (substr($key, 0, 7) == "target_") - $targets[] = str_replace(["target_", "_"], ["", "-"], $key); - } - if (empty($targets)) - Message::Fail("No target was specified"); + +
+ +
+
+
+
+
+
+ + user->record; ?> + +
+
+

user->total; ?>

+
+
+
+
+
+
+
Users Online
+
+ +
+
+
- else - { - if ($banlen_w) - $duration .= $banlen_w; - if ($banlen_d) - $duration .= $banlen_d; - if ($banlen_h) - $duration .= $banlen_h; - } - $match_type = $_POST['matchtype']; // should default to 'simple' - $reason = isset($_POST['ban_reason']) ? $_POST['ban_reason'] : "No reason"; - $soft = (isset($_POST['soft'])) ? true : false; - if ($soft) - $targ_chars = "%" . $targ_chars; - if ($rpc->spamfilter()->add($sf, $match_type, $targ_chars, $bantype, $duration, $reason)) - Message::Success("Added spamfilter entry \"$sf\" [match type: $match_type] [targets: $targ_chars] [reason: $reason]"); - else - Message::Fail("Could not add spamfilter entry \"$sf\" [match type: $match_type] [targets: $targ_chars] [reason: $reason]: $rpc->error"); + +
+
+
+
+
+
+ +
+
+

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"; + $tooltip = "Users / Servers"; } + else + $bg = "bg-warning"; + ?> +
+
+
+
+
+ +
+
+ +

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

+
+
+
+
+
+
+
Services Online
+
+ +
+
+ +
+
+
+
- } - else if (!($bantype = $_POST['bantype'])) // if it was a ban entry - { - } - else if (!($users = $_POST["userch"])) + + +
+ +
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Access
+
+ +
+
+
+
+
+
+ $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - $ban = base64_decode($tok[0]); - $type = base64_decode($tok[1]); - if ($rpc->serverban()->delete($ban, $type)) - Message::Success("$type has been removed for $ban"); - else - Message::Fail("Unable to remove $type on $ban: $rpc->error"); - } - } - - if (!empty($_POST['sf'])) - foreach ($_POST as $key => $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - $name = base64_decode($tok[0]); - $match_type = base64_decode($tok[1]); - $spamfilter_targets = base64_decode($tok[2]); - $ban_action = base64_decode($tok[3]); - if ($rpc->spamfilter()->delete($name, $match_type, $spamfilter_targets, $ban_action)) - Message::Success("Spamfilter on $name has been removed"); - else - Message::Fail("Unable to remove spamfilter on $name: $rpc->error"); - } - } -} - -rpc_pop_lists(); -?> - -
-
- - - - - - - - - -
Chat Overview
Users
Opers
Services
Most popular channel ( users)
Channels
Server bans
Spamfilter entries
- -
-
- - - - - - - -
Filter by: -
- Nick: - -
-
-
- Hostname: - -
-
-
- IP: - -
-
-
- Account: - -
-
- - - - - - - - - - - - - - - name), strtolower($_POST['uf_nick'])) !== 0 && - strpos(strtolower($user->name), strtolower($_POST['uf_nick'])) == false) - continue; - - /* 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; - - echo ""; - echo ""; - $isBot = (strpos($user->user->modes, "B") !== false) ? ' Bot' : ""; - echo "'; - echo ""; - echo ""; - $account = (isset($user->user->account)) ? $user->user->account : 'None'; - echo ""; - $modes = (isset($user->user->modes)) ? "+" . $user->user->modes : ""; - echo ""; - $oper = (isset($user->user->operlogin)) ? $user->user->operlogin." ".$user->user->operclass."" : ""; - if (!strlen($oper)) - $oper = (strpos($user->user->modes, "S") !== false) ? 'Service' : ""; - echo ""; - $secure = (isset($user->tls)) ? "Secure" : "Insecure"; - echo ""; - echo ""; - echo ""; - } - ?>
Select allNickUIDHost / IPAccountUsermodesℹ️OperSecureConnected toReputation ℹ️
".$user->name.$isBot.'".$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."
- - -
-
-
- Add Server Ban -
-
- -
-
IP / Host:

-
Ban Type:

-
- - - -
-
- Don't affect logged-in users (soft) -
-
-
- - - - - - - - - - - - "; - 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."

- - -
-
-

-
- Add Spamfilter Entry -
-
- -
-
Entry:

-
MatchType:

-
Action:

- -
- Channel messages
-
Private messages
-
Channel notices
-
Private notices
-
Part reason
-
DCC Filename
-
Away messages
-
Channel topic
-
MessageTags
-
Userhost (nick!user@host:realname)
-
- - - -
-
- Don't affect logged-in users (soft) -
-
-
- - - - - - - - - - - - - - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - for ($i = 0, $targs = ""; $i < strlen($sf->spamfilter_targets); $i++) - { - $c = $sf->spamfilter_targets[$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 ""; - - } - ?>
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."

- - +Hook::run(HOOKTYPE_OVERVIEW_CARD, $stats); -
-
- - -
- - +require_once "footer.php";