X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/4cba23263a53a67d8d15f9555ac2b5e369e94244..3fe262343810f4e0b0252b7607cc532383c2351b:/index.php diff --git a/index.php b/index.php index ef7c0d6..115a025 100644 --- a/index.php +++ b/index.php @@ -1,721 +1,335 @@ - -UnrealIRCd Panel - - - -
-

UnrealIRCd Administration Panel

- -
- Overview - Users - Channels - Server Bans - Spamfilter - News -
+
+

Network Overview

+ +
+ $value) - { - if (substr($key, 0, 7) == "target_") - $targets[] = str_replace(["target_", "_"], ["", "-"], $key); - } - if (empty($targets)) - Message::Fail("No target was specified"); +/* What if someone wants to add their own stats... */ +Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $array_of_stats); - if (!isset($_POST['sf_bantype'])) - Message::Fail("No action was chosen"); +/* 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; - else - { +$userlist = []; +Hook::run(HOOKTYPE_GET_USER_LIST, $userlist); +$num_of_panel_admins = count($userlist); - $bantype = $_POST['sf_bantype']; - $targ_chars = ""; - foreach($targets as $targ) - { - switch ($targ) { - case "channel": - $targ_chars .= "c"; - break; - case "private": - $targ_chars .= "p"; - break; - case "channel-notice": - $targ_chars .= "N"; - break; - case "private-notice": - $targ_chars .= "n"; - break; - case "part": - $targ_chars .= "P"; - break; - case "quit": - $targ_chars .= "q"; - break; - case "dcc": - $targ_chars .= "d"; - break; - case "away": - $targ_chars .= "a"; - break; - case "topic": - $targ_chars .= "t"; - break; - case "messagetag": - $targ_chars .= "T"; - break; - case "user": - $targ_chars .= "u"; - break; - } - } - /* duplicate code for now [= */ - $banlen_w = (isset($_POST['banlen_w'])) ? $_POST['banlen_w'] : NULL; - $banlen_d = (isset($_POST['banlen_d'])) ? $_POST['banlen_d'] : NULL; - $banlen_h = (isset($_POST['banlen_h'])) ? $_POST['banlen_h'] : NULL; - $duration = ""; - if (!$banlen_d && !$banlen_h && !$banlen_w) - $duration .= "0"; +?> + +
+ +
+
+
+
+
+
+ + + +
+
+

+
+
+
+
+
+
+
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"); - } - } +
+
+
+
+
+
+ +
+
+

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

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

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

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

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

+
+
+
+ +
+
+
+
Server Ban Exceptions
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+ +

+
+
+
+
+
+
+
Services Online
+
+ +
+
+ +
+
+
+
- else if (!($bantype = $_POST['bantype'])) // if it was a ban entry - { - } - else if (!($users = $_POST["userch"])) - { - /* check if this came from our Server Bans tab. */ - if (!($iphost = $_POST['tkl_add'])) - Message::Fail("No user was specified"); - else /* It did */ - { - if (( - $bantype == "gline" || - $bantype == "gzline" || - $bantype == "shun" || - $bantype == "eline" - ) && strpos($iphost, "@") == false) // doesn't have full mask - $iphost = "*@" . $iphost; + + +
+ +
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Accounts
+
+ +
+
+
+
+
+
+ -
- - -
- - +require_once "inc/footer.php";