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) : 0,
16 <table
class="table-sm table-responsive caption-top table-hover">
17 <span
class="badge rounded-pill"
18 style
="position: absolute;
21 background-color:lightgrey;
23 >Reputation
<span
class="badge badge-danger" style
="font-size:small;"><?php
echo $user->user
->reputation
; ?></span
>
28 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->name
); ?></code
></td
>
29 <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
>
31 <th
>User
ID (UID
)</th
>
32 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->id
); ?></code
></td
>
35 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->hostname
); ?></code
></td
>
38 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->ip
); ?></code
>
40 if ($cc = (isset($user->geoip
->country_code
)) ? strtolower($user->geoip
->country_code
) : "")
42 ?> <img src
="https://flagcdn.com/48x36/<?php echo htmlspecialchars($cc); ?>.png"
46 <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
>
48 <td
><button id
="ipnotes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['ip']?></button
></td
>
51 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->username
); ?></code
></td
>
53 <th
>GECOS
/ Real Name
</th
>
54 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->realname
); ?></code
></td
>
57 <td colspan
="2"><code
><?php
echo (isset($user->user
->vhost
)) ? htmlspecialchars($user->user
->vhost
) : ""; ?></code
></td
>
60 <?php
$serverlkup = $rpc->server()->get($user->user
->servername
); ?>
62 <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
>
67 <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
>
68 <td
><button id
="account_notes" class="btn btn-sm btn-secondary fa-solid fa-sticky-note text-nowrap"> <?php
echo $numnotes['account']?></button
></td
>
71 <th style
="background-color: blanchedalmond;border-radius:5px";>Security Groups
</th
>
72 <td colspan
="2"><code
><?php
73 echo "<table style=\"margin-left:-15px;
76 background-color: blanchedalmond\"><tr>";
77 foreach($user->user
->{"security-groups"} as $sg)
79 echo "<th><div class=\"badge badge-secondary rounded-pill\">$sg</th></tr><tr>";
81 echo "</tr></table>"; ?>
92 function generate_html_usersettings($user)
96 <table
class="table-sm table-responsive caption-top table-hover">
99 for ($i=0; ($mode = (isset($user->user
->modes
[$i])) ? $user->user
->modes
[$i] : NULL); $i++
)
108 <table
class="table-sm table-responsive caption-top table-hover">
112 $operlogin = (isset($user->user
->operlogin
)) ? $user->user
->operlogin
: "";
113 echo htmlspecialchars($operlogin);
118 <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
>
125 elseif ($mode == "S")
131 This user is a Services Bot
.
136 elseif ($mode == "d")
141 <td
>User is ignoring channel messages
.</td
>
145 elseif ($mode == "i")
150 <td
>Not shown in
/WHO searches
.</td
>
154 elseif ($mode == "p")
158 <th
>Private channels
</th
>
159 <td
>Channels hidden in
/WHOIS outputs
.</td
>
163 elseif ($mode == "r")
167 <th
>Registered Nick
</th
>
168 <td
>This user is using a registered nick
.</td
>
172 elseif ($mode == "s")
176 <th
>Server Notices
</th
>
177 <td
>This user is receiving server notices
.</td
>
181 elseif ($mode == "t")
185 <th
>Virtual Host
</th
>
186 <td
>Using a custom hostmask
</td
>
190 elseif ($mode == "w")
195 <td
>Listening to
<code
>/WALLOPS
</code
> notices from IRC Operators
.</td
>
199 elseif ($mode == "x")
204 <td
>Using a
hostmask (hiding their IP from non
-IRCops
).</td
>
208 elseif ($mode == "z")
214 <table
class="table-sm table-responsive caption-top table-hover">
218 $cipher = (isset($user->tls
->cipher
)) ? $user->tls
->cipher
: "";
219 echo htmlspecialchars($cipher);
223 <td
>Cert Fingerprint
</td
>
224 <td
><?php
echo (isset($user->tls
->certfp
)) ? "<code>".htmlspecialchars($user->tls
->certfp
)."</code>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
231 elseif ($mode == "B")
237 User is marked
as a Bot
.
242 elseif ($mode == "D")
248 User is rejecting incoming
private messages
.
253 elseif ($mode == "G")
259 User is filtering Bad Words
.
264 elseif ($mode == "H")
270 User is hiding their IRCop status
.
275 elseif ($mode == "I")
281 User is hiding their idle time
.
286 elseif ($mode == "R")
290 <th
>RegOnly Messages
</th
>
292 User is only accepting
private messages from registered users
.
297 elseif ($mode == "T")
303 Denying CTCP requests
.
308 elseif ($mode == "W")
314 User is receiving notifications when someone does a
<code
>/WHOIS
</code
> on them
.
319 elseif ($mode == "Z")
323 <th
>Deny Insecure Messages
</th
>
325 User is only accepting messages from users using a secure connection
.
341 function generate_html_userchannels($user)
345 <table
class="table-sm table-responsive caption-top table-hover table-striped">
346 <thead
class="table-info">
356 foreach($user->user
->channels
as $chan)
360 <td
><?php
echo "<a href=\"".get_config("base_url")."channels/details.php?chan=".urlencode($chan->name
)."\">$chan->name</a>"; ?></td
>
364 for ($i = 0; isset($chan->level
[$i]); $i++
)
366 ?><div
class="text-nowrap row mb-1"><?php
367 if ($chan->level
[$i] == "v")
369 ?><span
class="rounded-pill badge badge-info" value
="Voice">Voice
</span
><?php
371 if ($chan->level
[$i] == "h")
373 ?><span
class="rounded-pill badge badge-info">Half
-Op
</span
><?php
375 if ($chan->level
[$i] == "o")
377 ?><h6
><span
class="rounded-pill badge badge-info">Operator
</span
></h6
><?php
379 if ($chan->level
[$i] == "a")
381 ?><span
class="rounded-pill badge badge-info">Admin
</span
><?php
383 if ($chan->level
[$i] == "q")
385 ?><span
class="rounded-pill badge badge-info">Owner
</span
><?php
387 if ($chan->level
[$i] == "Y")
389 ?><span
class="rounded-pill badge badge-info">OJOIN
</span
><?php