Initial commit
This commit is contained in:
34
index.php
Normal file
34
index.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
require_once "src/util.php";
|
||||
|
||||
$files = [];
|
||||
$dirIter = new RecursiveDirectoryIterator("anime");
|
||||
$iter = new RecursiveIteratorIterator($dirIter);
|
||||
|
||||
foreach ($iter as $entry)
|
||||
{
|
||||
if ($entry->isFile())
|
||||
{
|
||||
$files[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Anime</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$path = $file->getPathName();
|
||||
$id = urlsafe_b64encode($path);
|
||||
echo "<li><a href=\"player.html#$id\">$path</a></li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user