Skip to content

Commit

Permalink
🔧 Renamed variables in banned panel
Browse files Browse the repository at this point in the history
  • Loading branch information
anditv21 committed Oct 23, 2023
1 parent 3f19238 commit 3356b13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/admin/bans.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

// if post request
if (Util::securevar($_SERVER["REQUEST_METHOD"]) === "POST") {
if (isset($_POST["u"])) {
$user = Util::securevar($_POST["u"]);
if (isset($_POST["user"])) {
$user = Util::securevar($_POST["user"]);
}
if (isset($_POST["r"])) {
$reason = Util::securevar($_POST["r"]);
if (isset($_POST["reasoon"])) {
$reason = Util::securevar($_POST["reason"]);
}

if (isset($user)) {
Expand Down Expand Up @@ -58,7 +58,7 @@
<?php if (Session::isAdmin()) : ?>
<form action="<?php Util::display(Util::securevar($_SERVER["PHP_SELF"]));; ?>" method="post">
<label for="u">Select a user:</label><br>
<select class="form-control form-control-sm" id="u" name="u">
<select class="form-control form-control-sm" id="user" name="user">
<br>
<?php foreach ($userList as $row) : ?>
<?php Util::display(
Expand All @@ -72,7 +72,7 @@
</select>
<br>
<label>Ban reason:</label><br>
<input autocapitalize="off" autocomplete="off" type="text" class="form-control form-control-sm" placeholder="Eg: security ban" id="r" name="r">
<input autocapitalize="off" autocomplete="off" type="text" class="form-control form-control-sm" placeholder="Eg: security ban" id="reason" name="reason">
<br>
<button class="btn btn-outline-primary btn-block" id="submit" type="submit" value="submit">Ban/Unban user</button>
</form>
Expand Down

0 comments on commit 3356b13

Please sign in to comment.