]>
jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - index.php
2 <link href
="css/unrealircd-admin.css" rel
="stylesheet">
4 <div id
="headerContainer">
5 <h2
>UnrealIRCd
<small
>Administration Panel
</small
></h2
><br
>
7 <script src
="js/unrealircd-admin.js" defer
></script
>
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
>
17 * Provide a admin area view for the plugin
19 * This file is used to markup the admin-facing aspects of the plugin.
21 * @link https://https://github.com/ValwareIRC
25 * @subpackage Unrealircd/admin/partials
28 define('UPATH', true);
29 include "Classes/class-rpc.php";
31 rpc_pop_lists(); // populate our static lists (users, channels, tkl, spamfilter)
34 <div
class="tab-content\">
35 <div id="overview
" data-tab-content class="active
">
36 <table class='unrealircd_overview'>
37 <th>Chat Overview</th><th></th>
38 <tr><td><b>Users</b></td><td><?php echo count(RPC_List::$user); ?></td></tr>
39 <tr><td><b>Opers</b></td><td><?php echo RPC_List::$opercount; ?></td></tr>
40 <tr><td><b>Services</b></td><td><?php echo RPC_List::$services_count; ?></td></tr>
41 <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>
42 <tr><td><b>Channels</b></td><td><?php echo count(RPC_List::$channel); ?></td></tr>
43 <tr><td><b>Server bans</b></td><td><?php echo count(RPC_List::$tkl); ?></td></tr>
44 <tr><td><b>Spamfilter entries</b></td><td><?php echo count(RPC_List::$spamfilter); ?></td></tr></th>
47 <div class="tab
-content\"
>
48 <div id
="Users" data
-tab
-content
>
50 <table
class='users_overview'>
59 <th
>Reputation
<a href
="https://www.unrealircd.org/docs/Reputation_score"></a
>ℹ️
</th
>
62 foreach(RPC_List
::$user as $user)
65 echo "<td>".$user['name']."</td>";
66 echo "<td>".$user['id']."</td>";
67 echo "<td>".$user['hostname']." (".$user['ip'].")</td>";
68 $account = (isset($user['account'])) ? $user['account'] : "";
69 echo "<td>".$account."</td>";
70 $modes = (isset($user['user']['modes'])) ? "+" . $user['user']['modes'] : "<none>";
71 echo "<td>".$modes."</td>";
72 $oper = (isset($user['user']['operlogin'])) ? $user['user']['operlogin']." (".$user['user']['operclass'].")" : "";
73 echo "<td>".$oper."</td>";
74 $secure = (isset($user['tls'])) ? "✅" : "❌";
75 echo "<td>".$secure."</td>";
76 echo "<td>".$user['user']['servername']."</td>";
77 echo "<td>".$user['user']['reputation']."</td>";
79 ?></table
></div
></div
>
81 <div
class="tab-content\">
82 <div id="Channels
" data-tab-content>
84 <table class='users_overview'>
93 foreach(RPC_List::$channel as $channel)
96 echo "<td
>".$channel['name']."</td
>";
97 echo "<td
>".$channel['creation_time']."</td
>";
98 echo "<td
>".$channel['num_users']."</td
>";
99 $topic = (isset($channel['topic'])) ? $channel['topic'] : "";
100 echo "<td
>".$topic."</td
>";
101 $setby = (isset($channel['topic'])) ? "By
".$channel['topic_set_by'] .", at
".$channel['topic_set_at'] : "";
102 echo "<td
>".$setby."</td
>";
103 $modes = (isset($channel['modes'])) ? "+
" . $channel['modes'] : "<none
>";
104 echo "<td
>".$modes."</td
>";
106 ?></table></div></div>
109 <div class="tab
-content\"
>
110 <div id
="TKL" data
-tab
-content
>
112 <table
class='users_overview'>
122 foreach(RPC_List
::$tkl as $tkl)
125 echo "<td>".$tkl['name']."</td>";
126 echo "<td>".$tkl['type_string']."</td>";
127 echo "<td>".$tkl['set_by']."</td>";
128 echo "<td>".$tkl['set_at_string']."</td>";
129 echo "<td>".$tkl['expire_at_string']."</td>";
130 echo "<td>".$tkl['duration_string']."</td>";
131 echo "<td>".$tkl['reason']."</td>";
133 ?></table
></div
></div
>
136 <div
class="tab-content\">
137 <div id="Spamfilter
" data-tab-content>
139 <table class='users_overview'>
148 <th>Action Duration</th>
153 foreach(RPC_List::$spamfilter as $sf)
156 echo "<td
>".$sf['name']."</td
>";
157 echo "<td
>".$sf['type_string']."</td
>";
158 echo "<td
>".$sf['set_by']."</td
>";
159 echo "<td
>".$sf['set_at_string']."</td
>";
160 echo "<td
>".$sf['expire_at_string']."</td
>";
161 echo "<td
>".$sf['duration_string']."</td
>";
162 echo "<td
>".$sf['match_type']."</td
>";
163 echo "<td
>".$sf['ban_action']."</td
>";
164 echo "<td
>".$sf['ban_duration_string']."</td
>";
165 for ($i = 0, $targs = ""; ($c = $sf['spamfilter_targets'][$i]); $i++)
168 $targs .= "Channel
, ";
170 $targs .= "Private,";
172 $targs .= "Notice
, ";
174 $targs .= "Channel notice
, ";
176 $targs .= "Part message
, ";
178 $targs .= "Quit message
, ";
180 $targs .= "DCC filename
, ";
182 $targs .= "Away message
, ";
184 $targs .= "Channel topic
, ";
186 $targs .= "MessageTag
, ";
188 $targs .= "Usermask
, ";
190 $targs = rtrim($targs,", ");
192 echo "<td
>".$targs."</td
>";
193 echo "<td
>".$sf['reason']."</td
>";
196 ?></table></div></div>
200 <div class="footer
"><p>Copyright 2022 © <a href="https
://unrealircd.org/">UnrealIRCd</a></p></div>