From d89721502304e52808f285a054876f854bb018d7 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Thu, 13 Oct 2022 12:04:25 +0000 Subject: [PATCH] Remaking file structure for easier updating --- account.php | 8 +-- app/account/account.php | 14 ++--- app/app.php | 76 ++++++++++++++---------- app/{server => }/conn.php | 0 app/image/group.php | 2 +- app/image/image.php | 14 ++--- app/image/upload_image.php | 6 +- app/required.php | 6 +- app/{settings => }/settings.php | 2 +- css/main.css | 2 +- css/main.scss | 2 +- group.php | 54 ++++++++--------- image.php | 8 +-- index.php | 8 +-- profile.php | 12 ++-- upload.php | 6 +- {app/settings => usr/conf}/manifest.json | 2 +- 17 files changed, 119 insertions(+), 103 deletions(-) rename app/{server => }/conn.php (100%) rename app/{settings => }/settings.php (86%) rename {app/settings => usr/conf}/manifest.json (97%) diff --git a/account.php b/account.php index c798579..37d3831 100644 --- a/account.php +++ b/account.php @@ -41,8 +41,8 @@ "; + if (is_file("usr/images/pfp/".$profile_info['pfp_path'])) { + echo ""; } else { echo ""; } @@ -251,8 +251,8 @@ if ($user['admin'] || $user['id'] == 1) { echo "
"; } else { - echo "
"; - } + echo "
"; + } ?>

diff --git a/app/account/account.php b/app/account/account.php index 6509f8b..5f858e3 100644 --- a/app/account/account.php +++ b/app/account/account.php @@ -1,6 +1,6 @@ is_admin($conn, $id) == false) { - mysqli_query($conn,"UPDATE users SET admin = 1 WHERE id = 1"); - } } else { ?> Images: ".count(explode(" ", $group['image_list']))."

"; $upload_time = new DateTime($group['created_on']); - echo "

Created at: ".$upload_time->format('d/m/Y H:i:s T')."

"; + echo "

Created at: ".$upload_time->format(format: 'd/m/Y H:i:s T')."

"; ?> @@ -101,7 +101,7 @@ \ "; flyoutShow(header, description, actionBox); - + $("#titleForm").submit(function(event) { event.preventDefault(); var deleteSubmit = $("#deleteSubmit").val(); @@ -125,7 +125,7 @@ \ "; flyoutShow(header, description, actionBox); - + $("#titleForm").submit(function(event) { event.preventDefault(); var titleText = $("#titleText").val(); @@ -143,13 +143,13 @@ echo "
"; $image_request = mysqli_query($conn, "SELECT * FROM images"); - echo "
"; + echo ""; while ($image = mysqli_fetch_array($image_request)) { if (in_array($image['id'], $image_list)) { echo ""; } else { echo ""; - } + } } echo "
"; @@ -178,24 +178,24 @@ ?>
- src='images/'/> + src='usr/images/'/>
"; if ($_GET['mode'] == "edit") { - echo "