Passwort:
/dev/null")) as $line) { if (substr($line,0,7)=="State: ") $state = substr($line,7); if (substr($line,0,6)=="File: ") $file = basename(substr($line,6)); if (substr($line,0,10)=="TimeLeft: ") $time = substr($line,10); } $max_file_len = $max_line_len - 4 - strlen($state) - strlen($time); if ($max_lin_len && (strlen($file) > $max_file_len)) $file = "..." . substr($file,3-$max_file_len); return $state . " " . $file . " (" . $time . ")"; } function list_info($max_line_len = 0) { $list = substr(shell_exec("head -n1 ~musix/.moc/_playlist.m3u"),0,-1); $cnt = substr(shell_exec("wc -l < ~musix/.moc/Listen/" . $list),0,-1); $max_list_len = $max_line_len - 3 - strlen($cnt); if ($max_line_len && (strlen($list) > $max_list_len)) $list = "..." . substr($list,3-$max_list_len); return $list . " (" . $cnt . ")"; } function print_redirect() { ?> \n"; print details() . "
\n"; ?> all info
$command) { print ' ' . $key . '
' . "\n"; } ?> lists
\n"; print details() . "
\n"; print crypt_status(); break; case "info": print list_info($max_line_len); break; case "details": print details($max_line_len); break; case "crypt": print crypt_status(); break; case "playlist": if (array_key_exists("list",$_GET)) { $i = $_GET["list"]; if (preg_match("/^\d+$/", $i) == 1) { shell_exec("playlist " . $i); } } print_redirect(); break; default: if (array_key_exists($_GET["what"], $commands)) { shell_exec($commands[$_GET["what"]]); print_redirect(); } die(); }