mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-05 09:53:12 +00:00
More bug fixes!
This commit is contained in:
parent
59b30d9d73
commit
be7d4b5b43
5 changed files with 30 additions and 22 deletions
13
account.php
13
account.php
|
@ -18,9 +18,18 @@
|
|||
<?php include __DIR__."/assets/ui/header.php"; ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php include __DIR__."/assets/ui/nav.php"; ?>
|
||||
<?php
|
||||
include __DIR__."/assets/ui/nav.php";
|
||||
|
||||
if (isset($_SESSION['err'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Woopsie', '<?php echo $_SESSION["err"]; ?>', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['err']);
|
||||
}
|
||||
|
||||
<?php
|
||||
if ($user_info->is_loggedin()) {
|
||||
?>
|
||||
<div class="defaultDecoration defaultSpacing defaultFonts">
|
||||
|
|
20
group.php
20
group.php
|
@ -11,15 +11,6 @@
|
|||
$group_info = new Group;
|
||||
$diff = new Diff();
|
||||
|
||||
if (isset($_SESSION['err'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd("Error", "<?php echo $_SESSION['msg']; ?>", "var(--warning)", "assets/icons/trash.svg");
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['err']);
|
||||
}
|
||||
|
||||
if (!empty($_GET['id']) && isset($_GET['id']) && $_GET['id'] != null) {
|
||||
$group = $group_info->get_group_info($conn, $_GET['id']);
|
||||
|
||||
|
@ -46,6 +37,15 @@
|
|||
<?php
|
||||
include __DIR__."/assets/ui/nav.php";
|
||||
|
||||
if (isset($_SESSION['err'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd("Error", "<?php echo $_SESSION['msg']; ?>", "var(--warning)", "assets/icons/trash.svg");
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['err']);
|
||||
}
|
||||
|
||||
if (isset($_SESSION['msg'])) {
|
||||
?>
|
||||
<script>
|
||||
|
@ -54,9 +54,7 @@
|
|||
<?php
|
||||
unset($_SESSION['msg']);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id']) && !empty($_GET['id'])) {
|
||||
$image_list = array_reverse(explode(" ", $group['image_list']));
|
||||
|
||||
|
|
16
image.php
16
image.php
|
@ -94,10 +94,10 @@
|
|||
<div class="defaultDecoration defaultSpacing defaultFonts">
|
||||
<h2>Description</h2>
|
||||
<?php
|
||||
if (empty($image['description'])) {
|
||||
if (empty($image['alt'])) {
|
||||
echo "<p>No description provided.</p>";
|
||||
} else {
|
||||
echo "<p>".$image['description']."</p>";
|
||||
echo "<p>".$image['alt']."</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
@ -109,13 +109,13 @@
|
|||
<?php
|
||||
// User
|
||||
if (empty($image['author'])) {
|
||||
if (isset($author['username'])) {
|
||||
echo "<p>Author: ".$author['username']."</p>";
|
||||
} else {
|
||||
echo "<p>Author: Deleted user</p>";
|
||||
}
|
||||
echo "<p>Author: No author</p>";
|
||||
} else {
|
||||
echo "<p>Author: <a href='profile.php?user=".$image['author']."' class='link'>".$author['username']."</a></p>";
|
||||
if (isset($author['username'])) {
|
||||
echo "<p>Author: <a href='profile.php?user=".$image['author']."' class='link'>".$author['username']."</a></p>";
|
||||
} else {
|
||||
echo "<p>Author: <a href='profile.php?user=".$image['author']."' class='link'>Deleted user</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
// Image ID
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
if (isset($_SESSION['err'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Error', '<?php echo $_SESSION["err"]; ?>', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
sniffleAdd('Woopsie', '<?php echo $_SESSION["err"]; ?>', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['err']);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
// Check if user is logged in
|
||||
if (!$user_info->is_loggedin()) {
|
||||
$_SESSION['err'] = "You must be logged in to upload images!!!!!!!!";
|
||||
header("location: account.php");
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue