|
Server IP : 2a02:4780:11:767:0:2c41:85d9:6 / Your IP : 216.73.217.91 Web Server : LiteSpeed System : Linux in-mum-web667.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64 User : u742491609 ( 742491609) PHP Version : 8.1.34 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u742491609/domains/apca.org.in/public_html/admin/inaugration/uploads/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
require '../connection.php';
// Fetch all sections with their image paths
$stmt = $pdo->query("SELECT * FROM inaugration ORDER BY created_at DESC");
$sections = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gallery</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
.image-gallery {
display: flex;
flex-wrap: wrap;
gap: 10px; /* Adjust the gap between images as needed */
}
.image-wrapper {
width: 300px; /* Adjust this width to your desired thumbnail size */
height: 200px; /* Adjust this height to your desired thumbnail size */
overflow: hidden; /* Ensure images do not overflow */
}
.thumbnail {
width: 100%;
height: auto;
object-fit: cover; /* Maintain aspect ratio and cover container */
}
td{
padding-right: 20px;
}
</style>
</head>
<body>
<div class="container mt-5">
<!--<h1>Gallery</h1>-->
<?php foreach ($sections as $section): ?>
<div class="card mt-3">
<div class="card-header">
<table>
<tr>
<td><h3><?php echo htmlspecialchars($section['title']); ?></h3></td>
<td><?php echo htmlspecialchars($section['category']); ?></td>
<td><?php echo htmlspecialchars($section['description']); ?></td>
</tr>
</table>
</div>
<div class="card-body">
<div class="row image-gallery">
<div class="col-md-3">
<div class="img-thumbnail image-wrapper">
<img src="<?php echo htmlspecialchars($section['image_path']); ?>" alt="Image" class="img-fluid thumbnail">
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>