array_push($process_list, array('client' => $client, 'RunningProcessInfo' => $ch->runningProcessInfo(), 'pinfo' => shell_exec("ps auxww | " . $cfg['bin_grep'] . " " . tfb_shellencode($ch->binClient) . " | " . $cfg['bin_grep'] . " -v grep")));
         }
         $tmpl->setloop('process_list', $process_list);
     }
     // drivespace-bar
     tmplSetDriveSpaceBar();
     break;
     // netstat
 // netstat
 case "netstat":
     // set vars
     if ($cfg['isAdmin']) {
         // set vars
         $tmpl->setvar('netstatConnectionsSum', netstatConnectionsSum());
         $tmpl->setvar('netstatPortList', netstatPortList());
         $tmpl->setvar('netstatHostList', netstatHostList());
     }
     // language
     $tmpl->setvar('_ID_HOSTS', $cfg['_ID_HOSTS']);
     $tmpl->setvar('_ID_PORTS', $cfg['_ID_PORTS']);
     $tmpl->setvar('_ID_CONNECTIONS', $cfg['_ID_CONNECTIONS']);
     // drivespace-bar
     tmplSetDriveSpaceBar();
     break;
     // xfer
 // xfer
 case "xfer":
     // is enabled ?
     if ($cfg["enable_xfer"] != 1) {
         AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use xfer");
         @error("xfer is disabled", "index.php?iid=serverStats", "");
?>

<br>
<div align="left" id="BodyLayer" name="BodyLayer" style="border: thin solid <?php 
echo $cfg["main_bgcolor"];
?>
; position:relative; width:740; height:500; padding-left: 5px; padding-right: 5px; z-index:1; overflow: scroll; visibility: visible">

<?php 
echo "<pre>";
echo "<strong>" . _DRIVESPACE . "</strong>\n\n";
echo $result;
echo "<br><hr><br>";
echo $result2;
echo "<br><hr><br>";
echo "<strong>" . _SERVERSTATS . "</strong>\n\n";
echo $result4;
echo "<br><hr><br>";
echo $result5;
echo "<br><hr><br>";
echo "<strong>" . _ID_CONNECTIONS . " : </strong>";
echo netstatConnectionsSum();
echo "<br>\n";
echo "<strong>" . _ID_PORTS . " : </strong>\n";
echo netstatPortList();
echo "<br>\n";
echo "<strong>" . _ID_HOSTS . " : </strong>\n";
echo netstatHostList();
echo "</pre>";
echo "</div>";
DisplayFoot();
 /**
  * Print Net Stat
  *
  * @return mixed
  */
 function _netstat()
 {
     global $cfg;
     echo $cfg['_ID_CONNECTIONS'] . ":\n";
     echo netstatConnectionsSum() . "\n";
     echo $cfg['_ID_PORTS'] . ":\n";
     echo netstatPortList();
     echo $cfg['_ID_HOSTS'] . ":\n";
     echo netstatHostList();
     return true;
 }
function printNetStat()
{
    echo "\n";
    echo "---------------------------------------\n";
    echo "          TorrentFlux-NetStat          \n";
    echo "---------------------------------------\n";
    echo "\n";
    echo " --- " . _ID_CONNECTIONS . " --- \n";
    echo netstatConnectionsSum();
    echo "\n\n";
    echo " --- " . _ID_PORTS . " --- \n";
    echo netstatPortList();
    echo "\n";
    echo " --- " . _ID_HOSTS . " --- \n";
    echo netstatHostList();
    echo "\n";
}