X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=web%2Fsongbook.php;h=113af43141efebd04ec4933a45d2db762178d18d;hb=674da66f3a92ece352779909a33494d30cf9c869;hp=a231add6b45f81f79c8bd6afb4c5114882ee0a79;hpb=14ad2485f77e44566ebc155fe6a8fac85dbc2c94;p=songbook.git diff --git a/web/songbook.php b/web/songbook.php index a231add..113af43 100644 --- a/web/songbook.php +++ b/web/songbook.php @@ -1,8 +1,13 @@ "; print ""; + print " "; print ""; } // songsDropdown function artistsDropdown () { - global $songs; - - $artists = getArtists ($songs); + global $artists; print "
"; print "Artists:  "; @@ -58,11 +60,31 @@ function artistsDropdown () { print ""; } // foreach - print ""; print ""; + print " "; print "
"; } // artistsDropdown +function setsDropdown () { + global $sets; + + print "
"; + print "Sets:     "; + print ""; + print " "; + print "
"; +} // setsDropdown + function getArtist ($song) { $lyrics = file_get_contents ($song); @@ -74,8 +96,6 @@ function getArtist ($song) { } // getArtist function getArtists ($songs) { - $artists = array(); - foreach ($songs as $song) { $artist = getArtist ($song); @@ -87,20 +107,3 @@ function getArtists ($songs) { return array_keys ($artists); } // getArtists -function formatTable ($songs) { - echo "
    "; - - foreach ($songs as $song) { - $artist = getArtist ($song); - - $title = basename ($song, ".pro"); - - echo "
  1. $title"; - - if ($artist != "") { - echo " ($artist)"; - } // if - } // foreach - - echo "
"; -} // formatTable