DEBUG: $msg
"; } // if } // debug function getSongs ($songDir) { return glob("$songDir/*.pro"); } // getSongs function getSets ($songDir) { return glob("$songDir/Lists/*.lst"); } // getSets function songsDropdown () { global $songs; print "
"; print "Songs:  "; print ""; print " "; print "
"; } // songsDropdown function artistsDropdown () { global $artists; print "
"; print "Artists:  "; print ""; print " "; print "
"; } // artistsDropdown function setsDropdown () { global $sets; print "
"; print "Sets:     "; print ""; print " "; 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