D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
proc
/
thread-self
/
root
/
home
/
markniuj
/
bazmeasar.com
/
pdf
/
Filename :
gallery.php
back
Copy
<?php include "../config.php"; ?> <!DOCTYPE html> <html> <head> <title>Gallery</title> <link href="table.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet"> <link href="css.css" rel="stylesheet"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <style> p{ font-size: 15px; font-family: Arial, Helvetica, sans-serif;" } a { text-decoration: none; color: #edffb0; } a:hover { color: #ff00a6; } .thumbnail { width: 250px; height: 400px; } .pdf-item { position: relative; display: inline-block; margin: 10px; text-decoration: none; } .pdf-details { position: absolute; top: 0; left: 0; background: rgba(0, 0, 0, 0.7); color: #fff; padding: 5px; width: 100%; height: 90%; padding: 8px; opacity: 0; transition: opacity 0.3s; } .pdf-item:hover .pdf-details { opacity: 1; } .book-title { font-weight: bold; margin: 0; } .book-description { margin: 0; } </style> </head> <body> <h1>PDF Gallery</h1> <!-- Link to upload PDF --> <a href="upload.php">Upload PDF</a> <br> <a href="slider.php">Slider</a> <br> <!-- Bootstrap container --> <div class="container"> <div class="row"> <div class="col-md-4 marquee-container"> <div class="gallery-iteam"> <?php // SQL query to retrieve PDF information from the database $sql = "SELECT * FROM pdf_books ORDER BY upload_date DESC"; $result = $conn->query($sql); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo "<div class='pdf-item'>"; echo "<a href='pdf_download.php?file={$row['pdf_filename']}'><img class='thumbnail' src='title_covers/{$row['title_cover']}' alt='Title Cover'></a>"; echo "<div class='pdf-details'>"; echo "<p><strong>Name:</strong> {$row['book_name']}</p>"; echo "<p><strong>Author:</strong> {$row['book_author']}</p>"; echo "<p><strong>Details:</strong> {$row['description']}</p>"; echo "<h1><center> <a href='pdf_download.php?file={$row['pdf_filename']}'><i class='fa fa-download'></i> Download</a></center></h1>"; echo "<p><strong>Details:</strong> {$row['description']}</p>"; echo "</div>"; echo "</div>"; } } else { echo "<tr><td colspan='6'>No PDFs found in the database.</td></tr>"; } // Your existing code for closing the database connection and formatting file size ?> <!-- Add a link to the full gallery at the end of the marquee --> </div> </div> <a href="gallery.php">View Full Gallery</a> </body> </html>