X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=web%2Fsongbook.php;h=113af43141efebd04ec4933a45d2db762178d18d;hb=86b65882f6d260d58cd495b8153c6aae00886bbf;hp=cbfe933cab1f50b0056912ed457cebe4b5c7e78e;hpb=3fb37fca3a2cfd094e936635616421cc52ada97d;p=songbook.git diff --git a/web/songbook.php b/web/songbook.php index cbfe933..113af43 100644 --- a/web/songbook.php +++ b/web/songbook.php @@ -3,6 +3,11 @@ $baseDir = getcwd(); $songDir = "/opt/songbook/Songs"; $debug = $_REQUEST["debug"]; +// Initialize music objects +$songs = getSongs($songDir); +$sets = getSets($songDir); +$artists = getArtists($songs); + function debug ($msg) { global $debug; @@ -11,20 +16,16 @@ function debug ($msg) { } // if } // debug -function getSongs () { - global $songDir; - +function getSongs ($songDir) { return glob("$songDir/*.pro"); } // getSongs -function getSets () { - global $songDir; - +function getSets ($songDir) { return glob("$songDir/*.lst"); } // getSets function songsDropdown () { - $songs = getSongs(); + global $songs; print "