3 function generate_html_whois($user)
8 <table
class="table-sm table-responsive caption-top table-hover">
9 <span
class="badge rounded-pill"
10 style
="position: absolute;
13 background-color:lightgrey;
16 >Reputation
<span
class="badge badge-danger" style
="font-size:small;"><?php
echo $user->user
->reputation
; ?></span
>
21 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->name
); ?></code
></td
>
23 <th
>User
ID (UID
)</th
>
24 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->id
); ?></code
></td
>
27 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->hostname
); ?></code
></td
>
30 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->ip
); ?></code
>
32 if ($cc = (isset($user->geoip
->country_code
)) ? strtolower($user->geoip
->country_code
) : "")
34 ?> <img src
="https://flagcdn.com/48x36/<?php echo htmlspecialchars($cc); ?>.png"
38 <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
>
42 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->username
); ?></code
></td
>
44 <th
>GECOS
/ Real Name
</th
>
45 <td colspan
="2"><code
><?php
echo htmlspecialchars($user->user
->realname
); ?></code
></td
>
48 <td colspan
="2"><code
><?php
echo (isset($user->user
->vhost
)) ? htmlspecialchars($user->user
->vhost
) : ""; ?></code
></td
>
51 <?php
$serverlkup = $rpc->server()->get($user->user
->servername
); ?>
53 <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
>
58 <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
>
61 <th style
="background-color: blanchedalmond;border-radius:5px";>Security Groups
</th
>
62 <td colspan
="2"><code
><?php
63 echo "<table style=\"margin-left:-15px;
66 background-color: blanchedalmond\"><tr>";
67 foreach($user->user
->{"security-groups"} as $sg)
69 echo "<th><div class=\"badge badge-secondary rounded-pill\">$sg</th></tr><tr>";
71 echo "</tr></table>"; ?>
82 function generate_html_usersettings($user)
86 <table
class="table-sm table-responsive caption-top table-hover">
89 for ($i=0; ($mode = (isset($user->user
->modes
[$i])) ? $user->user
->modes
[$i] : NULL); $i++
)
98 <table
class="table-sm table-responsive caption-top table-hover">
102 $operlogin = (isset($user->user
->operlogin
)) ? $user->user
->operlogin
: "";
103 echo htmlspecialchars($operlogin);
108 <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
>
115 elseif ($mode == "S")
121 This user is a Services Bot
.
126 elseif ($mode == "d")
131 <td
>User is ignoring channel messages
.</td
>
135 elseif ($mode == "i")
140 <td
>Not shown in
/WHO searches
.</td
>
144 elseif ($mode == "p")
148 <th
>Private channels
</th
>
149 <td
>Channels hidden in
/WHOIS outputs
.</td
>
153 elseif ($mode == "r")
157 <th
>Registered Nick
</th
>
158 <td
>This user is using a registered nick
.</td
>
162 elseif ($mode == "s")
166 <th
>Server Notices
</th
>
167 <td
>This user is receiving server notices
.</td
>
171 elseif ($mode == "t")
175 <th
>Virtual Host
</th
>
176 <td
>Using a custom hostmask
</td
>
180 elseif ($mode == "w")
185 <td
>Listening to
<code
>/WALLOPS
</code
> notices from IRC Operators
.</td
>
189 elseif ($mode == "x")
194 <td
>Using a
hostmask (hiding their IP from non
-IRCops
).</td
>
198 elseif ($mode == "z")
204 <table
class="table-sm table-responsive caption-top table-hover">
208 $cipher = (isset($user->tls
->cipher
)) ? $user->tls
->cipher
: "";
209 echo htmlspecialchars($cipher);
213 <td
>Cert Fingerprint
</td
>
214 <td
><?php
echo (isset($user->tls
->certfp
)) ? "<code>".htmlspecialchars($user->tls
->certfp
)."</code>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td
>
221 elseif ($mode == "B")
227 User is marked
as a Bot
.
232 elseif ($mode == "D")
238 User is rejecting incoming
private messages
.
243 elseif ($mode == "G")
249 User is filtering Bad Words
.
254 elseif ($mode == "H")
260 User is hiding their IRCop status
.
265 elseif ($mode == "I")
271 User is hiding their idle time
.
276 elseif ($mode == "R")
280 <th
>RegOnly Messages
</th
>
282 User is only accepting
private messages from registered users
.
287 elseif ($mode == "T")
293 Denying CTCP requests
.
298 elseif ($mode == "W")
304 User is receiving notifications when someone does a
<code
>/WHOIS
</code
> on them
.
309 elseif ($mode == "Z")
313 <th
>Deny Insecure Messages
</th
>
315 User is only accepting messages from users using a secure connection
.
331 function generate_html_userchannels($user)
335 <table
class="table-sm table-responsive caption-top table-hover table-striped">
336 <thead
class="table-info">
346 foreach($user->user
->channels
as $chan)
350 <td
><?php
echo "<a href=\"".get_config("base_url")."channels/details.php?chan=".urlencode($chan->name
)."\">$chan->name</a>"; ?></td
>
354 for ($i = 0; isset($chan->level
[$i]); $i++
)
356 ?><div
class="text-nowrap row mb-1"><?php
357 if ($chan->level
[$i] == "v")
359 ?><span
class="rounded-pill badge badge-info" value
="Voice">Voice
</span
><?php
361 if ($chan->level
[$i] == "h")
363 ?><span
class="rounded-pill badge badge-info">Half
-Op
</span
><?php
365 if ($chan->level
[$i] == "o")
367 ?><h6
><span
class="rounded-pill badge badge-info">Operator
</span
></h6
><?php
369 if ($chan->level
[$i] == "a")
371 ?><span
class="rounded-pill badge badge-info">Admin
</span
><?php
373 if ($chan->level
[$i] == "q")
375 ?><span
class="rounded-pill badge badge-info">Owner
</span
><?php
377 if ($chan->level
[$i] == "Y")
379 ?><span
class="rounded-pill badge badge-info">OJOIN
</span
><?php