]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Users: make actions work again (broken when datatables were added 2d ago)
authorBram Matthys <redacted>
Tue, 25 Apr 2023 06:49:14 +0000 (08:49 +0200)
committerBram Matthys <redacted>
Tue, 25 Apr 2023 06:49:38 +0000 (08:49 +0200)
api/users.php
users/index.php

index 109386200a68e1a0320ca50573c6056c36276680..f516f12a719f48b2a9166d2da3b97869a52ce39d 100644 (file)
@@ -10,8 +10,6 @@ $users = $rpc->user()->getAll();
 $out = [];
 foreach($users as $user)
 {
-       // base64_encode($user->id)
-
        $isBot = (strpos($user->user->modes, "B") !== false) ? ' <span class="badge rounded-pill badge-dark">Bot</span>' : "";
        $nick = htmlspecialchars($user->name).$isBot;
 
@@ -35,7 +33,7 @@ foreach($users as $user)
        $nick = "<a href=\"details.php?nick=".$user->id."\">$nick</a>";
 
        $out[] = [
-               "Select" => "<input type=\"checkbox\" label='selectall' onClick=\"toggle_user(this)\" />", /* yeah ridiculous to have here in this file and the feed ;) */
+               "Select" => "<input type=\"checkbox\" value='" . base64_encode($user->id)."' name=\"userch[]\">", /* yeah ridiculous to have here in this file and the feed ;) */
                "Nick" => $nick,
                "Country" => $country,
                "Host/IP" => $hostip,
index 27f2250eefa4e02b06ce1d4bd350b546b5671738..0a3e7eb76ce000505d1832df834ba9c7bca5eb8e 100644 (file)
@@ -106,6 +106,8 @@ Click on a username to view more information.
 
        ?>
 
+       <form method="post">
+
        <!-- The user list -->
        <table id="data_list" class="table-striped display responsive nowrap" style="width:100%">
        <thead>