infdj.com_2001/otros/includes/table_connections.php
2021-09-12 22:40:30 +02:00

44 lines
2.1 KiB
PHP

<?php
//
// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: table_filesystems.php,v 1.5 2001/05/29 01:31:44 precision Exp $
$_text = '<table width="100%" align="center">'
. '<tr><td align="left">' . $f_body_open . '<b>' . $text['protocol'] . '</b>' . $f_body_close . '</td>'
. '<td align="left">' . $f_body_open . '<b>' . $text['localaddr'] . '</b>' . $f_body_close . '</td>'
. '<td align="left">' . $f_body_open . '<b>' . $text['localport'] . '</b>' . $f_body_close . '</td>'
. '<td align="left">' . $f_body_open . '<b>' . $text['foreignaddr'] . '</b>' . $f_body_close . '</td>'
. '<td align="right">' . $f_body_open . '<b>' . $text['foreignport'] . '</b>' . $f_body_close . '</td></tr>';
$con = sys_connections();
for ($i=0; $i<sizeof($con); $i++) {
$_text .= '<tr><td align="left">' . $f_body_open . $con[$i]['prot'] . $f_body_close . '</td>'
. '<td align="left">' . $f_body_open . $con[$i]['laddr'] . $f_body_close . '</td>'
. '<td align="left">' . $f_body_open . $con[$i]['lport'] . $f_body_close . '</td>'
. '<td align="left">' . $f_body_open . $con[$i]['faddr'] . $f_body_close . '</td>'
. '<td align="right">' . $f_body_open . $con[$i]['fport'] . $f_body_close . '</td></tr>';
}
$_text .= "</table>";
$tpl->set_var('connections', makebox($text['connections'], $_text, '100%'));
?>