diff options
Diffstat (limited to 'v3/aud')
| -rw-r--r-- | v3/aud/index.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/v3/aud/index.php b/v3/aud/index.php deleted file mode 100644 index 745a5b5..0000000 --- a/v3/aud/index.php +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="icon" type="image/x-icon" href="/favicon.ico"> - <title>/log/aud</title> - <link href="../style.css" rel="stylesheet" type="text/css" media="all"> - <style> - article { - display: flex; - align-items: center; - justify-content: space-between; - } - @media only screen and (hover: none) { - article { - flex-direction: column; - align-items: initial; - } - audio { - margin: 0.5rem; - } - } - </style> - </head> - <body> - <nav><a href="../"><<<</a></nav> - <p>$ pwd</p> - <h1 class="title">/log/aud</h1> - <p>$ ls -t</p> - <section class="dir"> - <?php - // Code to automatically populate the page with every mp3 file in the directory. - // Should display filename - and date of creation and id3 comment if possible. - - function test_audio($name) { // Returns true if a file is an mp3, false otherwise - return (strpos($name, ".mp3") > 0); - } - - $files = array_filter(scandir("../../noises/"), "test_audio"); - - usort($files, function($a, $b) { // Sort files by modification date of the files - return filemtime("../../noises/$b") - filemtime("../../noises/$a"); - }); - - foreach($files as $fi) { - //$fitime = filemtime("../../noises/$fi"); - $fisize = filesize("../../noises/$fi"); - echo "<article><span>$fi</span><audio controls><source src='../../noises/$fi' type='audio/mpeg'>your browser does not support embedded audio.</audio></article>"; - } - ?> - </section> - <p>$</p> - </body> - -</html> |
