- ?>
- <table class='users_overview'>
- <th><input type="checkbox" label='selectall' onClick="toggle_user(this)" />Select all</th>
- <th>Nick</th>
- <th>UID</th>
- <th>Host / IP</th>
- <th>Account</th>
- <th>Usermodes<a href="https://www.unrealircd.org/docs/User_modes" target="_blank">ℹ️</a></th>
- <th>Oper</th>
- <th>Secure</th>
- <th>Connected to</th>
- <th>Reputation <a href="https://www.unrealircd.org/docs/Reputation_score" target="_blank">ℹ️</a></th>
-
- <form action="" method="post">
- <?php
- foreach(RPC_List::$user as $user)
- {
-
- /* Some basic filtering for NICK */
- if (isset($_POST['uf_nick']) && strlen($_POST['uf_nick']) &&
- strpos(strtolower($user['name']), strtolower($_POST['uf_nick'])) !== 0 &&
- strpos(strtolower($user['name']), strtolower($_POST['uf_nick'])) == false)
- continue;
-
- /* Some basic filtering for HOST */
- if (isset($_POST['uf_host']) && strlen($_POST['uf_host']) &&
- strpos(strtolower($user['hostname']), strtolower($_POST['uf_host'])) !== 0 &&
- strpos(strtolower($user['hostname']), strtolower($_POST['uf_host'])) == false)
- continue;
-
- /* Some basic filtering for IP */
- if (isset($_POST['uf_ip']) && strlen($_POST['uf_ip']) &&
- strpos(strtolower($user['ip']), strtolower($_POST['uf_ip'])) !== 0 &&
- strpos(strtolower($user['ip']), strtolower($_POST['uf_ip'])) == false)
- continue;
-
- /* Some basic filtering for ACCOUNT */
- if (isset($_POST['uf_account']) && strlen($_POST['uf_account']) &&
- strpos(strtolower($user['user']['account']), strtolower($_POST['uf_account'])) !== 0 &&
- strpos(strtolower($user['user']['account']), strtolower($_POST['uf_account'])) == false)
- continue;
-
- echo "<tr>";
- echo "<td><input type=\"checkbox\" value='" . base64_encode($user['id'])."' name=\"userch[]\"></td>";
- echo "<td>".$user['name']."</td>";
- echo "<td>".$user['id']."</td>";
- echo "<td>".$user['hostname']." (".$user['ip'].")</td>";
- $account = (isset($user['user']['account'])) ? '<span class="label">'.$user['user']['account'].'</span>' : '<span class="label noaccount">No account</span>';
- echo "<td>".$account."</td>";
- $modes = (isset($user['user']['modes'])) ? "+" . $user['user']['modes'] : "<none>";
- echo "<td>".$modes."</td>";
- $oper = (isset($user['user']['operlogin'])) ? $user['user']['operlogin']." <span class=\"label operclass-label\">".$user['user']['operclass']."</span>" : "";
- echo "<td>".$oper."</td>";
- $secure = (isset($user['tls'])) ? "<span class=\"label secure-connection\">Secure</span>" : "<span class=\"label noaccount\">Insecure</span>";
- echo "<td>".$secure."</td>";
- echo "<td>".$user['user']['servername']."</td>";
- echo "<td>".$user['user']['reputation']."</td>";
- }
- ?></table>
- <label for="bantype">Apply action: </label><br>
- <select name="bantype" id="bantype">
- <option value=""></option>
- <optgroup label="Bans">
- <option value="gline">GLine</option>
- <option value="gzline">GZLine</option>
- </optgroup>
- </select>
- <br>
- <label for="banlen_w">Duration: </label><br>
- <select name="banlen_w" id="banlen_w">
- <?php
- for ($i = 0; $i <= 56; $i++)
- {
- if (!$i)
- echo "<option value=\"0w\"></option>";
- else
- {
- $w = ($i == 1) ? "week" : "weeks";
- echo "<option value=\"$i" . "w\">$i $w" . "</option>";
- }
- }
- ?>
- </select>
- <select name="banlen_d" id="banlen_d">
- <?php
- for ($i = 0; $i <= 31; $i++)
- {
- if (!$i)
- echo "<option value=\"0d\"></option>";
- else
- {
- $d = ($i == 1) ? "day" : "days";
- echo "<option value=\"$i" . "d\">$i $d" . "</option>";
- }
- }
- ?>
- </select>
- <select name="banlen_h" id="banlen_h">
- <?php
- for ($i = 0; $i <= 24; $i++)
- {
- if (!$i)
- echo "<option value=\"0d\"></option>";
- else
- {
- $h = ($i == 1) ? "hour" : "hours";
- echo "<option value=\"$i" . "h\">$i $h" . "</option>";
- }
- }
- ?>
- </select>
- <br><label for="ban_reason">Reason:<br></label>
- <textarea name="ban_reason" id="ban_reason">No reason</textarea><br>
- <input class="cute_button" type="submit" value="Apply">
- </form>
-
- </div></div>
-
- <div class="tab-content\">
- <div id="Channels" data-tab-content>
- <p></p>
- <table class='users_overview'>
- <th>Name</th>
- <th>Created</th>
- <th>User count</th>
- <th>Topic</th>
- <th>Topic Set</th>
- <th>Modes</th>
-
- <?php
- foreach(RPC_List::$channel as $channel)
- {
- echo "<tr>";
- echo "<td>".$channel['name']."</td>";
- echo "<td>".$channel['creation_time']."</td>";
- echo "<td>".$channel['num_users']."</td>";
- $topic = (isset($channel['topic'])) ? $channel['topic'] : "";
- echo "<td>".$topic."</td>";
- $setby = (isset($channel['topic'])) ? "By ".$channel['topic_set_by'] .", at ".$channel['topic_set_at'] : "";
- echo "<td>".$setby."</td>";
- $modes = (isset($channel['modes'])) ? "+" . $channel['modes'] : "<none>";
- echo "<td>".$modes."</td>";
- }
- ?></table></div></div>