';
$filename = basename($_GET['filepath'], ".mp4");
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.');
}
if (isset($_GET['filename']) && $_GET['filename'] != ""){
$displayname = $_GET['filename'];
}else{
$displayname = $filename;
}
?>
';
echo '
Playlist >> '.$playListName.'
';
$template = '';
$playlist = $_GET['playlist'];
$files = glob($playlist . '/*.mp4');
foreach ($files as $file){
array_push($playlistItem,$file);
$thisfilename = basename($file,'.mp4');
$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 segment','ts inverted info segment',$thisitem);
$thisitem = str_replace('%Operations%','PLAYING',$thisitem);
}else{
$viewPath = "vidPlay.php?src=$file&playlist=$playlist";
$thisitem = str_replace('%Operations%','View Video',$thisitem);
}
echo $thisitem;
}
echo '';
}
?>