Video file details

File access path: %FILEPATH%

File storage size: %FILESIZE%

'; if (isset($_GET['src']) && $_GET['src'] != ""){ //There are given src for video attribute if (file_exists($_GET['src'])|| strpos($_GET['src'],"extDiskAccess.php")){ echo ''; //$filename = basename($_GET['src'], ".mp4"); $filedata = explode('/',$_GET['src']); $fullFileName = array_pop($filedata); $filename = str_replace(".mp4","",$fullFileName); if (ctype_xdigit(str_replace("inith","",$filename)) && strlen(str_replace("inith","",$filename)) % 2 == 0) { $decodedName = hex2bin(str_replace("inith","",$filename)); }else{ $decodedName = $filename; } }else{ die('API call error: 404 File not found.'); } }else{ die('API call error: src value not found.'); } ?>
' . $decodedName . '
'; $box = $infoTemplate; $box = str_replace("%FILEPATH%",$_GET['src'],$box); if (strpos($_GET['src'],"extDiskAccess.php") !== false){ $extFile = explode("=",$_GET['src'])[1]; $filesize = formatBytes(filesize($extFile)); }else{ $filesize = formatBytes(filesize($_GET['src'])); } $box = str_replace("%FILESIZE%",$filesize,$box); echo $box; ?>
Display Setting
Global Volume: 100%
'; echo '

Playlist '.$playListName.'

'; $template = '
%Video Attrubute Name%
%Operations%
'; $playlist = $_GET['playlist']; if($playlist == "uploads"){ //actually that will had bug if playlist is named "uploads", but well anyway Toby won't care $files = glob($playlist . '/*.mp4'); }else if(strpos($playlist,"/media/") !== false){ $files = glob($playlist . '/*.mp4'); }else{ $files = glob("./playlist/".$playlist . '/*.mp4'); } if (isset($_GET['isExt']) && $_GET['isExt'] == "true"){ $extAccess = true; }else{ $extAccess = false; } foreach ($files as $file){ array_push($playlistItem,$file); //$thisfilename = basename($file,'.mp4'); $filedata = explode('/',$file); $fullFileName = array_pop($filedata); $thisfilename = str_replace(".mp4","",$fullFileName); if (ctype_xdigit(str_replace("inith","",$thisfilename)) && strlen(str_replace("inith","",$thisfilename)) % 2 == 0) { $thisdecodedName = hex2bin(str_replace("inith","",$thisfilename)); }else{ $thisdecodedName = $thisfilename; } //$thisdecodedName = hex2bin(str_replace("inith","",$thisfilename)); $thisitem = str_replace('%Video Attrubute Name%',$thisdecodedName,$template); if ($thisdecodedName == $decodedName){ //If the looping loop back to the playing file, make it blue $thisitem = str_replace('ts fluid segment','ts inverted info segment',$thisitem); $thisitem = str_replace('%Operations%','PLAYING',$thisitem); }else{ if ($extAccess == true){ $viewPath = "vidPlay.php?src=../SystemAOB/functions/extDiskAccess.php?file=$file&playlist=$playlist&isExt=true"; $thisitem = str_replace('%Operations%','Play Video',$thisitem); }else{ $viewPath = "vidPlay.php?src=$file&playlist=$playlist"; $thisitem = str_replace('%Operations%','Play Video',$thisitem); } } echo $thisitem; } echo ''; } ?>