From 2d7d359cdeafb2b988462246c9122de064577b1f Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Tue, 8 Nov 2022 15:37:19 +0000 Subject: [PATCH] Automated loading of more logs Fixed other random bugs --- account.php | 100 ++++++++++++++++++++++++--------- app/account/account.php | 2 +- app/account/token.php | 21 +++++++ app/gallery.json | 2 +- app/sanity/check/_versions.php | 5 ++ app/sanity/sanity.php | 4 +- assets/ui/footer.php | 5 +- css/main.css | 50 ++++++++--------- css/main.scss | 10 ++-- css/scss/_body.scss | 40 +++++-------- css/scss/_footer.scss | 7 ++- 11 files changed, 151 insertions(+), 95 deletions(-) diff --git a/account.php b/account.php index 76f2c63..7ccb044 100644 --- a/account.php +++ b/account.php @@ -33,11 +33,7 @@

Profile

-
-

Profile Picture

- - -
+

Profile Picture

"; @@ -45,6 +41,10 @@ echo "profile picture"; } ?> +
+ + +
-

ID

User IP

Reason

Lenght

Time

diff --git a/app/account/account.php b/app/account/account.php index 4d61d23..fb10677 100644 --- a/app/account/account.php +++ b/app/account/account.php @@ -698,7 +698,7 @@ if (isset($_POST['account_delete_submit'])) { if (isset($_POST['pfp_submit'])) { if (isset($_SESSION['id'])) { // Root paths - $dir = "../../images/pfp/"; + $dir = "../../usr/images/pfp/"; // File name updating $file_type = pathinfo($dir.$_FILES['image']['name'],PATHINFO_EXTENSION); diff --git a/app/account/token.php b/app/account/token.php index 6449c48..3417da2 100644 --- a/app/account/token.php +++ b/app/account/token.php @@ -59,3 +59,24 @@ if (isset($_POST['delete'])) { } } } + +if (isset($_POST['refresh'])) { + if ($user_info->is_admin($conn, $_SESSION['id'])) { + $request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0"); + if (mysqli_num_rows($request) > 0) { + while ($token = mysqli_fetch_array($request)) { + ?> +
+ + + +
+ +

No invite codes/tokens :c

+
"; + } + } +} diff --git a/app/gallery.json b/app/gallery.json index 8e64c79..23c271e 100644 --- a/app/gallery.json +++ b/app/gallery.json @@ -1,5 +1,5 @@ { "license": "MIT", - "version": "22.11.06", + "version": "22.11.08", "branch": "main" } \ No newline at end of file diff --git a/app/sanity/check/_versions.php b/app/sanity/check/_versions.php index e25eb46..64bf5f6 100644 --- a/app/sanity/check/_versions.php +++ b/app/sanity/check/_versions.php @@ -39,6 +39,11 @@ if (defined('ROOT') && $_SESSION['id'] == 1) { 'link'=>'https://github.com/Fluffy-Bean/image-gallery', 'fix'=>'manual' ); + } else { + $results[] = array( + 'type'=>'success', + 'message'=>'You are running the latest version of the app v'.$app_repo['version'] + ); } if (PHP_VERSION_ID < 80000) { diff --git a/app/sanity/sanity.php b/app/sanity/sanity.php index def5d9f..9d570eb 100644 --- a/app/sanity/sanity.php +++ b/app/sanity/sanity.php @@ -54,8 +54,10 @@ if (isset($_POST['check'])) { foreach ($results as $result) { if ($result['type'] == 'critical') { echo "

Critical "; - } else { + } elseif ($result['type'] == 'warning') { echo "

Warning "; + } elseif ($result['type'] == 'success') { + echo "

Success "; } if ($result['fix'] == 'auto') { diff --git a/assets/ui/footer.php b/assets/ui/footer.php index 8e68a98..67915d2 100644 --- a/assets/ui/footer.php +++ b/assets/ui/footer.php @@ -24,14 +24,11 @@

diff --git a/css/main.css b/css/main.css index ef33833..a7a5bdd 100644 --- a/css/main.css +++ b/css/main.css @@ -729,37 +729,27 @@ nav .btn { |------------------------------------------------------------- */ .pfp-upload { + display: flex; + flex-direction: column; +} +.pfp-upload form { display: flex; flex-direction: row; + gap: 0.5rem; } .pfp-upload form > * { - margin: 0 0 0.5rem 0; -} -.pfp-upload form > *:last-child { - margin: 0 0 0 0; + margin: 0; } .pfp-upload > img { - margin-left: 0.5rem; - width: 8rem; - height: 8rem; + margin: 0 auto 1rem; + width: 12rem; + height: 12rem; -o-object-fit: cover; object-fit: cover; - float: right; border-radius: 3px; background-color: #121212; } -@media (max-width: 621px) { - .pfp-upload { - display: flex; - flex-direction: column-reverse; - } - .pfp-upload > img { - margin: 0 auto 1rem; - width: 12rem; - height: 12rem; - } -} .tabs { display: flex; flex-direction: row; @@ -946,7 +936,7 @@ nav .btn { position: relative; } .btn-code::before { - content: "Hover to show code"; + content: "Hover to reveal"; color: #E8E3E3; position: absolute; top: 50%; @@ -960,11 +950,11 @@ nav .btn { content: ""; } -.btn-code-reg { +.btn-icon { width: auto !important; display: inline-block !important; } -.btn-code-reg img { +.btn-icon img { margin: auto 2px; width: 1.25rem; height: 1.25rem; @@ -999,15 +989,18 @@ footer { text-transform: uppercase; display: flex; flex-direction: row; + flex-wrap: wrap; + justify-content: center; + gap: 0.5rem; } footer p { - margin: 0.2rem; + margin: 0; padding: 0; text-decoration: none; font-family: "Secular One", sans-serif; } footer a { - margin: 0.2rem; + margin: 0; padding: 0; text-decoration: none; font-family: "Secular One", sans-serif; @@ -1068,7 +1061,8 @@ body * { text-decoration: none; border: none; border-radius: 3px; - transition: outline 0.1s cubic-bezier(0.19, 1, 0.22, 1); + outline: #E8E3E3 0 solid; + transition: outline 0.1s; /* &::after { content: ""; @@ -1108,7 +1102,7 @@ body * { */ } .btn:where(input[type=file])::-webkit-file-upload-button { - margin: -0.25rem 0.5rem -0.25rem -0.25rem; + margin: -0.5rem 0.5rem -0.5rem -0.5rem; padding: 0.5rem; display: inline-block; font-size: 16px; @@ -1119,7 +1113,7 @@ body * { border-radius: 3px; } .btn:where(input[type=file])::file-selector-button { - margin: -0.25rem 0.5rem -0.25rem -0.25rem; + margin: -0.5rem 0.5rem -0.5rem -0.5rem; padding: 0.5rem; display: inline-block; font-size: 16px; @@ -1259,7 +1253,7 @@ a.btn { */ form { width: 100%; - box-sizing: content-box; + box-sizing: border-box; } form > * { margin-bottom: 0.5rem; diff --git a/css/main.scss b/css/main.scss index a3fcdc1..97392e1 100644 --- a/css/main.scss +++ b/css/main.scss @@ -85,7 +85,9 @@ body { border-radius: 3px; } - transition: outline 0.1s cubic-bezier(.19, 1, .22, 1); + outline: $fg 0 solid; + + transition: outline 0.1s; /* &::after { @@ -112,7 +114,7 @@ body { */ &:hover { - outline: $white 0.2rem solid; + outline: $fg $border-thickness solid; color: $fg; cursor: pointer; @@ -129,7 +131,7 @@ body { } &:where(input[type="file"])::file-selector-button { - margin: -0.25rem 0.5rem -0.25rem -0.25rem; + margin: -0.5rem 0.5rem -0.5rem -0.5rem; padding: 0.5rem; display: inline-block; @@ -301,7 +303,7 @@ a.btn { */ form { width: 100%; - box-sizing: content-box; + box-sizing: border-box; & > * { margin-bottom: 0.5rem; diff --git a/css/scss/_body.scss b/css/scss/_body.scss index da6626d..3375a9a 100644 --- a/css/scss/_body.scss +++ b/css/scss/_body.scss @@ -717,25 +717,26 @@ */ .pfp-upload { display: flex; - flex-direction: row; + flex-direction: column; - form > * { - margin: 0 0 0.5rem 0; - } - form > *:last-child { - margin: 0 0 0 0; + form { + display: flex; + flex-direction: row; + gap: 0.5rem; + + > * { + margin: 0; + } } & > img { - margin-left: 0.5rem; + margin: 0 auto 1rem; - width: 8rem; - height: 8rem; + width: 12rem; + height: 12rem; object-fit: cover; - float: right; - @if calc($rad - 0.5rem) > 0 { border-radius: calc($rad - 0.5rem); } @else { @@ -745,19 +746,6 @@ } } -@media (max-width: 621px) { - .pfp-upload { - display: flex; - flex-direction: column-reverse; - - & > img { - margin: 0 auto 1rem; - - width: 12rem; - height: 12rem; - } - } -} .tabs { display: flex; flex-direction: row; @@ -976,7 +964,7 @@ position: relative; &::before { - content: "Hover to show code"; + content: "Hover to reveal"; color: $fg; position: absolute; @@ -994,7 +982,7 @@ } } -.btn-code-reg { +.btn-icon { width: auto !important; display: inline-block !important; diff --git a/css/scss/_footer.scss b/css/scss/_footer.scss index 0485944..def0f47 100644 --- a/css/scss/_footer.scss +++ b/css/scss/_footer.scss @@ -13,9 +13,12 @@ footer { text-transform: uppercase; display: flex; flex-direction: row; + flex-wrap: wrap; + justify-content: center; + gap: 0.5rem; p { - margin: 0.2rem; + margin: 0; padding: 0; text-decoration: none; @@ -24,7 +27,7 @@ footer { } a { - margin: 0.2rem; + margin: 0; padding: 0; text-decoration: none;