mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2024-12-26 17:36:09 +00:00
Guess what, even more bugs!
This commit is contained in:
parent
9212267777
commit
956758fa25
|
@ -387,13 +387,6 @@
|
|||
|
||||
if (empty($check_sanity) || !isset($check_sanity)) {
|
||||
echo "<p class='btn btn-good' style='outline: none;'>No errors! Lookin' good</p>";
|
||||
?>
|
||||
<style>
|
||||
.sanity-check {
|
||||
border-color: var(--page-accent);
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<style>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
if ($user_info->is_admin($conn, $_SESSION['id'])) {
|
||||
$check_sanity = $sanity->get_results();
|
||||
if (!empty($check_sanity) || isset($check_sanity)) {
|
||||
if (!empty($check_sanity)) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Uh oh', 'Website has not passed some Sanity checks, please check your settings for more information', 'var(--warning)', 'assets/icons/warning.svg');
|
||||
|
|
34
profile.php
34
profile.php
|
@ -74,21 +74,23 @@
|
|||
?>
|
||||
</div>
|
||||
|
||||
<div id="gallery" class="gallery-root defaultDecoration">
|
||||
<?php
|
||||
<?php
|
||||
|
||||
// Reading images from table
|
||||
$sql = "SELECT * FROM images WHERE author = ? ORDER BY id DESC";
|
||||
// Reading images from table
|
||||
$sql = "SELECT * FROM images WHERE author = ? ORDER BY id DESC";
|
||||
|
||||
if ($stmt = mysqli_prepare($conn, $sql)) {
|
||||
// Bind variables to the prepared statement as parameters
|
||||
mysqli_stmt_bind_param($stmt, "i", $param_user_id);
|
||||
|
||||
$param_user_id = $_GET['user'];
|
||||
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
|
||||
if (mysqli_num_rows($query) != 0) {
|
||||
echo "<div id='gallery' class='gallery-root defaultDecoration'>";
|
||||
|
||||
if ($stmt = mysqli_prepare($conn, $sql)) {
|
||||
// Bind variables to the prepared statement as parameters
|
||||
mysqli_stmt_bind_param($stmt, "i", $param_user_id);
|
||||
|
||||
$param_user_id = $_GET['user'];
|
||||
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
|
||||
while ($image = mysqli_fetch_array($query)) {
|
||||
// Getting thumbnail
|
||||
if (file_exists("images/thumbnails/".$image['imagename'])) {
|
||||
|
@ -109,9 +111,11 @@
|
|||
</div>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
var postCount = $("#gallery").children().length;
|
||||
|
|
Loading…
Reference in a new issue