upgraded to file manager
This commit is contained in:
parent
36e534be13
commit
4a71f92328
9 changed files with 134 additions and 103 deletions
16
local/filemgr/get-media.php
Normal file
16
local/filemgr/get-media.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
$_shared = $_SERVER["DOCUMENT_ROOT"]."/templates";
|
||||
require "$_shared/lib.php";
|
||||
$_title = "Media viewer";
|
||||
require "$_shared/header.php";
|
||||
$urlsBase = __DIR__."/files/media/urls";
|
||||
if (isset($_GET["list"])) {
|
||||
$file = "$urlsBase/".$_GET["list"];
|
||||
$urls = json_decode(file_get_contents($file));
|
||||
header("Location: ".$urls[array_rand($urls)]);
|
||||
} else foreach (scandir($urlsBase) as $list) {
|
||||
if ($list[0] === '.') continue;
|
||||
echo "<a href='?list=$list'>Hub $list</a><br>\n";
|
||||
}
|
||||
require "$_shared/footer.php";
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue