From ec0391a150c45b4bb04d501e566d32227b5f1296 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sun, 2 Mar 2025 14:12:01 -0700 Subject: [PATCH] Remove user viewer --- webroot/api/fetchFile.php | 6 +- webroot/dashboard/account.php | 3 +- webroot/dashboard/admin/index.php | 3 +- webroot/dashboard/admin/users.php | 130 ----------------------------- webroot/dashboard/gallery.php | 3 +- webroot/dashboard/index.php | 3 +- webroot/dashboard/settings.php | 3 +- webroot/dashboard/upload-tools.php | 3 +- webroot/dashboard/upload.php | 3 +- 9 files changed, 9 insertions(+), 148 deletions(-) delete mode 100644 webroot/dashboard/admin/users.php diff --git a/webroot/api/fetchFile.php b/webroot/api/fetchFile.php index 6fc27fa..aff5cee 100644 --- a/webroot/api/fetchFile.php +++ b/webroot/api/fetchFile.php @@ -69,8 +69,7 @@ if (!$stmt->fetch()) { - '; + echo ''; } ?> @@ -207,8 +206,7 @@ $original_filename = base64_decode($original_filename); - '; + echo ''; } ?> diff --git a/webroot/dashboard/account.php b/webroot/dashboard/account.php index 9cd277f..c795494 100644 --- a/webroot/dashboard/account.php +++ b/webroot/dashboard/account.php @@ -54,8 +54,7 @@ $role_format = $role == 1 ? "Owner" : ($role == 2 ? "Admin" : ($role == 0 ? "Use - '; + echo ''; } ?> diff --git a/webroot/dashboard/admin/index.php b/webroot/dashboard/admin/index.php index fb4c560..88bc72c 100644 --- a/webroot/dashboard/admin/index.php +++ b/webroot/dashboard/admin/index.php @@ -120,8 +120,7 @@ $size = formatUnitSize($totalSize); - '; + echo ''; } ?> diff --git a/webroot/dashboard/admin/users.php b/webroot/dashboard/admin/users.php deleted file mode 100644 index 4d23f38..0000000 --- a/webroot/dashboard/admin/users.php +++ /dev/null @@ -1,130 +0,0 @@ -connect_error) { - die('Unable to access the database, please try again later'); -} - -if (!checkUserSession($conn)) { - setcookie('session', '', time(), "/", "", true, true); - header('Location: /dashboard/login.php'); - die(); -} - -$session = htmlspecialchars($_COOKIE['session']); - -$stmt = $conn->prepare("SELECT uid, username, email, api_key, role, discord_id FROM users WHERE session = ?"); -$stmt->bind_param("s", $session); -$stmt->execute(); -$stmt->bind_result($uid, $username, $email, $api_key, $role, $discord_id); -$stmt->fetch(); -$stmt->close(); - -if ($role !== 1 && $role !== 2) { - header('Location: /dashboard/'); - die(); -} - -checkDiscordLink($discord_id); - -$sql = "SELECT * FROM users"; -$result = $conn->query($sql); - -$conn->close(); - -function getRole($role) { - return $role == 1 ? "Owner" : ($role == 2 ? "Admin" : ($role == 0 ? "User" : "Unknown")); -} -?> - - - - - - - Xytriza's Uploading Service - Dashboard - - - - - - - - - - - - -
- -
-
-

Admin Panel

-

Manage users and settings

-
- - - - - - - - - - - fetch_assoc()) { - echo ""; - echo ""; - echo ""; - if ($row['role'] != 0 || $role != 1) { - echo ""; - } else { - echo ""; - } - echo ""; - if ($row['role'] != 0 || $role != 1) { - echo ""; - } else { - echo ""; - } - echo ""; - echo ""; - echo ""; - } - ?> -
UIDUsernameEmailDiscord IDIPRole
" . (!empty($row['uid']) ? htmlspecialchars($row['uid']) : "N/A") . "" . (!empty($row['username']) ? htmlspecialchars($row['username']) : "N/A") . "Hidden" . (!empty($row['discord_id']) ? htmlspecialchars($row['discord_id']) : "Not Synced") . "Hidden" . (!empty(getRole($row['role'])) ? htmlspecialchars(getRole($row['role'])) : "N/A") . ""; - echo "
-
- - \ No newline at end of file diff --git a/webroot/dashboard/gallery.php b/webroot/dashboard/gallery.php index 4da04a7..e240329 100644 --- a/webroot/dashboard/gallery.php +++ b/webroot/dashboard/gallery.php @@ -56,8 +56,7 @@ $conn->close(); - '; + echo ''; } ?> diff --git a/webroot/dashboard/index.php b/webroot/dashboard/index.php index fc88fae..ea79575 100644 --- a/webroot/dashboard/index.php +++ b/webroot/dashboard/index.php @@ -182,8 +182,7 @@ $news = str_ireplace('%storage%', $size, $news); - '; + echo ''; } ?> diff --git a/webroot/dashboard/settings.php b/webroot/dashboard/settings.php index 2d7624c..4582197 100644 --- a/webroot/dashboard/settings.php +++ b/webroot/dashboard/settings.php @@ -53,8 +53,7 @@ $conn->close(); - '; + echo ''; } ?> diff --git a/webroot/dashboard/upload-tools.php b/webroot/dashboard/upload-tools.php index 43d5b58..683deec 100644 --- a/webroot/dashboard/upload-tools.php +++ b/webroot/dashboard/upload-tools.php @@ -53,8 +53,7 @@ checkDiscordLink($discord_id); - '; + echo ''; } ?> diff --git a/webroot/dashboard/upload.php b/webroot/dashboard/upload.php index 6621194..04d6e9f 100644 --- a/webroot/dashboard/upload.php +++ b/webroot/dashboard/upload.php @@ -53,8 +53,7 @@ $conn->close(); - '; + echo ''; } ?>