mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-05 09:53:12 +00:00
Fix Froups not displaying correct time and other
This commit is contained in:
parent
436a49e3ed
commit
3b24876900
9 changed files with 100 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"license": "GPL 3.0",
|
||||
"version": "22.10.19",
|
||||
"version": "22.10.20",
|
||||
"branch": "main"
|
||||
}
|
|
@ -113,10 +113,13 @@ if (isset($_POST['submit_description'])) {
|
|||
|
||||
// Attempt to execute the prepared statement
|
||||
if (mysqli_stmt_execute($stmt)) {
|
||||
$_SESSION['msg'] = "Description has been updated successfully!";
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Success!!!', 'Description has been updated successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
|
||||
flyoutClose();
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 500);
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
|
@ -174,10 +177,13 @@ if (isset($_POST['submit_tags'])) {
|
|||
|
||||
// Attempt to execute the prepared statement
|
||||
if (mysqli_stmt_execute($stmt)) {
|
||||
$_SESSION['msg'] = "Tags have been modified successfully!";
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Success!!!', 'Tags have been modified successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
|
||||
flyoutClose();
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 500);
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
|
@ -230,10 +236,13 @@ if (isset($_POST['submit_author'])) {
|
|||
|
||||
// Attempt to execute the prepared statement
|
||||
if (mysqli_stmt_execute($stmt)) {
|
||||
$_SESSION['msg'] = "The Author has been updated successfully!";
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Success!!!', 'The Author has been updated successfully! You may need to refresh the page to see the new information.', 'var(--success)', 'assets/icons/check.svg');
|
||||
flyoutClose();
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 500);
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
|
|
37
css/main.css
37
css/main.css
|
@ -49,11 +49,12 @@ nav {
|
|||
justify-content: space-between;
|
||||
margin: 0 auto 1rem;
|
||||
padding: 0.5rem;
|
||||
width: calc(100% - 1.4rem);
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background-color: rgba(21, 21, 21, 0.7333333333);
|
||||
-webkit-backdrop-filter: blur(69px) saturate(100%) brightness(100%);
|
||||
backdrop-filter: blur(69px) saturate(100%) brightness(100%);
|
||||
box-sizing: border-box;
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
z-index: 99;
|
||||
|
@ -157,7 +158,8 @@ nav .btn {
|
|||
.defaultSpacing {
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem 0.5rem 0 0.5rem;
|
||||
width: calc(100% - 1.4rem);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.defaultSpacing > * {
|
||||
margin-top: 0;
|
||||
|
@ -814,6 +816,7 @@ nav .btn {
|
|||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.bans {
|
||||
|
@ -868,6 +871,7 @@ nav .btn {
|
|||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.user-settings {
|
||||
|
@ -925,6 +929,7 @@ nav .btn {
|
|||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.btn-code {
|
||||
|
@ -1057,9 +1062,13 @@ body * {
|
|||
border-radius: 3px;
|
||||
}
|
||||
.btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
outline: none;
|
||||
z-index: 1;
|
||||
filter: brightness(0.5) grayscale(0.3);
|
||||
}
|
||||
.btn:disabled img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.btn {
|
||||
|
@ -1212,4 +1221,26 @@ a.link:hover {
|
|||
* {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
.hr {
|
||||
margin: 0.5rem 0;
|
||||
border: none;
|
||||
border-top: 0.2rem solid #E8E3E3;
|
||||
}
|
||||
|
||||
.hr-full {
|
||||
margin-left: -0.5rem;
|
||||
margin-right: -0.5rem;
|
||||
}
|
||||
|
||||
.hr-bad {
|
||||
border-color: #B66467;
|
||||
}
|
||||
|
||||
.hr-warning {
|
||||
border-color: #D8A657;
|
||||
}
|
||||
|
||||
.hr-good {
|
||||
border-color: #8C977D;
|
||||
}/*# sourceMappingURL=main.css.map */
|
|
@ -115,9 +115,16 @@ body {
|
|||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
outline: none;
|
||||
|
||||
z-index: 1;
|
||||
|
||||
filter: brightness(0.5) grayscale(0.3);
|
||||
|
||||
img {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,4 +303,26 @@ a.link {
|
|||
* {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.hr {
|
||||
margin: 0.5rem 0;
|
||||
|
||||
border: none;
|
||||
border-top: $border-thickness solid $fg;
|
||||
}
|
||||
|
||||
.hr-full {
|
||||
margin-left: -0.5rem;
|
||||
margin-right: -0.5rem;
|
||||
}
|
||||
|
||||
.hr-bad {
|
||||
border-color: $warning;
|
||||
}
|
||||
.hr-warning {
|
||||
border-color: $alert;
|
||||
}
|
||||
.hr-good {
|
||||
border-color: $page-accent;
|
||||
}
|
|
@ -823,6 +823,7 @@
|
|||
background-color: $bg;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.bans {
|
||||
|
@ -885,6 +886,7 @@
|
|||
background-color: $bg;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.user-settings {
|
||||
|
@ -951,6 +953,7 @@
|
|||
background-color: $bg;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.btn-code {
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
margin-bottom: 1rem;
|
||||
padding: 0.5rem 0.5rem 0 0.5rem;
|
||||
|
||||
width: calc(100% - 1.4rem);
|
||||
width: 100%;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
>* {
|
||||
margin-top: 0;
|
||||
|
|
|
@ -10,12 +10,14 @@ nav {
|
|||
margin: 0 auto 1rem;
|
||||
padding: 0.5rem;
|
||||
|
||||
width: calc(100% - 1.4rem);
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
background-color: $bg-alt;
|
||||
backdrop-filter: blur(69px) saturate(100%) brightness(100%);
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
position: sticky;
|
||||
z-index: 99;
|
||||
top: 1rem;
|
||||
|
|
|
@ -76,11 +76,11 @@
|
|||
|
||||
if (!empty($group['image_list'])) echo "<p>Images: ".count(explode(" ", $group['image_list']))."</p>";
|
||||
|
||||
$upload_time = new DateTime($group['created_on']);
|
||||
echo "<p id='updateTime'>Created at: ".$upload_time->format(format: 'd/m/Y H:i:s T')."</p>";
|
||||
|
||||
echo "<p id='updateTime'>Created at: ".$group['created_at']->format('d/m/Y H:i:s T')."</p>";
|
||||
?>
|
||||
<script>
|
||||
var updateDate = new Date('<?php echo $upload_time->format(format: 'm/d/Y H:i:s T'); ?>');
|
||||
var updateDate = new Date('<?php echo $group['created_at']->format('m/d/Y H:i:s T'); ?>');
|
||||
updateDate = updateDate.toLocaleDateString('en-GB', {year: 'numeric', month: 'short', day: 'numeric'});
|
||||
$("#updateTime").html("Created at: "+updateDate);
|
||||
</script>
|
||||
|
@ -254,7 +254,7 @@
|
|||
</script>
|
||||
<?php
|
||||
echo "</div>";
|
||||
} elseif (empty($image_list[0])) {
|
||||
} elseif ($image_list == null) {
|
||||
echo "<div class='info-text defaultFonts' style='text-align: center !important;'>
|
||||
<h1>Nothing here!</h1>
|
||||
<p>There are no images in the group, add some!</p>
|
||||
|
|
11
image.php
11
image.php
|
@ -49,6 +49,15 @@
|
|||
<?php
|
||||
include __DIR__."/assets/ui/nav.php";
|
||||
|
||||
if (isset($_SESSION['msg'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd("Gwa Gwa", "<?php echo $_SESSION['msg']; ?>", "var(--success)", "assets/icons/trash.svg");
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['msg']);
|
||||
}
|
||||
|
||||
echo "<div class='fullscreen-image'>
|
||||
<button onclick='closeFullScreen()'><img src='assets/icons/cross.svg'></button>
|
||||
<img>
|
||||
|
@ -125,7 +134,7 @@
|
|||
echo "<p>ID: ".$image['id']."</p>";
|
||||
}
|
||||
|
||||
$upload_time = new DateTime($image['upload_date']);
|
||||
$upload_time = new DateTime();
|
||||
echo "<p id='updateTime'>Uploaded at: ".$upload_time->format('d/m/Y H:i:s T')."</p>";
|
||||
?>
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue