[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpsysinfo/includes/ -> table_network.php (source)

   1  <?php
   2  //
   3  // phpSysInfo - A PHP System Information Script
   4  // http://phpsysinfo.sourceforge.net/
   5  //
   6  // This program is free software; you can redistribute it and/or
   7  // modify it under the terms of the GNU General Public License
   8  // as published by the Free Software Foundation; either version 2
   9  // of the License, or (at your option) any later version.
  10  //
  11  // This program is distributed in the hope that it will be useful,
  12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14  // GNU General Public License for more details.
  15  //
  16  // You should have received a copy of the GNU General Public License
  17  // along with this program; if not, write to the Free Software
  18  // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19  //
  20  // $Id: table_network.php 17475 2004-11-28 19:01:45Z  $
  21  
  22  $net = sys_netdevs();
  23  
  24  $_text = '<table width="100%" align="center">'
  25         . '<tr><td align="left"><b><font size="-1">' . $text['device'] . '</font></b></td>'
  26         . '<td align="left"><b><font size="-1">' . $text['received'] . '</font></b></td>'
  27         . '<td align="right"><b><font size="-1">' . $text['sent'] . '</font></b></td>'
  28         . '<td align="right"><b><font size="-1">' . $text['errors'] . '</font></b></td>';
  29  
  30  while (list($dev, $stats) = each($net)) {
  31      $_text .= "\t<tr>\n";
  32      $_text .= "\t\t<td align=\"left\">$f_body_open" . $dev . "$f_body_close</td>\n";
  33      $_text .= "\t\t<td align=\"left\">$f_body_open" . format_bytesize($stats['rx_bytes'] / 1024) . "$f_body_close</td>\n";
  34      $_text .= "\t\t<td align=\"right\">$f_body_open" . format_bytesize($stats['tx_bytes'] / 1024) . "$f_body_close</td>\n";
  35      $_text .= "\t\t<td align=\"right\">$f_body_open" . $stats['errs'] . '/' . $stats['drop'] . "$f_body_close</td>\n";
  36      $_text .= "\t</tr>\n";
  37  }             
  38  
  39  $_text .= '</table>';
  40  
  41  $tpl->set_var('network', makebox($text['netusage'], $_text, '100%'));
  42  
  43  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7