]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - index.php
Add users table
[irc/unrealircd/unrealircd-webpanel.git] / index.php
CommitLineData
896b6cdc 1<!DOCTYPE html>
82f5bcbf
VP
2<link href="/css/unrealircd-admin.css" rel="stylesheet">
3<body>
4<div id="headerContainer">
5<h2>UnrealIRCd <small>Administration Panel</small></h2><br>
6</div>
709b97f3
VP
7<script src="js/unrealircd-admin.js" defer></script>
8<div class="topnav">
9 <a data-tab-target="#overview" class="active" href="#overview">Overview</a>
10 <a data-tab-target="#Users" href="#Users">Users</a>
11 <a data-tab-target="#Channels" href="#Channels">Channels</a>
12 <a data-tab-target="#TKL" href="#TKL">Server Bans</a>
13 <a data-tab-target="#Spamfilter" href="#Spamfilter">Spamfilter</a>
14</div>
15<?php
16/**
17 * Provide a admin area view for the plugin
18 *
19 * This file is used to markup the admin-facing aspects of the plugin.
20 *
896b6cdc
VP
21 * @link https://https://github.com/ValwareIRC
22 * @since 1.0.0
709b97f3 23 *
896b6cdc 24 * @package Unrealircd
709b97f3
VP
25 * @subpackage Unrealircd/admin/partials
26 */
27
28define('UPATH', true);
29include "Classes/class-rpc.php";
30
896b6cdc 31rpc_pop_lists(); // populate our static lists (users, channels, tkl, spamfilter)
709b97f3 32?>
82f5bcbf
VP
33
34<div class="tab-content\">
35<div id="overview" data-tab-content class="active">
896b6cdc
VP
36 <p>Your shiny IRC overview</p>
37 <table class='unrealircd_overview'>
38 <th>Chat Overview</th><th></th>
39 <tr><td><b>Users</b></td><td><?php echo count(RPC_List::$user); ?></td></tr>
40 <tr><td><b>Opers</b></td><td><?php echo RPC_List::$opercount; ?></td></tr>
41 <tr><td><b>Services</b></td><td><?php echo RPC_List::$services_count; ?></td></tr>
42 <tr><td><b>Most popular channel</b></td><td><?php echo RPC_List::$most_populated_channel; ?> (<?php echo RPC_List::$channel_pop_count; ?> users)</td></tr>
43 <tr><td><b>Channels</b></td><td><?php echo count(RPC_List::$channel); ?></td></tr>
44 <tr><td><b>Server bans</b></td><td><?php echo count(RPC_List::$tkl); ?></td></tr>
45 <tr><td><b>Spamfilter entries</b></td><td><?php echo count(RPC_List::$spamfilter); ?></td></tr></th>
46 </table></div></div>
82f5bcbf
VP
47
48<div class="tab-content\">
896b6cdc
VP
49<div id="Users" data-tab-content>
50 <p></p>
51 <table class='users_overview'>
52 <th>Nick</th>
53 <th>UID</th>
54 <th>IP/Host</th>
55 <th>Account</th>
56 <th>Usermodes</th>
57 <th>Oper</th>
58 <th>Secure</th>
59 <th>Connected to</th>
60 <th>Reputation <a href="https://www.unrealircd.org/docs/Reputation_score"></a>ℹ️</th>
61
62 <?php
63 foreach(RPC_List::$user as $user)
64 {
65 echo "<tr>";
66 echo "<td>".$user['name']."</td>";
67 echo "<td>".$user['id']."</td>";
68 echo "<td>".$user['hostname']." (".$user['ip'].")</td>";
69 $account = (isset($user['account'])) ? $user['account'] : "";
70 echo "<td>".$account."</td>";
71 $modes = (isset($user['user']['modes'])) ? "+" . $user['user']['modes'] : "<none>";
72 echo "<td>".$modes."</td>";
73 $oper = (isset($user['user']['operlogin'])) ? $user['user']['operlogin']." (".$user['user']['operclass'].")" : "";
74 echo "<td>".$oper."</td>";
75 $secure = (isset($user['tls'])) ? "✅" : "❌";
76 echo "<td>".$secure."</td>";
77 echo "<td>".$user['user']['servername']."</td>";
78 echo "<td>".$user['user']['reputation']."</td>";
79 }
80 ?>
82f5bcbf 81
896b6cdc 82</body>
82f5bcbf 83
896b6cdc 84<div class="footer"><p>Copyright 2022 © <a href="https://unrealircd.org/">UnrealIRCd</a></p></div>