+table {
+ font-size: 96%;
+}
+
.unrealircd_overview {
font-family: arial, sans-serif;
border-collapse: collapse;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
+.curvy {
+ border-radius: 7px;
+}
+
+
+.form-control {
+ height: 10px;
+ margin: 5px;
+}
+
+.short-form-control {
+ width: 70%;
+}
+
.nav-item {
margin-left: 2px;
margin-right: 2px;
.input_text {
border-radius: 7px;
}
-select {
- border-radius: 7px;
-}
-.thuf {
- border-bottom-left-radius: 10px;
-}
-
-.thuffer {
- border-bottom-right-radius: 10px;
-}
.filter-fields {
height: 30px;
width: 400px;
border-radius: 7px;
}
-.secure-connection {
- color: darkgreen;
- border: 3px solid darkgreen;
- background-color: rgba(0, 255, 0, 0.1);
-}
-
-.operclass-label {
- color:brown;
- border: 3px solid brown;
- background-color: rgba(255, 166, 0, 0.247);
-}
-.bluelabel {
- color: blue;
- border: 3px solid darkblue;
- background-color: rgba(131, 78, 255, 0.295);
-}
-.redlabel {
- color: darkred;
- border: 3px solid darkred;
- background-color: rgba(255, 78, 78, 0.295);
-}
.align_label {
width: 80px;
text-align: right;
}
-.label {
- white-space: nowrap;
- font-family: 'Heebo', sans-serif;
- font-size: 0.65rem;
- font-weight: 500;
- letter-spacing: 0.025rem;
- font-style: normal;
- text-transform: uppercase;
- border-radius: 7px;
- -webkit-border-radius: 1rem;
- -moz-border-radius: 1rem;
- padding: 0.20rem 0.50rem;
- border-style: solid;
-
- }
textarea {
height: 30px;
width: 400px;
margin: 8px 0;
border-radius: 7px;
}
-table {
- border-collapse: collapse;
- margin: 25px 0;
- font-size: 0.9em;
- font-family: sans-serif;
- min-width: 400px;
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
-}
-td {
- text-align: left;
- padding: 8px;
-}
-th {
- text-align: left;
- padding: 8px;
- background-color: #4B86EE;
- color: white;
-}
-th:first-of-type {
- border-top-left-radius: 10px;
- color: white;
-}
-th:last-of-type {
- border-top-right-radius: 10px;
- color: white;
-}
-
-tr:last-of-type td:first-of-type {
- border-bottom-left-radius: 10px;
-
-}
-
-tr:last-of-type td:last-of-type {
- border-bottom-right-radius: 10px;
-}
-
-tr:nth-child(even) {
- background-color: #bec8d3;
-}
-
-tr:nth-child(odd) {
- background-color: whitesmoke;
-}
-
-html {
- height: 100%;
- /* for the page to take full window height */
- box-sizing: border-box;
-
- /* to have the footer displayed at the bottom of the page without scrolling */
- font-family: arial, sans-serif;
-
-}
*,
*:before,
color: #4B86EE;
}
-.row {
- display: flex;
-}
-
-.column {
- flex: 50%;
- padding: 5px;
-}
-
.topnav {
background-color: #333;
overflow: hidden;
-.success {
- padding: 10px;
- background-color: #208120;
- /* Red */
- color: white;
- margin-bottom: 15px;
- margin-top: 15px;
- border-radius: 7px;
- width: 100%;
-}
-
-.information {
- padding: 10px;
- background-color: #245788;
- /* Red */
- color: white;
- margin-bottom: 15px;
- margin-top: 15px;
- border-radius: 7px;
- width: 100%;
-}
-
/* The close button */
.closebtn {
margin-left: 15px;
<?php
require_once "common.php";
-
require_once "header.php";
if (!empty($_POST)) {
/* Get the user list */
$users = $rpc->user()->getAll();
?>
+<h4>Users Overview</h4>
+
<div id="Users">
- <table class='users_filter'>
- <th class="thuf">Filter by: </th>
- <th>
- <form action="users.php" method="post">
- Nick: <input name="uf_nick" id="uf_nick" type="text">
- <input class="cute_button2" type="submit" value="Search">
- </form>
- </th>
- <th>
- <form action="" method="post">
- Hostname: <input name="uf_host" id="uf_host" type="text">
- <input class="cute_button2" type="submit" value="Search">
- </form>
- </th>
- <th>
- <form action="" method="post">
- IP: <input name="uf_ip" id="uf_ip" type="text">
- <input class="cute_button2" type="submit" value="Search">
- </form>
- </th>
- <th class="thuffer">
- <form action="" method="post">
- Account: <input name="uf_account" id="uf_account" type="text">
- <input class="cute_button2" type="submit" value="Search">
- </form>
- </th>
- </form>
- </table>
+
<?php
if (isset($_POST['uf_nick']) && strlen($_POST['uf_nick']))
Message::Info("Listing users which match nick: \"" . $_POST['uf_nick'] . "\"");
Message::Info("Listing users which match account: \"" . $_POST['uf_account'] . "\"");
?>
-
- <table class="table">
- <thead>
- <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>
+ <table class="table table-responsive caption-top table-striped">
+ <thead class="table-light">
+ <th scope="col"><h5>Filter:</h5></th>
+ <form action="" method="post">
+ <th scope="col" colspan="2">Nick <input name="uf_nick" type="text" class="form-control short-form-control">
+ <th scope="col" colspan="2">Host <input name="uf_host" type="text" class="form-control short-form-control"></th>
+ <th scope="col" colspan="2">IP <input name="uf_ip" type="text" class="form-control short-form-control"></th>
+ <th scope="col" colspan="2">Account <input name="uf_account" type="text" class="form-control short-form-control"></th>
+ <th scope="col"> <input class="btn btn-primary" type="submit" value="Search"></th></form>
+ </thead><thead class="table-primary">
+ <th scope="col"><input type="checkbox" label='selectall' onClick="toggle_user(this)" />Select all</th>
+ <th scope="col">Nick</th>
+ <th scope="col">UID</th>
+ <th scope="col">Host / IP</th>
+ <th scope="col">Account</th>
+ <th scope="col">Usermodes <a href="https://www.unrealircd.org/docs/User_modes" target="_blank">ℹ️</a></th>
+ <th scope="col">Oper</th>
+ <th scope="col">Secure</th>
+ <th scope="col">Connected to</th>
+ <th scope="col">Reputation <a href="https://www.unrealircd.org/docs/Reputation_score" target="_blank">ℹ️</a></th>
</thead>
<tbody>
<form action="users.php" method="post">
<?php
+
foreach($users as $user)
{
continue;
echo "<tr>";
- echo "<td><input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\"></td>";
+ echo "<th scope=\"row\"><input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\"></th>";
$isBot = (strpos($user->user->modes, "B") !== false) ? ' <span class="badge-pill badge-dark">Bot</span>' : "";
echo "<td>".$user->name.$isBot.'</td>';
echo "<td>".$user->id."</td>";
echo "<td>".$user->user->reputation."</td>";
}
?>
- </tbody>
- </table>
- <label for="bantype">Apply action: </label><br>
+ </tbody></table>
+ <table class="table table-responsive table-light">
+ <tr>
+ <td colspan="2">
+ <label for="bantype">Apply action: </label>
<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></td><td colspan="2">
+ <label for="banlen_w">Duration: </label>
<select name="banlen_w" id="banlen_w">
<?php
for ($i = 0; $i <= 56; $i++)
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">
+ </select><br></td><tr><td colspan="3">
+
+ <label for="ban_reason">Reason: </label>
+ <input class="form-control short-form-control" type="text" name="ban_reason" id="ban_reason" value="No reason">
+ <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
+ Apply
+ </button></td></table>
+ <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="confirmModalCenterTitle" aria-hidden="true">
+ <div class="modal-dialog modal-dialog-centered" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h5 class="modal-title" id="myModalLabel">Apply ban</h5>
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <span aria-hidden="true">×</span>
+ </button>
+ </div>
+ <div class="modal-body">
+ Are you sure you want to do this?
+
+ </div>
+ <div class="modal-footer">
+ <button id="CloseButton" type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
+ <button type="submit" action="post" class="btn btn-danger">Ban Hammer</button>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
</form>
- </div
-</div>
+ </div>
+
+<script>
+
+ $("#myModal").on('shown.bs.modal', function(){
+ $("#CloseButton").focus();
+ });
+</script>
<?php require_once 'footer.php'; ?>