| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- <?php
- require('functions.php');
- $httpUser = "yolo";
- $httpPassword = "amk";
- ?>
- <!DOCTYPE html>
- <html lang="de">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>WebVideoViewer</title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
- <style>
- h1 {
- font-size: 8vw;
- }
- #logo {
- margin: 0 auto;
- text-align: center;
- }
- #logo > img {
- width: 100%;
- }
- @media only screen and (min-width : 768px) {
- #logo > img {
- width: auto;
- height: 200px;
- }
- }
- .col-sm-3 > div > a > img {
- width: 100%;
- }
- .col-sm-3 {
- padding-bottom: 15px;
- min-height: 500px;
- }
- .col-sm-3.episode {
- min-height: 50px;
- }
- .col-sm-3.episode > div > a > img {
- min-height: 50px;
- max-height: 170px;
- }
- .col-sm-3.folder-up-episode img {
- max-height: 225px;
- }
- .image-zoom {
- overflow: hidden;
- }
- .image-zoom img {
- -webkit-transition: all 1s ease; /* Safari and Chrome */
- -moz-transition: all 1s ease; /* Firefox */
- -ms-transition: all 1s ease; /* IE 9 */
- -o-transition: all 1s ease; /* Opera */
- transition: all 1s ease;
- }
- .image-zoom:hover img {
- -webkit-transform:scale(1.15); /* Safari and Chrome */
- -moz-transform:scale(1.15); /* Firefox */
- -ms-transform:scale(1.15); /* IE 9 */
- -o-transform:scale(1.15); /* Opera */
- transform:scale(1.15);
- }
- .episode-title {
- padding-top: 15px;
- }
- @media only screen and (max-width : 480px) {
- .col-sm-3 {
- text-align: center;
- }
- }
- </style>
- </head>
- <body>
- <div id="logo">
- <img src="moeflix.png" alt="moeflix">
- </div>
- <div class="container-fluid">
- <?php
- $CONFIG = array(
- "paths" => array(
- "/media/Serien",
- "/media/Filme"
- )
- );
- if(!isset($_GET['path']) || !$_GET['path']) {
- foreach($CONFIG['paths'] as $path) {
- $folderName = split('/', $path);
- echo "<h1>" . $folderName[sizeof($folderName) - 1] . "</h1>";
- $list = scandir($path);
- $list = array_diff($list, array('.', '..'));
- echo "<div class=\"row\">";
- foreach($list as $object) {
- $name = str_split($object, sizeof($object));
- if($name[0] == "." && $name[1] != ".") {
- continue;
- }
- echo "<div class=\"col-sm-3\"><div class=\"image-zoom\">";
- echo "<a href=\"?path=" . $path . "/" . $object . "\">" . "<img class=\"img-responsive\" src=\"" . getImageByName($path . "/" . $object) . "\" alt=\"" . $object . "\">" . "</a>";
- echo "</div></div>";
- }
- echo "</div>";
- }
- } else {
- $_GET['path'] = str_replace('/..', '', $_GET['path']);
- $_GET['path'] = str_replace('../', '', $_GET['path']);
- $_GET['path'] = str_replace('..', '', $_GET['path']);
- echo "<h1>" . $_GET['path'] . "</h1>";
- if(is_dir($_GET['path'])) {
- $list = scandir($_GET['path']);
- $list = array_diff($list, array('.', 'queue.hbq'));
- echo "<div class=\"row\">";
- foreach($list as $object) {
- $name = explode('.', $object);
- if($name[sizeof($name) - 1] == "srt") {
- continue;
- }
- $name = str_split($object, sizeof($object));
- if($name[0] == "." && $name[1] != ".") {
- continue;
- }
- if($object == "..") {
- if(in_array($_GET['path'], $CONFIG['paths'])) {
- echo "<div class=\"col-sm-3\"><div class=\"image-zoom\">";
- echo "<a href=\"?path=\"><img src=\"folder_up.png\" alt=\"folder up\"></a>";
- echo "</div></div>";
- } else {
- $paths = explode('/', $_GET['path']);
- $season = $paths[sizeof($paths) - 1];
- $paths = array_diff($paths, array($paths[sizeof($paths) - 1]));
- $pathv = "";
- foreach($paths as $key => $path) {
- if($key == sizeof($paths) - 1) {
- $pathv .= $path;
- } else {
- $pathv .= $path . "/";
- }
- }
- if(preg_match_all("/(S[0-9]+)/", $season, $output)) {
- echo "<div class=\"col-sm-3 episode folder-up-episode\"><div class=\"image-zoom\">";
- echo "<a href=\"?path=" . $pathv . "\"><img src=\"folder_up.png\" alt=\"folder up\"></a>";
- echo "</div></div>";
- } else {
- echo "<div class=\"col-sm-3\"><div class=\"image-zoom\">";
- echo "<a href=\"?path=" . $pathv . "\"><img src=\"folder_up.png\" alt=\"folder up\"></a>";
- echo "</div></div>";
- }
- }
- } else {
- if(preg_match_all("/([a-zA-Z0-9.*]+)-[S|s]([0-9]+)[E|e]([0-9]+)-([a-zA-Z0-9äöüÄÖÜß\-\.\,\w]+)\.([a-zA-Z0-9\(\).*\w\,]+)/", $object, $output)) {
- echo "<div class=\"col-sm-3 episode\"><div class=\"image-zoom\">";
- echo "<a href=\"?path=" . $_GET['path'] . "/" . $object . "\">" . "<img class=\"img-responsive\" src=\"" . getImageByName($_GET['path'] . "/" . $object) . "\" alt=\"" . $object . "\">";
- echo "<div class=\"episode-title\">" . (string) $output[3][0] . " - " . str_replace('.', ' ', $output[4][0]) . "</div>";
- } else {
- echo "<div class=\"col-sm-3\"><div class=\"image-zoom\">";
- echo "<a href=\"?path=" . $_GET['path'] . "/" . $object . "\">" . "<img class=\"img-responsive\" src=\"" . getImageByName($_GET['path'] . "/" . $object) . "\" alt=\"" . $object . "\">";
- }
- echo "</a></div></div>";
- }
- }
- echo "</div>";
- } else {
- $paths = explode('/', $_GET['path']);
- $paths = array_diff($paths, array($paths[sizeof($paths) - 1]));
- $pathv = "";
- foreach($paths as $key => $path) {
- if($key == sizeof($paths) - 1) {
- $pathv .= $path;
- } else {
- $pathv .= $path . "/";
- }
- }
- $mime = explode(';', finfo_file(finfo_open(FILEINFO_MIME), $_GET['path']));
- echo "<a href=\"?path=" . $pathv . "\">Back</a> | <a href=\"readfile.php?file=" . $_GET['path'] . "\">Download</a> | <input type=\"text\" value=\"https://yolo:amk@bridge.mmnx.de/videos/readfile.php?file=" . $_GET['path'] . "\" /> <sub>Kopieren für Wiedergabe in Medienplayer (Netzwerkstream)</sub><br>";
- echo "<video width=\"auto\" height=\"auto\" controls>";
- echo "<source src=\"readfile.php?file=" . $_GET['path'] . "\" type=\"" . $mime[0] . "\">";
- echo "Your browser does not support the video tag.";
- echo "</video>";
- }
- }
- ?>
- </div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
- </body>
- </html>
|