} else { $tagfiles[$thisfile][$var[0]] = $var[1]; } } } foreach ($tagfiles as $key => $val) { if (!isset($letters_tagfiles[strtoupper(mbFirstChar(get_songinfo_first($val, isset($configuration["sort"]) ? $configuration["sort"] : array("file"), 0)))])) { $letters_tagfiles[strtoupper(mbFirstChar(get_songinfo_first($val, isset($configuration["sort"]) ? $configuration["sort"] : array("file"), 0)))] = true; } } make_link("", "playlist", "add all", $arguments = array("command" => "addlist", "arg" => $tagfiles)); echo "] "; if (count($tagfiles) > 0) { $songinfo = null; $counte = 0; make_index_table($letters_tagfiles, "tagfiles_", false); echo "</small></h2>\n"; echo "<table cellspacing=\"0\">\n<tr class=\"head\">"; foreach ($configuration["columns_files"] as $key => $column) { echo "<td" . ($column == "Function" ? " style=\"width: " . strlen($configuration["add"]) . "em\"" : "") . ">"; switch ($column) { case "Function": echo $configuration["add"]; break; case "Number": echo "#"; break; case "songformat": make_link("", "tagfiles", "Song", array("sort" => "file")); break; default:
if (!is_array($tmp["Album"])) { $albums = array($tmp["Album"]); } else { $albums = $tmp["Album"]; } natcasesort($albums); $albums = array_merge(array("Any album" => ""), array_values($albums)); foreach ($albums as $key => $val) { if (!isset($letters_albums[strtoupper(mbFirstChar($val))])) { $letters_albums[strtoupper(mbFirstChar($val))] = true; } } $songinfo = null; $counte = 0; echo " <small>"; make_index_table($letters_albums, "albums_", false); echo "</small></h2>\n"; echo "<table cellspacing=\"0\">\n"; foreach ($albums as $key => $val) { if ($letters_albums[strtoupper(mbFirstChar($val))] == true) { echo "<a name=\"albums_" . strtoupper(mbFirstChar($val)) . "\"></a>"; $letters_albums[strtoupper(mbFirstChar($val))] = false; } echo "<tr" . ($counte % 2 != 1 ? " class=\"alt\"" : "") . ">"; echo "<td>"; make_link("", "tagfiles", is_string($key) ? $key : $val, $arguments = array("album" => htmlentities(rawurlencode($val))), false, null, "tagfiles"); echo "</td>"; echo "</tr>\n"; $counte++; } echo "</table>\n";
if (is_array($tmp["Artist"])) { $artists = $tmp["Artist"]; } else { $artists = array($tmp["Artist"]); } natcasesort($artists); $artists = array_merge(array("Any artist" => ""), array_values($artists)); foreach ($artists as $key => $val) { if (!array_key_exists(strtoupper(mbFirstChar($val)), $letters_artists)) { $letters_artists[strtoupper(mbFirstChar($val))] = true; } } $songinfo = null; $counte = 0; echo " <small>"; make_index_table($letters_artists, "artists_", false); echo "</small></h2>\n"; echo "<table cellspacing=\"0\">\n"; foreach ($artists as $key => $val) { if ($letters_artists[strtoupper(mbFirstChar($val))] == true) { echo "<a name=\"artists_" . strtoupper(mbFirstChar($val)) . "\"></a>"; $letters_artists[strtoupper(mbFirstChar($val))] = false; } echo "<tr" . ($counte % 2 != 1 ? " class=\"alt\"" : "") . ">"; echo "<td>"; make_link("", "albums", is_string($key) ? $key : $val, $arguments = array("artist" => htmlentities(rawurlencode($val))), false, null, "albums"); echo "</td>"; echo "</tr>\n"; $counte++; } echo "</table>\n";
} } natcasesort($dirs); $dirs = array_values($dirs); if (array_key_exists("directory", $configuration) && strlen($configuration["directory"]) > 0 && $configuration["show_dotdot"] == true) { $newdir = dirname($configuration["directory"]); $dirs = array_merge(array("<<" => $newdir == "." || $newdir == "" || $newdir == "/" ? "" : $newdir), $dirs); } if (count($dirs) > 0) { $dir = null; $counte = 0; echo "<h2><a name=\"directories\"></a>Directories <small>"; //echo "<h2><a name=\"directories\"></a>Directories <small>["; // make_link("", "playlist", "add all", $arguments = (array_key_exists("directory", $configuration) ? array("command" => "addall_recursive", "arg" => $configuration["directory"]) : array("command" => "addall_recursive"))); // echo "] "; make_index_table($letters_dirs, "dirs_", false); echo "</small></h2>\n"; echo "<table cellspacing=\"0\" class=\"directory_list\">\n"; if ($configuration["show_directory_columns"] == true) { echo "<tr class=\"head\">"; foreach ($configuration["columns_directories"] as $key => $column) { switch ($column) { case "Function": //echo "<td".($configuration["wrap_functions"] == true ? " class=\"anotfull\"" : "")." style=\"width: ".strlen($configuration["add"])."em\">".$configuration["add"]."</td>"; echo "<td></td>"; break; case "Update": //echo "<td".($configuration["wrap_functions"] == true ? " class=\"anotfull\"" : "")." style=\"width: ".strlen($configuration["update"])."em\">".$configuration["update"]."</td>"; echo "<td></td>"; break; case "Number":
foreach ($ls["playlist"] as $key => $pl) { $playlists[] = $pl; if (!isset($letters[strtoupper(mbFirstChar($pl))])) { $letters[strtoupper(mbFirstChar($pl))] = true; } } } else { $playlists[] = $ls["playlist"]; $letters[strtoupper(mbFirstChar($ls["playlist"]))] = true; } } if (count($playlists) > 0) { $pl = null; $counte = 0; echo "<h2><a name=\"playlists\"></a>Available Playlists <small>"; make_index_table($letters, "playlists_", false); echo "</small></h2>\n"; echo "<table cellspacing=\"0\">\n"; echo "<tr class=\"head\"><td style=\"width: " . strlen($configuration["delete"]) . "em\">" . $configuration["delete"] . "</td><td>Title</td></tr>\n"; foreach ($playlists as $key => $pl) { echo "<tr" . ($counte % 2 != 1 ? " class=\"alt\"" : "") . "><td>"; if ($letters[strtoupper(mbFirstChar($pl))]) { echo "<a name=\"playlists_" . strtoupper(mbFirstChar($pl)) . "\" style=\"display: inline\" />"; $letters[strtoupper(mbFirstChar($pl))] = false; } make_link("", "playlists", $configuration["delete"], array("command" => "rm", "arg" => htmlentities(rawurlencode($pl)))); echo "</td><td>"; make_link("", "playlist", htmlspecialchars($pl), array("command" => "load", "arg" => htmlentities(rawurlencode($pl)))); echo "</td></tr>\n"; $counte++; }