summaryrefslogtreecommitdiff
path: root/pages/lyrics.php
diff options
context:
space:
mode:
authordeva <deva>2008-10-06 18:13:56 +0000
committerdeva <deva>2008-10-06 18:13:56 +0000
commit415e90a2e059ea32f6851dfb9b3c018b0a731a81 (patch)
treea2e7d809f4783f521a3a985716a26a6543acfc9d /pages/lyrics.php
parentcce5e7710295021b41d9aaecc503a60fb99256be (diff)
Put the webpages in.
Diffstat (limited to 'pages/lyrics.php')
-rw-r--r--pages/lyrics.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/pages/lyrics.php b/pages/lyrics.php
new file mode 100644
index 0000000..50ce671
--- /dev/null
+++ b/pages/lyrics.php
@@ -0,0 +1,35 @@
+<?php
+global $name;
+$filename = $DATA_DIR . "/lyrics/" . $name . ".txt";
+$fp = fopen($filename, "r");
+$file = fread($fp, filesize($filename));
+fclose($fp);
+
+$blocks = explode("\n\n", $file);
+
+foreach ($blocks as $block) {
+ $lines = explode("\n", $block);
+ $pset = false;
+ if($title) {
+ echo "<p>\n";
+ $pset = true;
+ }
+ foreach ($lines as $line) {
+ if(!$title) {
+ $title = $line;
+ echo "<div class=\"small_header\">" . $title . "</div>\n";
+ } else {
+ echo $line . "<br/>\n";
+ $line = strtok("\n");
+ }
+ }
+ if($pset) echo "</p>\n";
+}
+
+echo "<p>\n";
+
+//echo "<a target=\"newwindow\" href=\"". $filename . "\">Download</a>\n";
+
+echo "</p>\n";
+
+?>