summaryrefslogtreecommitdiff
path: root/lists.php
blob: 9e804a5c4f7aaaf7274495bf8c143377003363b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

$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 . ">" . $list . "</a><br>\n";
}