| 113 |
# if $command is set, |
# if $command is set, |
| 114 |
# execute this command |
# execute this command |
| 115 |
if (isset($_GET['command']) && isset($_GET['isreal'])) { |
if (isset($_GET['command']) && isset($_GET['isreal'])) { |
| 116 |
$supported = array("play","pause","stop","next","prev"); |
$supported = array("play","pause","stop","next","prev", "pl_activate"); |
| 117 |
foreach($supported as $cmd) { |
foreach($supported as $cmd) { |
| 118 |
if ($_GET['command'] == $cmd) { |
if ($_GET['command'] == $cmd) { |
| 119 |
$supported = true; |
$supported = true; |
| 129 |
|
|
| 130 |
# execute command |
# execute command |
| 131 |
//$command = "sudo -u music /home/music/bin/gdkeypad.pl {$player['ipaddr']} {$player['id']} 0 {$_GET['command']} > /dev/null"; |
//$command = "sudo -u music /home/music/bin/gdkeypad.pl {$player['ipaddr']} {$player['id']} 0 {$_GET['command']} > /dev/null"; |
| 132 |
$command = "sudo -u music -H sh -c \". ~/.bashrc; /home/music/bin/gdkeypad.pl {$player['ipaddr']} {$player['id']} 0 {$_GET['command']} > /dev/null\""; |
$command = "sudo -u music -H sh -c \". ~/.bashrc; /home/music/bin/gdkeypad.pl {$player['ipaddr']} {$player['id']} 0 {$_GET['command']} {$_GET['command_arg']} > /dev/null\""; |
| 133 |
if ($_GET['debug']) print "$command<br/>"; |
if ($_GET['debug']) print "$command<br/>"; |
| 134 |
if (!readConfig("common_isdemo")) exec($command); |
if (!readConfig("common_isdemo")) exec($command); |
| 135 |
|
|
| 236 |
$tpl->display("index.tpl"); |
$tpl->display("index.tpl"); |
| 237 |
} |
} |
| 238 |
|
|
|
?> |
|
| 239 |
|
?> |