X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=songbook%2Fsongbook.php;h=d43dedd65a681f896ce51446890810ec2a80d850;hb=9ed7209cfd57660436721ff5bf60d58e62ede295;hp=f3893b8402a90b9830a4d1a948bd4a44d7380e45;hpb=3f54436636ddcf8e6a903183da1163082ccaedbf;p=clearscm.git diff --git a/songbook/songbook.php b/songbook/songbook.php deleted file mode 100644 index f3893b8..0000000 --- a/songbook/songbook.php +++ /dev/null @@ -1,87 +0,0 @@ -"; - print "Songs:  "; - print ""; - print ""; - print ""; -} // songsDropdown - -function artistsDropdown () { - global $songs; - - $artists = getArtists ($songs); - - print "
"; - print "Artists:  "; - print ""; - print ""; - print "
"; -} // artistsDropdown - -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) { - $artists = array(); - - foreach ($songs as $song) { - $artist = getArtist ($song); - - if ($artist != '') { - $artists[$artist] = 1; - } // if - } // foreach - - 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 \ No newline at end of file diff --git a/songbook/songbook.php b/songbook/songbook.php new file mode 120000 index 0000000..d43dedd --- /dev/null +++ b/songbook/songbook.php @@ -0,0 +1 @@ +/web/php/songbook/songbook.php \ No newline at end of file