ID
User IP
@@ -111,9 +117,8 @@
}
?>
-
-
User settings
-
+
+
ID
@@ -196,12 +201,32 @@
var toggleAdminSubmit = $("#toggleAdminSubmit").val();
$("#sniffle").load("app/account/account.php", {
id: toggleAdminSubmit,
+ userId: ,
toggle_admin: toggleAdminSubmit
});
});
}
+
+
is_admin($conn, $_POST['userId'])) {
+ $is_admin = mysqli_query($conn, "SELECT * FROM users WHERE id = " . $_POST['id'] . " ORDER BY id DESC LIMIT 1");
- while ($user_info = mysqli_fetch_assoc($is_admin)) {
- $admin_status = $user_info['admin'];
- $username = $user_info['username'];
- }
-
- $sql = "UPDATE users SET admin = ? WHERE id = ?";
-
- if ($stmt = mysqli_prepare($conn, $sql)) {
- // Bind variables to the prepared statement as parameters
- mysqli_stmt_bind_param($stmt, "ii", $param_admin_status, $param_user_id);
-
- // Set parameters
- if ($admin_status) {
- $param_admin_status = 0;
- $admin_update_message = "removed from the admins list";
- } elseif (!$admin_status) {
- $param_admin_status = 1;
- $admin_update_message = "added to the admins list";
+ while ($user_info = mysqli_fetch_assoc($is_admin)) {
+ $admin_status = $user_info['admin'];
+ $username = $user_info['username'];
}
- $param_user_id = $_POST['id'];
- // Attempt to execute the prepared statement
- if (mysqli_stmt_execute($stmt)) {
- ?>
-
-
+
+
+
+
-
button {
+ margin-right: 0.5rem;
+ width: 33.33%;
+}
+.tabs > button:last-child {
+ margin-right: 0;
+}
+
+.active-tab {
+ background-color: #8C977D !important;
+}
+
.logs {
width: 100%;
- max-height: 21rem;
- min-height: auto;
+ height: 21rem;
padding: 0;
overflow-y: scroll;
- display: flex;
+ display: none;
flex-direction: column;
background-color: #151515;
border-radius: calc(0.25rem - (0.5rem + 3px));
@@ -687,11 +702,10 @@ nav .btn {
.bans {
width: 100%;
- max-height: 21rem;
- min-height: auto;
+ height: 21rem;
padding: 0;
overflow-y: scroll;
- display: flex;
+ display: none;
flex-direction: column;
background-color: #151515;
border-radius: calc(0.25rem - (0.5rem + 3px));
@@ -730,7 +744,7 @@ nav .btn {
}
.perm {
- border: 3px #B66467 solid;
+ border-left: #B66467 0.2rem solid;
}
.ban:first-of-type {
@@ -742,11 +756,10 @@ nav .btn {
.user-settings {
width: 100%;
- max-height: 21rem;
- min-height: auto;
+ height: 21rem;
padding: 0;
overflow-y: scroll;
- display: flex;
+ display: none;
flex-direction: column;
background-color: #151515;
border-radius: calc(0.25rem - (0.5rem + 3px));
@@ -788,7 +801,7 @@ nav .btn {
}
.is-admin {
- background-color: #8C977D !important;
+ border-left: #8C977D 0.2rem solid;
}
.user:first-of-type {
diff --git a/css/scss/_body.scss b/css/scss/_body.scss
index 8ae5521..2d03dfd 100644
--- a/css/scss/_body.scss
+++ b/css/scss/_body.scss
@@ -357,15 +357,30 @@
@include defaultFont();
}
+.tabs {
+ display: flex; flex-direction: row;
+
+ & > button {
+ margin-right: 0.5rem;
+ width: 33.33%;
+ }
+ & > button:last-child {
+ margin-right: 0;
+ }
+}
+.active-tab {
+ background-color: $page-accent !important;
+}
+
.logs {
width: 100%;
- max-height: 21rem; min-height: auto;
+ height: 21rem;
padding: 0;
overflow-y: scroll;
- display: flex; flex-direction: column;
+ display: none; flex-direction: column;
background-color: $bg;
border-radius: calc($rad - (0.5rem + 3px));
@@ -411,13 +426,13 @@
.bans {
width: 100%;
- max-height: 21rem; min-height: auto;
+ height: 21rem;
padding: 0;
overflow-y: scroll;
- display: flex; flex-direction: column;
+ display: none; flex-direction: column;
background-color: $bg;
border-radius: calc($rad - (0.5rem + 3px));
@@ -459,7 +474,7 @@
}
}
.perm {
- border: 3px $red solid;
+ border-left: $red 0.2rem solid;
}
.ban:first-of-type {
background-color: $bg;
@@ -469,13 +484,13 @@
.user-settings {
width: 100%;
- max-height: 21rem; min-height: auto;
+ height: 21rem;
padding: 0;
overflow-y: scroll;
- display: flex; flex-direction: column;
+ display: none; flex-direction: column;
background-color: $bg;
border-radius: calc($rad - (0.5rem + 3px));
@@ -520,7 +535,7 @@
}
}
.is-admin {
- background-color: $green !important;
+ border-left: $page-accent 0.2rem solid;
}
.user:first-of-type {
background-color: $bg;