D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
markniuj
/
bazmeasar.com
/
Filename :
category.php
back
Copy
<?php include 'config.php'; ?> <?php $records_per_page = 15; if (isset($_GET['category'])) { $category = urldecode($_GET['category']); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title><?php echo $category; ?></title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="" name="keywords"> <meta content="" name="description"> <!-- Favicon --> <link href="img/favicon.ico" rel="icon"> <!-- Google Web Fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Amiri+Quran&family=Noto+Nastaliq+Urdu:wght@600&display=swap" rel="stylesheet"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Barlow:wght@600;700&family=Ubuntu:wght@400;500&display=swap" rel="stylesheet"> <!-- Icon Font 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"> <!-- Libraries Stylesheet --> <link href="lib/animate/animate.min.css" rel="stylesheet"> <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet"> <link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" /> <!-- Customized Bootstrap Stylesheet --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Template Stylesheet --> <link href="css/style.css" rel="stylesheet"> <link href="css/css.css" rel="stylesheet"> <link href="audio/css.css" rel="stylesheet"> <style>/* Custom CSS for Pagination */ .pagination { margin-top: 20px; } .pagination .page-item .page-link { color: #007bff; background-color: #fff; border: 1px solid #dee2e6; } .pagination .page-item .page-link:hover { background-color: #e9ecef; } .pagination .page-item.active .page-link { z-index: 1; color: #fff; background-color: #007bff; border-color: #007bff; } .pagination .page-item.disabled .page-link { color: #6c757d; pointer-events: none; cursor: not-allowed; background-color: #fff; border-color: #dee2e6; } .urdu { font-family: 'Amiri Quran', serif; font-family: 'Noto Nastaliq Urdu', serif; font-size: 13px; text-align: center; } </style> </head> <body> <!-- Spinner Start --> <div id="spinner" class="show bg-white position-fixed translate-middle w-100 vh-100 top-50 start-50 d-flex align-items-center justify-content-center"> <div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status"> <span class="sr-only">Loading...</span> </div> </div> <!-- Spinner End --> <!-- Topbar Start --> <!-- Topbar End --> <!-- Navbar Start --> <?php include 'include/menu.php';?> <!-- Navbar End --> <!-- Service Start --> <div class="container-xxl service py-5"> <div class="container"> <div class="text-center wow fadeInUp" data-wow-delay="0.1s"> <h6 class="text-primary text-uppercase">// //</h6> <h1 class="mb-5"> <?php echo $category; ?></h1> </div> <div class="row g-4 wow fadeInUp" data-wow-delay="0.3s"> <div class="col-lg-12"> <div class="nav w-100 nav-pills me-12"> <?php include 'config.php'; $count_sql = "SELECT COUNT(*) AS total FROM audio_files WHERE category = '$category'"; $count_result = $conn->query($count_sql); $total_records = $count_result->fetch_assoc()['total']; $total_pages = ceil($total_records / $records_per_page); $page = isset($_GET['page']) ? $_GET['page'] : 1; $offset = ($page - 1) * $records_per_page; $sql = "SELECT * FROM audio_files WHERE category = '$category' ORDER BY id DESC LIMIT $offset, $records_per_page"; $result = $conn->query($sql); if ($result->num_rows > 0) { echo "<table>"; echo "<tr><th>Name</th><th>Dtae</th><th class='urdu'>اردو عنوان </th><th>Dee</th><th><i class='fa fa-download'></i></th></tr>"; while ($row = $result->fetch_assoc()) { echo "<tr>"; echo "<td><a href='details.php?id=" . $row['id'] . "'>" . $row['english_title'] . "</a></td>"; echo "<td>" . $row['a_date'] . "</td>"; echo "<td class='urdu'>" . $row['urdu_title'] . "</td>"; echo "<td><a href='details.php?id=" . $row['id'] . "'>View Details</a></td>"; echo "<td><a href='download.php?audio_filename=" . $row['audio_filename'] . "' title='Download'><i class='fa fa-download'></i></a></td>"; echo "</tr>"; } echo "</table>"; echo "<div class='pagination'>"; for ($i = 1; $i <= $total_pages; $i++) { echo "<a href='category.php?category=" . urlencode($category) . "&page=$i'>$i</a> "; } echo "</div>"; } else { echo "No records found for this category."; } $conn->close(); ?> </div> </div> </div> </div> </div> <!-- Service End --> <!-- Service End --> <!-- Footer Start --> <?php include 'include/footer.php';?> <!-- Footer End --> <!-- Back to Top --> <a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top"><i class="bi bi-arrow-up"></i></a> <!-- JavaScript Libraries --> <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 src="lib/wow/wow.min.js"></script> <script src="lib/easing/easing.min.js"></script> <script src="lib/waypoints/waypoints.min.js"></script> <script src="lib/counterup/counterup.min.js"></script> <script src="lib/owlcarousel/owl.carousel.min.js"></script> <script src="lib/tempusdominus/js/moment.min.js"></script> <script src="lib/tempusdominus/js/moment-timezone.min.js"></script> <script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script> <!-- Template Javascript --> <script src="js/main.js"></script> </body> </html> <?php } ?>