diff --git a/example.php b/example.php index 8d788ca..08d5ba2 100644 --- a/example.php +++ b/example.php @@ -61,7 +61,7 @@ ?>

QnetGateway Dashboard

1) { +if (`ps -aux | grep -e qn -e MMDVMHost | wc -l` > 2) { echo 'Process:
', "\n"; echo str_replace(' ', ' ', 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
'), "\n"; $lines = explode("\n", `ps -aux | grep -e qngateway -e qnlink -e qndtmf -e qndvap -e qnitap -e qnrelay -e qndvrptr -e qnmodem -e MMDVMHost | grep -v grep`); @@ -126,14 +126,12 @@ URCall: $fmodule = $_POST['fmodule']; } } - $furcall = trim(preg_replace('/[^0-9a-z ]/', '', strtolower($furcall))); + $furcall = str_replace(' ', '_', trim(preg_replace('/[^0-9a-z ]/', '', strtolower($furcall)))); if (strlen($furcall)>0 && strlen($fmodule)>0) { $command = 'qnremote '.strtolower($fmodule).' '.strtolower($cfg['ircddb_login']).' '.$furcall; echo $command, "
\n"; - $lastline = system($command, $retval); - if ($retval != 0) - echo $lastline, "
\n"; + $lastline = system($command); } ?>