3 function generate_html_whois($user)
7 $notes = Notes
::find(["nick" => $user->name
, "ip" => $user->ip
, "account" => $user->account
?? NULL]);
9 "ip" => isset($notes['ip']['notes']) ? count($notes["ip"]['notes']) : 0,
10 "nick" => isset($notes['ip']['notes']) ? count($notes["nick"]['notes'] ?? []) : 0,
11 "account" => isset($notes['ip']['notes']) ? count($notes['account']['notes'] ?? []) : 0,
13 $cc = (isset($user->geoip
->country_code
)) ? strtolower($user->geoip
->country_code
) : "";
15 $asn = $user->geoip
->asn
?? "none";
16 $asname = $user->geoip
->asname
?? "none";
17 Message
::Fail(var_export($user->geoip
, true));
21 <table
class="table-sm table-responsive caption-top table-hover">
22 <span
class="badge rounded-pill"
23 style
="position: absolute;
26 background-color:lightgrey;
28 >Reputation
<span
class="badge badge-danger" style
="font-size:small;"><?php
echo $user->user
->reputation
; ?></span
>
33 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->name
); ?></code
></td
>
34 <td colspan
="2"><button id
="nicknotes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['nick']?></div
></button
></td
>
36 <th
>User
ID (UID
)</th
>
37 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->id
); ?></code
></td
>
40 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->hostname
); ?></code
></td
>
44 <code
><?php
echo htmlspecialchars($user->ip
); ?></code
>
48 ?> <img src
="https://flagcdn.com/48x36/<?php echo htmlspecialchars($cc); ?>.png"
52 <a href
="<?php echo htmlspecialchars(get_config("base_url
")."tools
/ip
-whois
.php
?ip
=$user->ip
"); ?>"><button
class="btn-sm btn-primary">WHOIS IP
</button
></a
>
54 <td
><button id
="ipnotes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['ip']?></button
></td
>
57 <td colspan
="2"><code
><?php
echo "$asname ($asn)"; ?></code
></td
>
60 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->username
); ?></code
></td
>
62 <th
>GECOS
/ Real Name
</th
>
63 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->realname
); ?></code
></td
>
66 <td colspan
="2"><code
><?php
echo (isset($user->user
->vhost
)) ? htmlspecialchars($user->user
->vhost
) : ""; ?></code
></td
>
69 <?php
$serverlkup = $rpc->server()->get($user->user
->servername
); ?>
71 <td colspan
="2"><a href
="<?php echo get_config("base_url
")."servers
/details
.php
?server
=$serverlkup->id
"; ?>"><code
><?php
echo htmlspecialchars($user->user
->servername
); ?></code
></td
>
76 <td colspan
="2"><code
><?php
echo (isset($user->user
->account
)) ? "<a href=\"".get_config("base_url")."users/?account=".htmlspecialchars($user->user
->account
)."\">".htmlspecialchars($user->user
->account
)."</a>" : ""; ?></code
></td
>
77 <td
><button id
="account_notes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['account']?></button
></td
>
80 <th style
="background-color: blanchedalmond;border-radius:5px";>Security Groups
</th
>
81 <td colspan
="2"><code
><?php
82 echo "<table style=\"margin-left:-15px;
85 background-color: blanchedalmond\"><tr>";
86 foreach($user->user
->{"security-groups"} as $sg)
88 echo "<th><div class=\"badge badge-secondary rounded-pill\">$sg</th></tr><tr>";
90 echo "</tr></table>"; ?>
101 function generate_html_usersettings($user)
105 <table
class="table-sm table-responsive caption-top table-hover">
108 for ($i=0; ($mode = (isset($user->user
->modes
[$i])) ? $user->user
->modes
[$i] : NULL); $i++
)
117 <table
class="table-sm table-responsive caption-top table-hover">
121 $operlogin = (isset($user->user
->operlogin
)) ? $user->user
->operlogin
: "";
122 echo htmlspecialchars($operlogin);
127 <td
><?php
echo (isset($user->user
->operclass
)) ? "<span class=\"rounded-pill badge badge-info\">".htmlspecialchars($user->user
->operclass
)."</span>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
134 elseif ($mode == "S")
140 This user is a Services Bot
.
145 elseif ($mode == "d")
150 <td
>User is ignoring channel messages
.</td
>
154 elseif ($mode == "i")
159 <td
>Not shown in
/WHO searches
.</td
>
163 elseif ($mode == "p")
167 <th
>Private channels
</th
>
168 <td
>Channels hidden in
/WHOIS outputs
.</td
>
172 elseif ($mode == "r")
176 <th
>Registered Nick
</th
>
177 <td
>This user is using a registered nick
.</td
>
181 elseif ($mode == "s")
185 <th
>Server Notices
</th
>
186 <td
>This user is receiving server notices
.</td
>
190 elseif ($mode == "t")
194 <th
>Virtual Host
</th
>
195 <td
>Using a custom hostmask
</td
>
199 elseif ($mode == "w")
204 <td
>Listening to
<code
>/WALLOPS
</code
> notices from IRC Operators
.</td
>
208 elseif ($mode == "x")
213 <td
>Using a
hostmask (hiding their IP from non
-IRCops
).</td
>
217 elseif ($mode == "z")
223 <table
class="table-sm table-responsive caption-top table-hover">
227 $cipher = (isset($user->tls
->cipher
)) ? $user->tls
->cipher
: "";
228 echo htmlspecialchars($cipher);
232 <td
>Cert Fingerprint
</td
>
233 <td
><?php
echo (isset($user->tls
->certfp
)) ? "<code>".htmlspecialchars($user->tls
->certfp
)."</code>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
240 elseif ($mode == "B")
246 User is marked
as a Bot
.
251 elseif ($mode == "D")
257 User is rejecting incoming
private messages
.
262 elseif ($mode == "G")
268 User is filtering Bad Words
.
273 elseif ($mode == "H")
279 User is hiding their IRCop status
.
284 elseif ($mode == "I")
290 User is hiding their idle time
.
295 elseif ($mode == "R")
299 <th
>RegOnly Messages
</th
>
301 User is only accepting
private messages from registered users
.
306 elseif ($mode == "T")
312 Denying CTCP requests
.
317 elseif ($mode == "W")
323 User is receiving notifications when someone does a
<code
>/WHOIS
</code
> on them
.
328 elseif ($mode == "Z")
332 <th
>Deny Insecure Messages
</th
>
334 User is only accepting messages from users using a secure connection
.
350 function generate_html_userchannels($user)
354 <table
class="table-sm table-responsive caption-top table-hover table-striped">
355 <thead
class="table-info">
365 foreach($user->user
->channels
as $chan)
369 <td
><?php
echo "<a href=\"".get_config("base_url")."channels/details.php?chan=".urlencode($chan->name
)."\">$chan->name</a>"; ?></td
>
373 for ($i = 0; isset($chan->level
[$i]); $i++
)
375 ?><div
class="text-nowrap row mb-1"><?php
376 if ($chan->level
[$i] == "v")
378 ?><span
class="rounded-pill badge badge-info" value
="Voice">Voice
</span
><?php
380 if ($chan->level
[$i] == "h")
382 ?><span
class="rounded-pill badge badge-info">Half
-Op
</span
><?php
384 if ($chan->level
[$i] == "o")
386 ?><h6
><span
class="rounded-pill badge badge-info">Operator
</span
></h6
><?php
388 if ($chan->level
[$i] == "a")
390 ?><span
class="rounded-pill badge badge-info">Admin
</span
><?php
392 if ($chan->level
[$i] == "q")
394 ?><span
class="rounded-pill badge badge-info">Owner
</span
><?php
396 if ($chan->level
[$i] == "Y")
398 ?><span
class="rounded-pill badge badge-info">OJOIN
</span
><?php