Miscellaneous changes
[clearscm.git] / songbook / songbook.php
deleted file mode 100644 (file)
index c4afcd97e20289e126fa5a59ab28a14ecda3cc90..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-$songs = glob ("/web/songbook/Songs/*.pro");
-
-function songsDropdown () {
-  global $songs;
-
-  print "<form method=\"post\" action=\"webchord.cgi\" name=\"song\">";
-  print "Songs:&nbsp;&nbsp;";
-  print "<select name=\"chordpro\">";
-
-  sort ($songs);
-  foreach ($songs as $song) {
-    $title = basename ($song, ".pro");
-    $artist = getArtist ($song);
-
-    if ($artist != "") {
-      $title .= "&nbsp;($artist)";
-    } // if
-
-    print "<option value=\"$song\">$title</option>";
-  } // foreach
-
-  print "<input type=\"submit\" value=\"Go\">";
-  print "</select>";
-  print "</form>";
-} // songsDropdown
-
-function artistsDropdown () {
-  global $songs;
-
-  $artists = getArtists ($songs);
-
-  print "<form method=\"post\" action=\"displayartist.php\" name=\"artist\">";
-  print "Artists:&nbsp;&nbsp;";
-  print "<select name=\"artist\">";
-
-  sort ($artists);
-  foreach ($artists as $artist) {
-    print "<option>$artist</option>";
-  } // foreach
-
-  print "<input type=\"submit\" value=\"Go\">";
-  print "</select>";
-  print "</form>";
-} // 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 "<ol>";
-
-  foreach ($songs as $song) {
-    $artist = getArtist ($song);
-
-    $title = basename ($song, ".pro");
-
-    echo "<li><a href=\"webchord.cgi?chordpro=$song\">$title</a>";
-
-    if ($artist != "") {
-    echo "&nbsp;($artist)";
-    } // if
-  } // foreach
-
-  echo "</ol>";
-} // formatTable
\ No newline at end of file
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..d43dedd65a681f896ce51446890810ec2a80d850
--- /dev/null
@@ -0,0 +1 @@
+/web/php/songbook/songbook.php
\ No newline at end of file