/[cvs]/nfo/php/scripts/gdwebint/public_html/index.php
ViewVC logotype

Diff of /nfo/php/scripts/gdwebint/public_html/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Fri Apr 1 00:29:34 2005 UTC revision 1.3 by joko, Fri Apr 1 02:12:46 2005 UTC
# Line 113  Line 113 
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;
# Line 128  Line 128 
128                          if (!$player) openError("Unable to read player.",lastURI());                          if (!$player) openError("Unable to read player.",lastURI());
129                                                    
130                          # execute command                          # execute command
131                          if (!readConfig("common_isdemo")) exec("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']}  {$_GET['command_arg']}  > /dev/null\"";
133                            if ($_GET['debug']) print "$command<br/>";
134                            if (!readConfig("common_isdemo")) exec($command);                              
135                                                    
136                          # relocate                          # relocate
137                          if ($_GET['isreal']) header("Location: index.php?mode=player&sid={$_GET['sid']}");                          if ($_GET['isreal']) header("Location: index.php?mode=player&sid={$_GET['sid']}");
# Line 233  Line 236 
236                  $tpl->display("index.tpl");                                              $tpl->display("index.tpl");                            
237          }                        }              
238                    
 ?>        
239    ?>      

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed