prefs['play_type'] != 'local_play') {
show_template('header');
echo "Localplay Currently Disabled";
show_footer();
exit;
}
switch($_REQUEST['submit'])
{
case ' X ':
$action = "stop";
break;
case ' > ':
$action = "play";
break;
case ' = ':
$action = "pause";
break;
case '|< ':
$action = "prev";
break;
case ' >|':
$action = "next";
break;
case (substr_count($_REQUEST['submit'],"+") == '1'):
$amount = trim(substr($_REQUEST['submit'],2,strlen($_REQUEST['submit']-2)));
$action = "volplus";
break;
case (substr_count($_REQUEST['submit'],"-") == '1'):
$amount = trim(substr($_REQUEST['submit'],2,strlen($_REQUEST['submit']-2)));
$action = "volminus";
break;
case 'clear':
$action = "clear";
break;
case 'start':
$action = "start";
break;
case 'kill':
$action = "kill";
break;
default:
echo _("Unknown action requested") . ": '$_REQUEST[submit]'
";
exit;
}
$systr = conf('localplay_'.$action);
$systr = str_replace("%AMOUNT%",$amount,$systr);
if (conf('debug')) { log_event($user->username,'localplay',"Exec: $systr"); }
@exec($systr, $output);
$web_path = conf('web_path');
if($output)
print_r($output);
else
header("Location: $web_path");
?>