";
while ($component = substr ($path, 0, strpos ($path, "/"))) {
$component_path = isset ($component_path)
? $component_path . "/" . $component : $component;
print "$component: ";
$path = substr ($path, strpos ($path, "/") + 1);
} // while
print "$path\n";
if ($albumart = GetAlbumArt ("$base/$orig_path")) {
print "\n";
} // if
} // Banner
function DisplayItem ($path, $element) {
if ($element == "." || $element == "..") {
return false;
} elseif (is_dir ($path . "/" . $element)) {
if ($element == "My Playlists") {
return false;
} else {
return true;
} // if
} elseif (strpos ($element, ".wma") ||
strpos ($element, ".mp3")) {
return true;
} else {
return false;
} // if
} // DisplayItem
function DisplayFolders ($path) {
global $http_base;
global $base;
Banner ($path);
if ($path != "") {
$path = $path . "/";
} // if
$folder_array = array ();
$song_array = array ();
if ($handle = opendir ("$base/$path")) {
while (false !== ($element = readdir ($handle))) {
if (!DisplayItem ("$base/$path", $element)) {
continue;
} // if
if (is_dir ("$base/$path/$element")) {
array_push ($folder_array, $element);
} else {
array_push ($song_array, $element);
} // if
} // while
closedir ($handle);
} // if
sort ($folder_array);
sort ($song_array);
print "
Folders | \n"; print "Songs at this level | \n"; print "||
---|---|---|---|
$folder | \n"; $folder_index++; } else { print "\n"; } // if if (isset ($song)) { print " | $song_name | \n"; $song_index++; } else { print "\n"; } // if print " |