\r\n";
else
print "
\r\n";
print "\r\n";
print "
\r\n";
print "
Back\r\n";
print "
\r\n";
print "
\r\n";
print "
\r\n";
global $httppath;
print "
iStreamdev
\r\n";
print "
\r\n";
print "\r\n";
print "
\r\n";
$mediapath = $_REQUEST['mediapath'];
$subdir = $_REQUEST['subdir'];
$dir_handle = @opendir($mediapath .$subdir);
if (!$dir_handle)
print "Unable to open $mediapath .$subdir";
else while ($medianame = readdir($dir_handle))
{
// Add only mp3 files
if(strstr($medianame, ".mp3") != ".mp3")
continue;
$medianame_array[] = $medianame;
}
if ($medianame_array[0])
{
// Alphabetical sorting
sort($medianame_array);
exec('rm playlist/*.mp3');
exec('ln -s ' .addcslashes(quotemeta($mediapath .$subdir), " ") .'*.mp3 playlist');
$cnt = 1;
foreach($medianame_array as $value)
{
$medianame2=addslashes($value);
print " - \r\n";
print " \r\n";
print " 1{$value}???\r\n";
print " \r\n";
print "
\r\n";
$cnt++;
}
print "
\r\n";
print "\r\n";
$count = count($medianame_array);
for ($cnt=0; $cnt < $count; $cnt++)
{
$idx=$cnt+1;
print "
";
}
else
print "\r\n";
print " \r\n";
?>