Add back button, update filename display

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-15 00:10:12 +03:00
parent dc596e70ae
commit e30f1a8478
Signed by: mctaylors
GPG key ID: 68BA5E8A5D6D8744
4 changed files with 17 additions and 3 deletions

View file

@ -7,14 +7,16 @@
<meta name="viewport" content="initial-scale=0.75 user-scalable=no" />
</head>
<body>
<a class="card" href="..">
<img src="/assets/svg/arrow_back.svg" alt="" class="svg button" />
</a>
<?php
$request_uri = $_SERVER['REQUEST_URI'];
$filtered_request = urldecode(strtok(substr($request_uri, 1), '?'));
$filtered_request = urldecode(strtok(substr($_SERVER['REQUEST_URI'], 1), '?'));
foreach(glob($filtered_request . '*.mp3') as $file) {
echo '<a class="card" href="/' . $file . '">
<img src="artwork.jpg" alt="" />
<div class="content">
<span class="title">' . $file . '</span>
<span class="title">' . str_replace($filtered_request, '', $file) . '</span>
</div>
</a>';
}