From 7f2e01a7f1550ce5947f0efc78bf6179f71b6b2f Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sun, 2 Oct 2022 10:38:29 +0000 Subject: [PATCH] Cleaned up some stuffs in profile and upload --- .gitignore | 4 ++- profile.php | 28 +++++++++---------- upload.php | 78 ++++++++++++++++++++++++++--------------------------- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.gitignore b/.gitignore index 96d84bb..75924df 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ images/ # CSS map, I don't think its needed for upload... I think? -*.map \ No newline at end of file +*.map + +.idea/ \ No newline at end of file diff --git a/profile.php b/profile.php index 495292b..634707f 100644 --- a/profile.php +++ b/profile.php @@ -10,8 +10,8 @@ $diff = new Diff(); if (!isset($_GET['user']) || empty($_GET['user'])) { - header("Location: index.php"); - } elseif (isset($_GET['user'])) { + header("Location: index.php"); + } else if (isset($_GET['user'])) { $user = $user_info->get_user_info($conn, $_GET['user']); $join_date = new DateTime($user['created_at']); @@ -34,11 +34,7 @@ echo ""; $pfp_colour = $make_stuff->get_image_colour("images/pfp/".$user['pfp_path']); - if (!empty($pfp_colour)) { - $pfp_colour = $pfp_colour; - } else { - $pfp_colour = "var(--bg-3)"; - } + if (empty($pfp_colour)) $pfp_colour = "var(--bg-3)"; ?>