mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-07-03 06:26:19 +00:00
Terrible terrible code
This commit is contained in:
parent
afdaab4e13
commit
59de59024c
2 changed files with 16 additions and 3 deletions
13
group.php
13
group.php
|
@ -309,6 +309,19 @@
|
|||
|
||||
$group_list = mysqli_query($conn, "SELECT * FROM groups ORDER BY id DESC");
|
||||
|
||||
if (empty($group_list) && !$_SESSION["loggedin"]) {
|
||||
?>
|
||||
<style>
|
||||
.gallery-root {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$('body').append("<div class='info-text defaultFonts'><h1>There are no groups yet</h1><p>Login to make a group!</p></div>");
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
foreach ($group_list as $group) {
|
||||
$image_list = array_reverse(explode(" ", $group['image_list']));
|
||||
$image = $image_info->get_image_info($conn, $image_list[array_rand($image_list, 1)]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue