DEBUG: $msg
";
} // if
} // debug
function getSongs ($songDir) {
return glob("$songDir/*.pro");
} // getSongs
function getSets ($songDir) {
return glob("$songDir/*.lst");
} // getSets
function songsDropdown () {
global $songs;
print "
";
} // songsDropdown
function artistsDropdown () {
global $artists;
print "";
} // artistsDropdown
function setsDropdown () {
global $sets;
print "";
} // setsDropdown
function getArtist ($song) {
$lyrics = @file_get_contents ($song);
if (preg_match ("/\{(st|subtitle):(.*)\}/", $lyrics, $matches)) {
return trim ($matches[2]);
} else {
return "";
} // if
} // getArtist
function getArtists ($songs) {
foreach ($songs as $song) {
$artist = getArtist ($song);
if ($artist != '') {
$artists[$artist] = 1;
} // if
} // foreach
return array_keys ($artists);
} // getArtists