From 0753e1867cc87a76876784eea798ba8b41857faf Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Sun, 20 Apr 2025 17:19:28 -0600 Subject: [PATCH] fixed bugs with old system for views/actions --- .gitignore | 1 + admin.php | 4 +- components/admin/user_view.php | 2 +- data/data/articles/1/article.md | 54 ++++++++++++++++++ data/data/profile_pictures/2025.jpg | Bin 0 -> 686703 bytes data/data/profile_pictures/5723948.jpeg | Bin 0 -> 420465 bytes .../data/profile_pictures/default-profile.png | Bin 0 -> 5600 bytes .../resources/HackNerdFontMono-Regular.woff | Bin 0 -> 1491640 bytes data/data/tmp/profile.jpg | Bin 0 -> 1556194 bytes data/data/vintagecoding-favicon.png | Bin 0 -> 7775 bytes index.php | 4 +- user.php | 2 +- 12 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 data/data/articles/1/article.md create mode 100644 data/data/profile_pictures/2025.jpg create mode 100644 data/data/profile_pictures/5723948.jpeg create mode 100644 data/data/profile_pictures/default-profile.png create mode 100644 data/data/resources/HackNerdFontMono-Regular.woff create mode 100644 data/data/tmp/profile.jpg create mode 100644 data/data/vintagecoding-favicon.png diff --git a/.gitignore b/.gitignore index 7fa09c7..ac53750 100755 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock /data/profile_pictures /data/articles /data/tmp +import.sql diff --git a/admin.php b/admin.php index 10f7d7d..2de845d 100644 --- a/admin.php +++ b/admin.php @@ -11,7 +11,7 @@ include_once 'components/head.php'; if (!isset($_SESSION['role_id'])) header('Location: user.php?view=login'); else if ($_SESSION['role_id'] >= contributor) - header('Location: user.php?action=view&user_id=' . $_SESSION['user_id']); + header('Location: user.php?view=display&user_id=' . $_SESSION['user_id']); include_once 'functions/admin_functions.php'; @@ -32,7 +32,7 @@ if (isset($_POST['action']) && isset($_POST['form_id']) || isset($_FILES['csv']) break; case 'view': - header('Location: user.php?action=view&user_id=' . $_POST['selected_users'][0]); + header('Location: user.php?view=display&user_id=' . $_POST['selected_users'][0]); } } } diff --git a/components/admin/user_view.php b/components/admin/user_view.php index f4a58a6..64919b7 100644 --- a/components/admin/user_view.php +++ b/components/admin/user_view.php @@ -41,7 +41,7 @@ function admin_user_view() foreach ($results as $key => $result) { $display .= ' - +