3 function generate_html_whois($user)
8 <table
class="table-sm table-responsive caption-top table-hover">
12 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->name
); ?></code
></td
>
14 <th
>User
ID (UID
)</th
>
15 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->id
); ?></code
></td
>
18 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->hostname
); ?></code
></td
>
21 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->ip
); ?></code
>
23 if ($cc = (isset($user->geoip
->country_code
)) ? strtolower($user->geoip
->country_code
) : "")
25 ?> <img src
="https://flagcdn.com/48x36/<?php echo htmlspecialchars($cc); ?>.png"
29 <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
>
33 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->username
); ?></code
></td
>
35 <th
>GECOS
/ Real Name
</th
>
36 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->realname
); ?></code
></td
>
39 <td colspan
="2"><code
><?php
echo (isset($user->user
->vhost
)) ? htmlspecialchars($user->user
->vhost
) : ""; ?></code
></td
>
42 <?php
$serverlkup = $rpc->server()->get($user->user
->servername
); ?>
44 <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
>
49 <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
>
52 <th style
="background-color: blanchedalmond;border-radius:5px";>Security Groups
</th
>
53 <td colspan
="2"><code
><?php
54 echo "<table style=\"margin-left:-15px;
57 background-color: blanchedalmond\"><tr>";
58 foreach($user->user
->{"security-groups"} as $sg)
60 echo "<th><div class=\"badge badge-secondary rounded-pill\">$sg</th></tr><tr>";
62 echo "</tr></table>"; ?>
73 function generate_html_usersettings($user)
77 <table
class="table-sm table-responsive caption-top table-hover">
80 for ($i=0; ($mode = (isset($user->user
->modes
[$i])) ? $user->user
->modes
[$i] : NULL); $i++
)
89 <table
class="table-sm table-responsive caption-top table-hover">
93 $operlogin = (isset($user->user
->operlogin
)) ? $user->user
->operlogin
: "";
94 echo htmlspecialchars($operlogin);
99 <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
>
106 elseif ($mode == "S")
112 This user is a Services Bot
.
117 elseif ($mode == "d")
122 <td
>User is ignoring channel messages
.</td
>
126 elseif ($mode == "i")
131 <td
>Not shown in
/WHO searches
.</td
>
135 elseif ($mode == "p")
139 <th
>Private channels
</th
>
140 <td
>Channels hidden in
/WHOIS outputs
.</td
>
144 elseif ($mode == "r")
148 <th
>Registered Nick
</th
>
149 <td
>This user is using a registered nick
.</td
>
153 elseif ($mode == "s")
157 <th
>Server Notices
</th
>
158 <td
>This user is receiving server notices
.</td
>
162 elseif ($mode == "t")
166 <th
>Virtual Host
</th
>
167 <td
>Using a custom hostmask
</td
>
171 elseif ($mode == "w")
176 <td
>Listening to
<code
>/WALLOPS
</code
> notices from IRC Operators
.</td
>
180 elseif ($mode == "x")
185 <td
>Using a
hostmask (hiding their IP from non
-IRCops
).</td
>
189 elseif ($mode == "z")
195 <table
class="table-sm table-responsive caption-top table-hover">
199 $cipher = (isset($user->tls
->cipher
)) ? $user->tls
->cipher
: "";
200 echo htmlspecialchars($cipher);
204 <td
>Cert Fingerprint
</td
>
205 <td
><?php
echo (isset($user->tls
->certfp
)) ? "<code>".htmlspecialchars($user->tls
->certfp
)."</code>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
212 elseif ($mode == "B")
218 User is marked
as a Bot
.
223 elseif ($mode == "D")
229 User is rejecting incoming
private messages
.
234 elseif ($mode == "G")
240 User is filtering Bad Words
.
245 elseif ($mode == "H")
251 User is hiding their IRCop status
.
256 elseif ($mode == "I")
262 User is hiding their idle time
.
267 elseif ($mode == "R")
271 <th
>RegOnly Messages
</th
>
273 User is only accepting
private messages from registered users
.
278 elseif ($mode == "T")
284 Denying CTCP requests
.
289 elseif ($mode == "W")
295 User is receiving notifications when someone does a
<code
>/WHOIS
</code
> on them
.
300 elseif ($mode == "Z")
304 <th
>Deny Insecure Messages
</th
>
306 User is only accepting messages from users using a secure connection
.
322 function generate_html_userchannels($user)
326 <table
class="table-sm table-responsive caption-top table-hover table-striped">
327 <thead
class="table-info">
337 foreach($user->user
->channels
as $chan)
341 <td
><?php
echo "<a href=\"".get_config("base_url")."channels/details.php?chan=".urlencode($chan->name
)."\">$chan->name</a>"; ?></td
>
345 for ($i = 0; isset($chan->level
[$i]); $i++
)
347 ?><div
class="text-nowrap row mb-1"><?php
348 if ($chan->level
[$i] == "v")
350 ?><span
class="rounded-pill badge badge-info" value
="Voice">Voice
</span
><?php
352 if ($chan->level
[$i] == "h")
354 ?><span
class="rounded-pill badge badge-info">Half
-Op
</span
><?php
356 if ($chan->level
[$i] == "o")
358 ?><h6
><span
class="rounded-pill badge badge-info">Operator
</span
></h6
><?php
360 if ($chan->level
[$i] == "a")
362 ?><span
class="rounded-pill badge badge-info">Admin
</span
><?php
364 if ($chan->level
[$i] == "q")
366 ?><span
class="rounded-pill badge badge-info">Owner
</span
><?php
368 if ($chan->level
[$i] == "Y")
370 ?><span
class="rounded-pill badge badge-info">OJOIN
</span
><?php