SteemWatcher Portal New Updates - 17-Jul-2024

in Steem Dev3 days ago

Project Proposal Business Presentation in Dark Blue Pink Abstract Tech Style.jpg

Hello everyone!

We are excited to share a small but important development on Steemwatcher Portal. A Search Box on the Blacklisted User Page has been added. This new feature that will help to find the blacklisted users from the whole list easily.

New search box allow us to quickly and easily find specific users who have been blacklisted. It will enhances user management by providing fast and efficient way to search from the list. The search box has been designed by focusing to get the highly response.

When user will type in the search box then result will fetched dynamically and displaying matching usernames immediately. The search results include comprehensive details such as the username, the reason for blacklisting and the date of blacklisting. The search box provides instant feedback and ensuring we can quickly find and manage users.

image.png

Development Code for Dev interested users.

<script>
function fill(Value) {
   $('#search').val(Value);
   $('#display').hide();
}

$(document).ready(function() {
$("#search").keyup(function() {
var name = $('#search').val();
if (name == "") {
    $("#display").html("");
} else {
console.log("AJAX call made with search: " + name);
$.ajax({
type: "POST",
url: "searchuser.php",
data: {
 search: name
},
success: function(html) {
$("#display").html(html).show();
},
error: function(xhr, status, error) {
console.error("AJAX error: " + error);
}
  });
}
 });
});
</script>


if (isset($_POST['search'])) {
$Name = $_POST['search'];
$Query = "SELECT * FROM `table_name` WHERE `USERNAME` LIKE '%$Name%' ";
$ExecQuery = $conn->query($Query);

if ($ExecQuery === FALSE) {
    die("Error executing query: " . $conn->error);
}

echo '
<div class="table-responsive">
 <div class="card-body">
 <table id="table" class="table table-dark table-borderless">
  <thead class="table-dark">
   <tr>
    <th>No.</th>
    <th>Username</th>
    <th>Reason</th>
    <th>Date</th>
    </tr>
  </thead>
  <tbody>
';

$index = 1;
while ($Result = $ExecQuery->fetch_assoc()) {
    echo '
    <tr>
  <td>' . $index . '</td>
  <td>' . $Result['USERNAME'] . '</td>
  <td>' . $Result['REASON'] . '</td>
  <td>' . $Result['DATE'] . '</td>
    </tr>
    ';
    $index++;
}
echo '
     </tbody>
   </table>
 </div>
</div>
';
}




In the above code. AJAX has been used that allows the webpage to send and receive data asynchronously from the server. Users can get search results in real time as they type in the search box without needing to reload the entire page. We look forward to your feedback and are excited to bring you more updates soon!



Please cast witness vote to bangla.Witness or set proxy to rme.

_
Vote bangla.witness as witness
Set Proxy rme as proxy

Special Thanks.

Cc: @rme
Cc: @hungry-griffin
Cc: @steemcurator01
Cc: @steemchiller
Cc: @pennsif

Thanks for giving your precious time to my post.
Follow | Upvote | Share | Comments
Follow me on Instagram.
Instagram

🆃🅷🅰️🅽🅺 🆈🅾️🆄

Sort:  

Upvoted! Thank you for supporting witness @jswit.

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 67310.11
ETH 3522.28
USDT 1.00
SBD 2.71