D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
markniuj
/
bazmeasar.com
/
admin
/
uploads
/
quran
/
Filename :
index.php
back
Copy
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>MP3 Files</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="" name="keywords"> <meta content="" name="description"> <!-- Bootstrap CSS --> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <style> audio { border: none; outline: none; width: 100%; max-width: 100%; background-color: aliceblue; } </style> </head> <body> <div class="container"> <h1 class="mt-4 mb-4">Quran chapters in audio MP3 Files</h1> <a class="nav-link" href="forkids.php">Quran MP3 chapter-30 for kids</a> <div class="row"> <?php $mp3Directory = './audio'; // Change this to your MP3 files directory $mp3Files = glob($mp3Directory . '/*.mp3'); foreach ($mp3Files as $mp3File) { $imageFile = str_replace('.mp3', '.png', $mp3File); // Assuming image has .png extension $imageExists = file_exists($imageFile); echo '<div class="col-md-4">'; echo '<div class="card mb-4 shadow-sm">'; echo '<div class="card-body">'; // Display file name as the card title echo '<h5 class="card-title">' . basename($mp3File) . '</h5>'; // Display image if it exists if ($imageExists) { echo '<img src="' . $imageFile . '" class="img-fluid mb-2" alt="Image">'; } // Embed audio player echo '<audio controls>'; echo '<source src="' . $mp3File . '" type="audio/mpeg">'; echo 'Your browser does not support the audio element.'; echo '</audio>'; // Download link echo '<div class="mt-2">'; echo '<a href="' . $mp3File . '" download class="btn btn-sm btn-primary">Download</a>'; echo '</div>'; echo '</div>'; // Close card-body echo '</div>'; // Close card echo '</div>'; // Close column } ?> </div> </div> <!-- Bootstrap JS and Popper.js --> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script> </body> </html>