D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
markniuj
/
bazmeasar.com
/
Filename :
light.php
back
Copy
<?php include 'config.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>index.php Bazm-e-Asar</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="" name="keywords"> <meta content="" name="description"> <!-- Favicon --> <link rel="icon" type="image/x-icon" href="/img/mic.png"> <!-- 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=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/light.css" rel="stylesheet"> <style> table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; } .ashaar-card { border: 1px solid #ddd; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); transition: 0.3s; text-align: center; background-color: #f7f7f7; margin-top: 50px; padding: 10px; border-radius: 10px; } .ashaar-card:hover { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); } .ashaar-card-body { margin-top: 10px; margin-left: 10px; } .ashaar-card-img { width: 100%; height: 100%; } .ashaar-card-text { font-size: 14px; } </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> <!-- Navbar Start --> <?php include 'include/menu.php'; ?> <!-- Navbar End --> <!-- Carousel Start --> <!-- Carousel End --> <!----threebox---> <div class="box-container"> <!--box-col---start--> <div class="box-col"> <div class="box-data-heading">Live Audio Stream</div> <div class="box-data"> <a href="#"> <img src="img/live.png " alt="Girl in a jacket" width="100%" height="100%"></a> </div> </div> <!--box-col---end--> <!--box-col---start--> <div class="box-col"> <div class="box-data-heading">Next Majlis</div> <div class="box-data"> <iframe src="https://www.bazmeasar.com/site2024/next.php" width="100%" height="215" style="border:none;"> </iframe> </div> </div> <!--box-col---end--> <!--box-col---start--> <div class="box-col"> <div class="box-data-heading">Search</div> <div class="box-data"> <div class="col-lg-12 col-md-12"> <h4></h4> <!-- search Start --> <div class="search-audio"> <?php // Check if a search query is submitted if (isset($_GET['query'])) { $search_query = $_GET['query']; // Query to search for audio records by English title $query = "SELECT * FROM audio_files WHERE english_title LIKE '%$search_query%'"; $result = $conn->query($query); // Store matching audio records in an array if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $audio_records[] = $row; } } } // Close the database connection $conn->close(); ?> <!-- Search form --> <form method="get" action="searched.php"> <h1 style="font-size: 22px; color: #FFF; "></h1> <div class="position-relative mx-auto" style="max-width: 400px;"> <input class="form-control border-0 w-100 py-3 ps-4 pe-5" type="text" name="query" placeholder="Type Bayan keywords" value="<?php echo $search_query; ?>"> <button type="submit" class="btn btn-primary py-2 position-absolute top-0 end-0 mt-2 me-2">SEARCH</button> </div> </form> <!-- Display search results in a table --> <?php if (!empty($search_query)) { if (count($audio_records) > 0) { echo "<h2>Search Results for \"$search_query\":</h2>"; echo "<table border='1'>"; echo "<tr><th>English Title</th><th>Download</th></tr>"; foreach ($audio_records as $record) { $audio_id = $record["id"]; $audio_filename = $record["audio_filename"]; $english_title = $record["english_title"]; echo "<tr>"; echo "<td><a href='details.php?id=$audio_id'>$english_title</a></td>"; echo "<td><a href='download.php?audio_filename=$audio_filename' title='Download'><i class='fa fa-download'></i></a></td>"; echo "</tr>"; } echo "</table>"; } else { echo "<p>No results found for your search.</p>"; } } ?> </div> </div> </div> </div> </div> <!-- search End --> </div> <!--box-col---end--> </div> </div> <!----threebox---> <div class="container"> <h1>LISTEN, Download</h1> <?php // Fetch videos from the database $sql = "SELECT id, english_title, urdu_title, category, details, DATE(upload_date) AS upload_date, audio_filename FROM audio_files ORDER BY upload_date DESC LIMIT 3"; $result = $conn->query($sql); if ($result->num_rows > 0) { $counter = 0; // Initialize a counter while ($row = $result->fetch_assoc()) { if ($counter % 3 == 0) { echo '<div class="row">'; } echo '<div class="col-md-4">'; echo '<div class="card mb-4">'; echo '<div class="card-body">'; echo '<h3 class="card-title">' . $row['category'] . '</h3>'; echo '<h7 class="card-title">' . $row['upload_date'] . '</h7></br>'; echo '<h6 class="card-title">' . $row['english_title'] . '</h6>'; echo '<h7 class="card-title">' . $row['urdu_title'] . '</h7></br>'; echo '<h7 class="card-title">' . $row['details'] . '</h7>'; echo '<p class="card-text">' . $row['description'] . '</p>'; // Calculate the file size $audio_path = "admin/uploads/audio/" . $row['audio_filename']; $file_size = filesize($audio_path); $file_size_mb = number_format($file_size / (1024 * 1024), 2); echo "<p>File Size: $file_size_mb MB</p>"; echo "<audio controls><source src='$audio_path' type='audio/mpeg'></audio>"; echo "<center><a href='download.php?audio_filename=" . $row['audio_filename'] . "'>Download <i class='fa fa-download'></i></a></center>"; echo '</div>'; echo '</div>'; echo '</div>'; if ($counter % 3 == 2) { echo '</div>'; } $counter++; } if ($counter % 3 != 0) { echo '</div>'; // Close the row if it's not already closed } } else { echo "No videos found."; } // Close the database connection $conn->close(); ?> </div> <!-------------------------------------------------------------------> <!------------------------------------------------------------------> <!-- section Start --> <div class="container-xxl service py-5"> <div class="container"> <div class="text-center wow fadeInUp" data-wow-delay="0.1s"> <h1 style="margin-top: 0;font-size: 45px;color: #066737; margin-bottom: 0.5rem; font-family: " Barlow", sans-serif; font-weight: 700; line-height: 1.2; color: #0B2154;">LATEST BAYAN</h1> </div> <!-- Service heading end --> <div class="container"> <div class="row"> <div class="col-lg-12 col-md-6 wow fadeInUp" data-wow-delay="0.5s"> <div class="categories"> <?php // Query to select the 6 latest audio files $query = "SELECT id, english_title,category,DATE(upload_date) AS upload_date, audio_filename FROM audio_files ORDER BY upload_date DESC LIMIT 11"; $result = $conn->query($query); if ($result && $result->num_rows > 0) { echo "<table>"; echo "<tr><th>Bayan Name</th><th>Bayan Category</th><th>Date</th><th><center><center><i class='fa fa-download'></i></center></th></tr>"; while ($row = $result->fetch_assoc()) { $audio_id = $row['id']; $english_title = $row['english_title']; $category = $row['category']; $upload_date = $row['upload_date']; $audio_filename = $row['audio_filename']; echo "<tr>"; echo "<td>$english_title</td>"; echo "<td>$category</td>"; echo "<td>$upload_date</td>"; echo "<td><center><a href='download.php?audio_filename=$audio_filename'> new <i class='fa fa-download'></i></a></center></td>"; echo "</tr>"; } echo "</table>"; } else { echo "No audio files found."; } // Close the database connection $conn->close(); ?> <a href='audios.php'>View All</a> </div> </div> </div> </div> </div> <!----latest audios--- end-> <!---section area---start--> <!---section area---end--> </div> </div> </div> <!-- section End --> <!-- Fact Start --> <?php // Count total speakers $speakers_query = "SELECT COUNT(DISTINCT speaker) as total_speakers FROM audio_files"; $speakers_result = $conn->query($speakers_query); if ($speakers_result && $speakers_result->num_rows > 0) { $row = $speakers_result->fetch_assoc(); $total_speakers = $row["total_speakers"]; } // Count total categories $categories_query = "SELECT COUNT(DISTINCT category) as total_categories FROM audio_files"; $categories_result = $conn->query($categories_query); if ($categories_result && $categories_result->num_rows > 0) { $row = $categories_result->fetch_assoc(); $total_categories = $row["total_categories"]; } // Count total audio files $audio_files_query = "SELECT COUNT(*) as total_audio_files FROM audio_files"; $audio_files_result = $conn->query($audio_files_query); if ($audio_files_result && $audio_files_result->num_rows > 0) { $row = $audio_files_result->fetch_assoc(); $total_audio_files = $row["total_audio_files"]; } // Count total audio files $pdf_books_query = "SELECT COUNT(*) as total_pdf_books FROM pdf_books"; $pdf_books_result = $conn->query($pdf_books_query); if ($audio_files_result && $audio_files_result->num_rows > 0) { $row = $pdf_books_result->fetch_assoc(); $total_pdf_books = $row["total_pdf_books"]; } // Count total audio files $videos_query = "SELECT COUNT(*) as total_videos FROM videos"; $videos_result = $conn->query($videos_query); if ($videos_result && $videos_result->num_rows > 0) { $row = $videos_result->fetch_assoc(); $total_videos = $row["total_videos"]; } // Close the database connection $conn->close(); ?> <div class="container-fluid fact bg-dark my-5 py-5"> <div class="container"> <div class="row g-6"> <div class="col-md-6 col-lg-2 text-center wow fadeIn" data-wow-delay="0.1s"> <i class="fa fa-book fa-2x text-white mb-3"></i> <h2 class="text-white mb-2" data-toggle="counter-up"><?php echo $total_pdf_books; ?></h2> <p class="text-white mb-0">Total PDF BOOKS</p> </div> <div class="col-md-6 col-lg-3 text-center wow fadeIn" data-wow-delay="0.1s"> <i class="fa fa-microphone fa-2x text-white mb-3"></i> <h2 class="text-white mb-2" data-toggle="counter-up"><?php echo $total_speakers; ?></h2> <p class="text-white mb-0">Total Speakers</p> </div> <div class="col-md-6 col-lg-3 text-center wow fadeIn" data-wow-delay="0.5s"> <i class="fa fa-microphone fa-2x text-white mb-3"></i> <h2 class="text-white mb-2" data-toggle="counter-up"><?php echo $total_audio_files; ?></h2> <p class="text-white mb-0">Total Audios </p> </div> <div class="col-md-6 col-lg-2 text-center wow fadeIn" data-wow-delay="0.3s"> <i class="fa fa-users-cog fa-2x text-white mb-3"></i> <h2 class="text-white mb-2" data-toggle="counter-up"><?php echo $total_categories; ?></h2> <p class="text-white mb-0">Total Categories</p> </div> <div class="col-md-6 col-lg-2 text-center wow fadeIn" data-wow-delay="0.3s"> <i class="fa fa-play fa-2x text-white mb-3"></i> <h2 class="text-white mb-2" data-toggle="counter-up"><?php echo $total_videos; ?></h2> <p class="text-white mb-0">Total MP4</p> </div> </div> </div> </div> <!-- Fact End --> <!------------------> <!--- "1th Category_Saturday Bayan" => "Saturday Bayan", "2th Category_Friday Bayan" => "Friday Bayan", "3th Category_Taleem After Fajar" => "Taleem After Fajar" "4th Category_Taleem After Asar" => "Taleem After Asar", "5th Category_Asfaar" => "Asfaar", "6th Category_Malfoozat" => "Malfoozat" ---> <div class="container"> <div class="row"> <?php // Define the categories $categories = [ "Saturday Bayan" => "Saturday Bayan", "Friday Bayan" => "Friday Bayan", "Taleem After Fajar" => "Taleem After Fajar", "Taleem After Asar" => "Taleem After Asar", "Asfaar" => "Asfaar", "Malfoozat" => "Malfoozat", ]; foreach ($categories as $categoryTitle => $categoryName) { echo "<div class='col-md-4'>"; echo "<div class='h-title'>" . $categoryTitle . "</div>"; echo "<ul class='list-group'>"; // Retrieve and display the latest audio files for the category $query = "SELECT english_title, audio_filename FROM audio_files WHERE category = '$categoryName' ORDER BY id DESC LIMIT 6"; $result = $conn->query($query); while ($row = $result->fetch_assoc()) { echo "<li class='list-group-item d-flex justify-content-between align-items-center'>"; echo $row['english_title']; echo "<a href='download.php?audio_filename=" . $row['audio_filename'] . "' title='Download'>Download</a>"; echo "</li>"; } echo "</ul>"; echo "<a href='category.php?category=" . urlencode($categoryName) . "' class='btn btn-primary mt-3'>View All</a>"; echo "</div>"; } // Close the database connection $conn->close(); ?> </div> </div> </div> <!------------------> <!--- 6 categories start----> <?php // Query to retrieve all speakers and their record counts $categories_query = "SELECT category, COUNT(*) AS record_count FROM audio_files GROUP BY category LIMIT 0"; $categories_result = $conn->query($categories_query); ?> <div class="container"> <div class="row"> <?php if ($categories_result->num_rows > 0) { while ($category_row = $categories_result->fetch_assoc()) { $category = $category_row['category']; $record_count = $category_row['record_count']; ?> <div class="col-md-4"> <div class="categories-card"> <h4><?php echo $category; ?></h4> </h6> <p><?php echo $record_count; ?> Bayanat</p> <ol> <?php // Query to retrieve three English titles and download links for MP3 files under the category $records_query = "SELECT english_title, upload_date, audio_filename FROM audio_files WHERE category = '$category' ORDER BY upload_date DESC LIMIT 6"; $records_result = $conn->query($records_query); while ($record_row = $records_result->fetch_assoc()) { $english_title = $record_row['english_title']; $upload_date = $record_row['upload_date']; $audio_filename = $record_row['audio_filename']; ?> <li class='list-group-item d-flex justify-content-between align-items-center'> <?php echo $english_title; ?>-(<?php echo $upload_date; ?>)<a href="download.php?audio_filename=<?php echo $audio_filename; ?>">Download</a> </li> <?php } ?> </ol> <a href="category.php?category=<?php echo $category; ?>">View All</a> </div> </div> <?php } } else { echo "<p></p>"; } ?> </div> </div> <!---end 9 categories ----> <!-- books start --> <div class="text-center wow fadeInUp" data-wow-delay="0.1s"> <h6 class="text-primary text-uppercase"></h6> <h1 class="mb-5">Books Gallery</h1> </div> <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 LIMIT 5"; $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='admin/title_covers/{$row['title_cover']}' alt='Title Cover'></a>"; echo "<div class='pdf-details'>"; echo "<p><strong>Name:</br></strong> {$row['book_name']}</p>"; echo "<h3><center> <a href='pdf_download.php?file={$row['pdf_filename']}'><i class='fa fa-download'></i> Download</a></center></h3>"; echo "<p><strong>Author:</br></strong> {$row['book_author']}</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="books.php">View All Books</a> <!-- books end --> <!-----ashaar---اشعار-----> <div class="text-center wow fadeInUp" data-wow-delay="0.1s"> <h6 class="text-primary text-uppercase"></h6> <h1 class="mb-5">Ashaar (اشعار)</h1> </div> <div class="container mt-4"> <h1 class="text-center mb-4"></h1> <div class="row row-cols-1 row-cols-md-6 row-cols-lg-4"> <?php // Query to retrieve the latest 4 pictures ordered by date_of_picture in descending order $sql = "SELECT picture_path, date_of_picture, category FROM pictures ORDER BY id DESC LIMIT 4"; $result = $conn->query($sql); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo "<div class='ashaar-card'>"; echo "<div class='ashaar-img'>"; echo ' <a href="ashaar.php"><img src="admin/' . $row['picture_path'] . '" class="card-img" alt="Image"></a>'; echo "</div>"; echo "</div>"; } } else { echo "<tr><td colspan='6'>No PDFs found in the database.</td></tr>"; } ?> </div> </div> <!-----ashaar---اشعار-----> <!-- Team End --> <!----7th,8th,9th categories--> <!--- "7th Category_Other Places bayan" => "Other Places bayan", "8th Category_Zikar Majlis" => "Zikar Majlis", "9th Category_Important Malfoozat" => "Important Malfoozat" ---> <div class="container"> <div class="row"> <?php // Define the categories $categories = [ "Other Places bayan" => "Other Places bayan", "Zikar Majlis" => "Zikar Majlis", "Important Malfoozat" => "Important Malfoozat" ]; foreach ($categories as $categoryTitle => $categoryName) { echo "<div class='col-md-4'>"; echo '<div class="card-body">'; echo "<div class='h-title'>" . $categoryTitle . "</div>"; echo "<ul class='list-group'>"; // Retrieve and display the latest audio files for the category $query = "SELECT english_title, audio_filename FROM audio_files WHERE category = '$categoryName' ORDER BY id DESC LIMIT 3"; $result = $conn->query($query); while ($row = $result->fetch_assoc()) { echo "<li class='list-group-item d-flex justify-content-between align-items-center'>"; echo $row['english_title']; echo "<a href='download.php?audio_filename=" . $row['audio_filename'] . "' title='Download' class='btn btn-primary'><i class='fa fa-download'></i></a>"; echo "</li>"; } echo "</ul>"; echo "</div>"; echo "<a href='category.php?category=" . urlencode($categoryName) . "' class='btn btn-primary mt-3'>View More</a>"; echo "</div>"; } // Close the database connection $conn->close(); ?> </div> </div> <!-------------------------------------------------------------------> <!------------------------------------------------------------------> <!-- section Start --> <div class="container-xxl service py-5"> <div class="container"> <div class="text-center wow fadeInUp" data-wow-delay="0.1s"> <h1 style="margin-top: 0;font-size: 45px;color: #066737; margin-bottom: 0.5rem; font-family: " Barlow", sans-serif; font-weight: 700; line-height: 1.2; color: #0B2154;">SHORT CLIPS</h1> </div> <!-- Service heading end --> <!-----ashaar---اشعار-----> <div class="text-center wow fadeInUp" data-wow-delay="0.1s"> <h6 class="text-primary text-uppercase"></h6> <h1 class="mb-5">MP4 (شارٹ کلپس)</h1> </div> <div class="container mt-4"> <h1 class="text-center mb-4">Videos</h1> <div class="row row-cols-1 row-cols-md-6 row-cols-lg-4"> <?php // Query to retrieve the latest 4 videos ordered by id in descending order $sql = "SELECT vedio_name, vedio_img, vedio_category FROM videos ORDER BY id DESC LIMIT 4"; $result = $conn->query($sql); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo "<div class='ashaar-card'>"; echo "<div class='video-details'>"; echo "<p><strong></strong> {$row['vedio_name']}</p>"; echo "<img class='thumbnail' src='admin/video_img/{$row['vedio_img']}' alt='Video Thumbnail'>"; echo "</div>"; echo "</div>"; } } else { echo "<div class='col-md-12'><p>No videos found in the database.</p></div>"; } // Close the MySQLi connection $conn->close(); ?> </div> </div> </div> </div> </div> <!----7th,8th,9th categories--> </div> </div> <!-- 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>