diff options
Diffstat (limited to 'moc-commands.php')
-rw-r--r-- | moc-commands.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/moc-commands.php b/moc-commands.php new file mode 100644 index 0000000..4baddb2 --- /dev/null +++ b/moc-commands.php @@ -0,0 +1,26 @@ +<?php + +function print_neutral_back_link() { + print '<a href="/'; + attach_key('?'); + print '">back</a><br>' . "\n"; +} + +function print_lists() { + $handle = popen("LC_ALL=C ls ~musix/.moc/Listen", "r"); + $i = 1; + while (!feof($handle)) { + $s = fgets($handle); + if (substr($s,0,7) !== "_lokal_") { + continue; + } + $lists[$i] = substr($s,7); + $i++; + } + + foreach ($lists as $i => $list) { + print '<a href="/?what=playlist&list=' . $i; + attach_key(); + print '">' . $list . "</a><br>\n"; + } +} |