D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
self
/
root
/
home
/
markniuj
/
bazmeasar.com
/
Filename :
ashaar.php
back
Copy
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Image Gallery</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css"> <style> .image-item { border: 1px solid #ddd; padding: 15px; margin: 10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); transition: 0.3s; } .image-item:hover { box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); } .date-info { display: flex; justify-content: space-between; color: green; } .date-label { color: green; } </style> </head> <body> <div class="container mt-4"> <h1 class="text-center mb-4">Image Gallery</h1> <a href="ashaar_summary.php">ashaar_summary</a> <div class="row row-cols-1 row-cols-md-2 row-cols-lg-4"> <?php include 'config.php'; // Query to retrieve images with a limit $sql = "SELECT picture_path, date_of_picture, category FROM pictures ORDER BY id DESC LIMIT 12"; $result = $conn->query($sql); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo '<div class="col mb-4">'; echo '<div class="image-item">'; $folderName = 'admin'; // Set your folder name here $imagePath = $folderName . '/' . $row['picture_path']; // Concatenate folder name and path echo '<img src="' . $imagePath . '" class="img-fluid" alt="Image">'; echo '<div class="date-info">'; echo '<span class="date-label">Date of Picture:</span>'; echo '<span>' . $row['date_of_picture'] . '</span>'; echo '</div>'; echo '</div>'; echo '</div>'; } } else { echo "No images found."; } $conn->close(); ?> </div> </div> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script> <script> $(document).ready(function () { $("#filterButton").click(function () { var selectedCategory = $("#categorySelect").val(); var url = "display_images.php?category=" + selectedCategory; window.location.href = url; }); }); </script> </body> </html>