]>
Commit | Line | Data |
---|---|---|
62d4ea03 VP |
1 | <?php |
2 | ||
3 | function generate_html_whois($user) | |
4 | { | |
5 | ?> | |
6 | ||
66f46138 | 7 | <table class="table-sm table-responsive caption-top table-hover"> |
62d4ea03 VP |
8 | <tbody> |
9 | <tr> | |
10 | <th>Nick</th> | |
11 | <td colspan="2"><code><?php echo $user->name; ?></code></td> | |
12 | </tr><tr> | |
ab23a935 | 13 | <th>User ID (UID)</th> |
62d4ea03 VP |
14 | <td colspan="2"><code><?php echo $user->id; ?></code></td> |
15 | </tr><tr> | |
16 | <th>Real Host</th> | |
17 | <td colspan="2"><code><?php echo $user->hostname; ?></code></td> | |
18 | </tr><tr> | |
19 | <th>IP</th> | |
20 | <td colspan="2"><code><?php echo $user->ip." </code> "; | |
21 | if ($cc = (isset($user->geoip->country_code)) ? strtolower($user->geoip->country_code) : "") | |
22 | { | |
23 | ?> <img src="https://flagcdn.com/48x36/<?php echo $cc; ?>.png" | |
24 | width="20" | |
25 | height="15"> | |
26 | <?php } ?> | |
27 | </td> | |
28 | </tr><tr> | |
29 | <th>Ident</th> | |
30 | <td colspan="2"><code><?php echo $user->user->username; ?></code></td> | |
31 | </tr><tr> | |
32 | <th>GECOS / Real Name</th> | |
33 | <td colspan="2"><code><?php echo $user->user->realname; ?></code></td> | |
34 | </tr><tr> | |
35 | <th>Virtual Host</th> | |
36 | <td colspan="2"><code><?php echo (isset($user->user->vhost)) ? $user->user->vhost : ""; ?></code></td> | |
37 | </tr><tr> | |
38 | <th>Connected to</th> | |
39 | <td colspan="2"><code><?php echo $user->user->servername; ?></code></td> | |
9ffc5134 | 40 | |
62d4ea03 VP |
41 | </tr> |
42 | <tr> | |
43 | <th>Logged in as</th> | |
44 | <td colspan="2"><code><?php echo (isset($user->user->account)) ? $user->user->account : ""; ?></code></td> | |
45 | </tr> | |
46 | ||
47 | ||
48 | </tbody> | |
49 | </table> | |
50 | ||
51 | <?php | |
52 | } | |
53 | function generate_html_usersettings($user) | |
54 | { | |
55 | ?> | |
56 | ||
66f46138 | 57 | <table class="table-sm table-responsive caption-top table-hover"> |
62d4ea03 VP |
58 | <tbody> |
59 | <?php | |
60 | for ($i=0; ($mode = (isset($user->user->modes[$i])) ? $user->user->modes[$i] : NULL); $i++) | |
61 | { | |
62 | ||
63 | if ($mode == "o") | |
64 | { | |
65 | ?> | |
66 | <tr> | |
67 | <th>Oper</th> | |
9ffc5134 | 68 | <td> |
66f46138 | 69 | <table class="table-sm table-responsive caption-top table-hover"> |
62d4ea03 VP |
70 | <tr> |
71 | <td>Oper Login</td> | |
72 | <td><code><?php echo $user->user->operlogin; ?></code></td> | |
73 | </tr> | |
74 | <tr> | |
75 | <td>Oper Class</td> | |
7b6e57db | 76 | <td><?php echo (isset($user->user->operclass)) ? "<span class=\"rounded-pill badge badge-info\">".$user->user->operclass."</span>" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td> |
62d4ea03 VP |
77 | </tr> |
78 | </table> | |
79 | </td> | |
80 | </tr> | |
81 | <?php | |
82 | } | |
83 | elseif ($mode == "S") | |
84 | { | |
85 | ?> | |
86 | <tr> | |
87 | <th>Service Bot</th> | |
9ffc5134 | 88 | <td> |
62d4ea03 VP |
89 | This user is a Services Bot. |
90 | </td> | |
91 | </tr> | |
92 | <?php | |
93 | } | |
94 | elseif ($mode == "d") | |
95 | { | |
96 | ?> | |
97 | <tr> | |
98 | <th>Deaf</th> | |
9ffc5134 | 99 | <td>User is ignoring channel messages.</td> |
62d4ea03 VP |
100 | </tr> |
101 | <?php | |
102 | } | |
103 | elseif ($mode == "i") | |
104 | { | |
105 | ?> | |
106 | <tr> | |
107 | <th>Invisible</th> | |
9ffc5134 | 108 | <td>Not shown in /WHO searches.</td> |
62d4ea03 VP |
109 | </tr> |
110 | <?php | |
111 | } | |
112 | elseif ($mode == "p") | |
113 | { | |
114 | ?> | |
115 | <tr> | |
116 | <th>Private channels</th> | |
9ffc5134 | 117 | <td>Channels hidden in /WHOIS outputs.</td> |
62d4ea03 VP |
118 | </tr> |
119 | <?php | |
120 | } | |
121 | elseif ($mode == "r") | |
122 | { | |
123 | ?> | |
124 | <tr> | |
125 | <th>Registered Nick</th> | |
9ffc5134 | 126 | <td>This user is using a registered nick.</td> |
62d4ea03 VP |
127 | </tr> |
128 | <?php | |
129 | } | |
130 | elseif ($mode == "s") | |
131 | { | |
132 | ?> | |
133 | <tr> | |
134 | <th>Server Notices</th> | |
9ffc5134 | 135 | <td>This user is receiving server notices.</td> |
62d4ea03 VP |
136 | </tr> |
137 | <?php | |
138 | } | |
139 | elseif ($mode == "t") | |
140 | { | |
141 | ?> | |
142 | <tr> | |
143 | <th>Virtual Host</th> | |
9ffc5134 | 144 | <td>Using a custom hostmask</td> |
62d4ea03 VP |
145 | </tr> |
146 | <?php | |
147 | } | |
148 | elseif ($mode == "w") | |
149 | { | |
150 | ?> | |
151 | <tr> | |
152 | <th>Wallops</th> | |
9ffc5134 | 153 | <td>Listening to <code>/WALLOPS</code> notices from IRC Operators.</td> |
62d4ea03 VP |
154 | </tr> |
155 | <?php | |
156 | } | |
157 | elseif ($mode == "x") | |
158 | { | |
159 | ?> | |
160 | <tr> | |
161 | <th>Hostmask</th> | |
9ffc5134 | 162 | <td>Using a hostmask (hiding their IP from non-IRCops).</td> |
62d4ea03 VP |
163 | </tr> |
164 | <?php | |
165 | } | |
166 | elseif ($mode == "z") | |
167 | { | |
168 | ?> | |
169 | <tr> | |
170 | <th>Secure</th> | |
9ffc5134 | 171 | <td> |
66f46138 | 172 | <table class="table-sm table-responsive caption-top table-hover"> |
62d4ea03 VP |
173 | <tr> |
174 | <td>Cipher</td> | |
175 | <td><code><?php echo $user->tls->cipher; ?></code></td> | |
176 | </tr> | |
177 | <tr> | |
178 | <td>Cert Fingerprint</td> | |
7b6e57db | 179 | <td><?php echo (isset($user->tls->certfp)) ? "".$user->tls->certfp."" : "<span class=\"rounded-pill badge badge-info\">None</span>"; ?></td> |
62d4ea03 VP |
180 | </tr> |
181 | </table> | |
182 | </td> | |
183 | </tr> | |
184 | <?php | |
185 | } | |
186 | elseif ($mode == "B") | |
187 | { | |
188 | ?> | |
189 | <tr> | |
190 | <th>Bot</th> | |
191 | <td colspan="2"> | |
192 | User is marked as a Bot. | |
193 | </td> | |
194 | </tr> | |
195 | <?php | |
196 | } | |
197 | elseif ($mode == "D") | |
198 | { | |
199 | ?> | |
200 | <tr> | |
201 | <th>PrivDeaf</th> | |
202 | <td colspan="2"> | |
203 | User is rejecting incoming private messages. | |
204 | </td> | |
205 | </tr> | |
206 | <?php | |
207 | } | |
208 | elseif ($mode == "G") | |
209 | { | |
210 | ?> | |
211 | <tr> | |
212 | <th>Filter</th> | |
213 | <td colspan="2"> | |
214 | User is filtering Bad Words. | |
215 | </td> | |
216 | </tr> | |
217 | <?php | |
218 | } | |
219 | elseif ($mode == "H") | |
220 | { | |
221 | ?> | |
222 | <tr> | |
223 | <th>Hide IRCop</th> | |
224 | <td colspan="2"> | |
225 | User is hiding their IRCop status. | |
226 | </td> | |
227 | </tr> | |
228 | <?php | |
229 | } | |
230 | elseif ($mode == "I") | |
231 | { | |
232 | ?> | |
233 | <tr> | |
234 | <th>Hide Idle</th> | |
235 | <td colspan="2"> | |
236 | User is hiding their idle time. | |
237 | </td> | |
238 | </tr> | |
239 | <?php | |
240 | } | |
241 | elseif ($mode == "R") | |
242 | { | |
243 | ?> | |
244 | <tr> | |
245 | <th>RegOnly Messages</th> | |
246 | <td colspan="2"> | |
247 | User is only accepting private messages from registered users. | |
248 | </td> | |
249 | </tr> | |
250 | <?php | |
251 | } | |
252 | elseif ($mode == "T") | |
253 | { | |
254 | ?> | |
255 | <tr> | |
256 | <th>Deny CTCPs</th> | |
257 | <td colspan="2"> | |
258 | Denying CTCP requests. | |
259 | </td> | |
260 | </tr> | |
261 | <?php | |
262 | } | |
263 | elseif ($mode == "W") | |
264 | { | |
265 | ?> | |
266 | <tr> | |
267 | <th>View /WHOIS</th> | |
268 | <td colspan="2"> | |
269 | User is receiving notifications when someone does a <code>/WHOIS</code> on them. | |
270 | </td> | |
271 | </tr> | |
272 | <?php | |
273 | } | |
274 | elseif ($mode == "Z") | |
275 | { | |
276 | ?> | |
277 | <tr> | |
278 | <th>Deny Insecure Messages</th> | |
279 | <td colspan="2"> | |
280 | User is only accepting messages from users using a secure connection. | |
281 | </td> | |
282 | </tr> | |
283 | <?php | |
284 | } | |
285 | } | |
286 | ||
287 | ||
288 | ?> | |
289 | </tbody> | |
290 | </table> | |
291 | ||
7b6e57db VP |
292 | <?php |
293 | } | |
294 | ||
295 | ||
296 | function generate_html_userchannels($user) | |
297 | { | |
298 | ?> | |
299 | ||
66f46138 | 300 | <table class="table-sm table-responsive caption-top table-hover table-striped"> |
7b6e57db | 301 | <thead class="table-info"> |
03200675 | 302 | <th> |
7b6e57db VP |
303 | Channel |
304 | </th> | |
03200675 | 305 | <th > |
7b6e57db VP |
306 | Status |
307 | </th> | |
308 | </thead> | |
309 | <tbody> | |
310 | <?php | |
311 | foreach($user->user->channels as $chan) | |
312 | { | |
313 | ?> | |
314 | <tr> | |
03200675 VP |
315 | <td><?php echo $chan->name; ?></td> |
316 | <td> | |
7b6e57db VP |
317 | |
318 | <?php | |
319 | for ($i = 0; isset($chan->level[$i]); $i++) | |
320 | { | |
321 | ?><div class="text-nowrap row mb-1"><?php | |
322 | if ($chan->level[$i] == "v") | |
323 | { | |
324 | ?><span class="rounded-pill badge badge-info" value="Voice">Voice</span><?php | |
325 | } | |
326 | if ($chan->level[$i] == "h") | |
327 | { | |
328 | ?><span class="rounded-pill badge badge-info">Half-Op</span><?php | |
329 | } | |
330 | if ($chan->level[$i] == "o") | |
331 | { | |
332 | ?><h6><span class="rounded-pill badge badge-info">Operator</span></h6><?php | |
333 | } | |
334 | if ($chan->level[$i] == "a") | |
335 | { | |
336 | ?><span class="rounded-pill badge badge-info">Admin</span><?php | |
337 | } | |
338 | if ($chan->level[$i] == "q") | |
339 | { | |
340 | ?><span class="rounded-pill badge badge-info">Owner</span><?php | |
341 | } | |
342 | if ($chan->level[$i] == "Y") | |
343 | { | |
344 | ?><span class="rounded-pill badge badge-info">OJOIN</span><?php | |
345 | } | |
346 | ?></div><?php | |
347 | } | |
348 | ?> | |
349 | </td> | |
350 | </tr> | |
351 | <?php | |
352 | } | |
353 | ?> | |
354 | </tbody> | |
355 | </table> | |
356 | ||
62d4ea03 VP |
357 | <?php |
358 | } |