| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- $CONFIG = array(
- "paths" => array(
- "/media/Serien",
- "/media/Filme"
- )
- );
- if(!isset($_GET['path']) || !$_GET['path']) {
- foreach($CONFIG['paths'] as $path) {
- echo "<h2>" . $path . "</h2>";
- $list = scandir($path);
- $list = array_diff($list, array('.'));
- foreach($list as $object) {
- echo "<a href=\"?path=" . $path . "/" . $object . "\">" . $object . "</a><br>";
- }
- }
- } else {
- echo "<h2>" . $_GET['path'] . "</h2>";
- if(is_dir($_GET['path'])) {
- $list = scandir($_GET['path']);
- $list = array_diff($list, array('.'));
- foreach($list as $object) {
- echo "<a href=\"?path=" . $_GET['path'] . "/" . $object . "\">" . $object . "</a><br>";
- }
- } else {
- echo "<video width=\"auto\" height=\"auto\" controls>";
- echo "<source src=\"readfile.php?file=" . $_GET['path'] . "\" type=\"video/mp4\">";
- echo "Your browser does not support the video tag.";
- echo "</video>";
- }
- }
- ?>
|