";
$firstLine = true;
foreach (file("$songDir/$set") as $line) {
// Skip first line which is merely the set name again
if ($firstLine) {
$firstLine = false;
continue;
} // if
if (preg_match("/(.*)\s+-\s+(.*)/", $line, $matches)) {
$song = trim($matches[1]);
$artist = trim($matches[2]);
} else {
$song = trim($line);
$artist = '';
} // if
if (file_exists ("$songDir/$song.pro")) {
print "
";
print basename($song);
print "";
} else {
print "";
print basename($song);
} // if
if ($artist == '') {
$artist = getArtist ("$songDir/$song.pro");
} // if
if ($artist != '') {
print " - ";
if (in_array ($artist, $artists)) {
print "$artist";
} else {
print $artist;
} // if
} // if
print "";
} // foreach
print "";
?>