\r\n";
print "
Media\r\n";
print "
";
print "
";
print " {$subdir}
";
$dir_handle = @opendir($mediapath .$subdir);
if (!$dir_handle)
{
print "Unable to open $mediapath .$subdir";
}
else while ($medianame = readdir($dir_handle))
{
if($medianame == "." || $medianame == ".." || $medianame == 'lost+found')
continue;
$medianame_array[] = $medianame;
}
if ($medianame_array[0])
{
// Alphabetical sorting
sort($medianame_array);
$audiocnt=0;
foreach($medianame_array as $value)
{
$medianame2=addslashes($value);
switch (mediagettype($mediapath .$subdir .$value))
{
// Dir
case 3:
{
print "\r\n";
print "
\r\n";
break;
}
// Video
case 1:
{
print "\r\n";
print "
\r\n";
break;
}
// Rest of files
default:
continue;
}
}
}
$upsubdir = dirname($subdir);
print "
\r\n";
if ($dir_handle)
closedir($dir_handle);
print "
\r\n";
?>