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";
20 <table
class="table-sm table-responsive caption-top table-hover">
21 <span
class="badge rounded-pill"
22 style
="position: absolute;
25 background-color:lightgrey;
27 >Reputation
<span
class="badge badge-danger" style
="font-size:small;"><?php
echo $user->user
->reputation
; ?></span
>
32 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->name
); ?></code
></td
>
33 <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
>
35 <th
>User
ID (UID
)</th
>
36 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->id
); ?></code
></td
>
39 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->hostname
); ?></code
></td
>
43 <code
><?php
echo htmlspecialchars($user->ip
); ?></code
>
47 ?> <img src
="https://flagcdn.com/48x36/<?php echo htmlspecialchars($cc); ?>.png"
51 <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
>
53 <td
><button id
="ipnotes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['ip']?></button
></td
>
56 <td colspan
="2"><code
><?php
echo "$asname ($asn)"; ?></code
></td
>
59 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->username
); ?></code
></td
>
61 <th
>GECOS
/ Real Name
</th
>
62 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->realname
); ?></code
></td
>
65 <td colspan
="2"><code
><?php
echo (isset($user->user
->vhost
)) ? htmlspecialchars($user->user
->vhost
) : ""; ?></code
></td
>
68 <?php
$serverlkup = $rpc->server()->get($user->user
->servername
); ?>
70 <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
>
75 <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
>
76 <td
><button id
="account_notes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['account']?></button
></td
>
79 <th style
="background-color: blanchedalmond;border-radius:5px";>Security Groups
</th
>
80 <td colspan
="2"><code
><?php
81 echo "<table style=\"margin-left:-15px;
84 background-color: blanchedalmond\"><tr>";
85 foreach($user->user
->{"security-groups"} as $sg)
87 echo "<th><div class=\"badge badge-secondary rounded-pill\">$sg</th></tr><tr>";
89 echo "</tr></table>"; ?>
100 function generate_html_usersettings($user)
104 <table
class="table-sm table-responsive caption-top table-hover">
107 for ($i=0; ($mode = (isset($user->user
->modes
[$i])) ? $user->user
->modes
[$i] : NULL); $i++
)
116 <table
class="table-sm table-responsive caption-top table-hover">
120 $operlogin = (isset($user->user
->operlogin
)) ? $user->user
->operlogin
: "";
121 echo htmlspecialchars($operlogin);
126 <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
>
133 elseif ($mode == "S")
139 This user is a Services Bot
.
144 elseif ($mode == "d")
149 <td
>User is ignoring channel messages
.</td
>
153 elseif ($mode == "i")
158 <td
>Not shown in
/WHO searches
.</td
>
162 elseif ($mode == "p")
166 <th
>Private channels
</th
>
167 <td
>Channels hidden in
/WHOIS outputs
.</td
>
171 elseif ($mode == "r")
175 <th
>Registered Nick
</th
>
176 <td
>This user is using a registered nick
.</td
>
180 elseif ($mode == "s")
184 <th
>Server Notices
</th
>
185 <td
>This user is receiving server notices
.</td
>
189 elseif ($mode == "t")
193 <th
>Virtual Host
</th
>
194 <td
>Using a custom hostmask
</td
>
198 elseif ($mode == "w")
203 <td
>Listening to
<code
>/WALLOPS
</code
> notices from IRC Operators
.</td
>
207 elseif ($mode == "x")
212 <td
>Using a
hostmask (hiding their IP from non
-IRCops
).</td
>
216 elseif ($mode == "z")
222 <table
class="table-sm table-responsive caption-top table-hover">
226 $cipher = (isset($user->tls
->cipher
)) ? $user->tls
->cipher
: "";
227 echo htmlspecialchars($cipher);
231 <td
>Cert Fingerprint
</td
>
232 <td
><?php
echo (isset($user->tls
->certfp
)) ? "<code>".htmlspecialchars($user->tls
->certfp
)."</code>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
239 elseif ($mode == "B")
245 User is marked
as a Bot
.
250 elseif ($mode == "D")
256 User is rejecting incoming
private messages
.
261 elseif ($mode == "G")
267 User is filtering Bad Words
.
272 elseif ($mode == "H")
278 User is hiding their IRCop status
.
283 elseif ($mode == "I")
289 User is hiding their idle time
.
294 elseif ($mode == "R")
298 <th
>RegOnly Messages
</th
>
300 User is only accepting
private messages from registered users
.
305 elseif ($mode == "T")
311 Denying CTCP requests
.
316 elseif ($mode == "W")
322 User is receiving notifications when someone does a
<code
>/WHOIS
</code
> on them
.
327 elseif ($mode == "Z")
331 <th
>Deny Insecure Messages
</th
>
333 User is only accepting messages from users using a secure connection
.
349 function generate_html_userchannels($user)
353 <table
class="table-sm table-responsive caption-top table-hover table-striped">
354 <thead
class="table-info">
364 foreach($user->user
->channels
as $chan)
368 <td
><?php
echo "<a href=\"".get_config("base_url")."channels/details.php?chan=".urlencode($chan->name
)."\">$chan->name</a>"; ?></td
>
372 for ($i = 0; isset($chan->level
[$i]); $i++
)
374 ?><div
class="text-nowrap row mb-1"><?php
375 if ($chan->level
[$i] == "v")
377 ?><span
class="rounded-pill badge badge-info" value
="Voice">Voice
</span
><?php
379 if ($chan->level
[$i] == "h")
381 ?><span
class="rounded-pill badge badge-info">Half
-Op
</span
><?php
383 if ($chan->level
[$i] == "o")
385 ?><h6
><span
class="rounded-pill badge badge-info">Operator
</span
></h6
><?php
387 if ($chan->level
[$i] == "a")
389 ?><span
class="rounded-pill badge badge-info">Admin
</span
><?php
391 if ($chan->level
[$i] == "q")
393 ?><span
class="rounded-pill badge badge-info">Owner
</span
><?php
395 if ($chan->level
[$i] == "Y")
397 ?><span
class="rounded-pill badge badge-info">OJOIN
</span
><?php