add available files on epub tool

This commit is contained in:
quenousimporte 2024-09-16 16:35:26 +02:00
parent b89000197f
commit 2e5b2fb7c5
1 changed files with 23 additions and 3 deletions

View File

@ -706,9 +706,24 @@
</form>
</div>
<h1>Links</h1>
<a href="../epub">Fichiers générés</a><br>
<a href="../">Revue de presse</a><br>
<h1>Available files</h1>
<?php
if ($handle = opendir('epub')) {
echo "<ul>";
// Loop through the directory contents
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$filePath = 'epub/' . $file;
$modTime = date("F d Y H:i:s.", filemtime($filePath));
echo "<li><a href='$filePath' download>$file</a> - $modTime</li>";
}
}
echo "</ul>";
closedir($handle);
}
?>
<h1>Mediapart RSS summary</h1>
<?php
@ -720,5 +735,10 @@
echo '<div><a href="'.$item->link.'">'.$item->pubDate. ' '.$item->title.'</a></div>';
}
?>
<h1>Links</h1>
<a href="../epub">Generated files</a><br>
<a href="../">Press review</a><br>
</body>
</html>